Skip to content

zeroc-ice/ice-builder-visualstudio

Ice Builder for Visual Studio

Ice Builder for Visual Studio is a Visual Studio extension that configures Slice MSBuild tasks for your C++ and C# projects directly within the Visual Studio IDE. It serves as a front-end for the Slice MSBuild tasks; all build-time processing is performed by these MSBuild tasks.

Ice Builder for Visual Studio is compatible with Visual Studio 2022 and 2026, and requires Ice 3.7 or 3.8 for C++ or C#.

Installation

The latest version of Ice Builder for Visual Studio is published in the Visual Studio Marketplace and can be installed directly through Visual Studio’s Extensions → Manage Extensions dialog.

Feedback

We encourage you to rate and review Ice Builder for Visual Studio on the Visual Studio Marketplace. Your feedback helps us improve the extension.

You can also report issues here on GitHub, and ask questions on Ice Builder for Visual Studio's Q & A page.

Configuration

Ice Builder for Visual Studio configures Slice compilation for your C++ and C# projects inside the Visual Studio IDE. The options depend on your project’s target language and the version of Ice you are using.

Ice Builder Options for VS2026

Visual Studio 2026: use Tools > Options > Project and Solutions > More Settings > Ice Builder


Ice Builder Options for VS2022

Visual Studio 2022: use Tools > Options > Project and Solutions > Ice Builder

Compile on Save

If you check the box Compile Slice files immediately after save Ice Builder compiles a Slice file when you save it; otherwise, it compiles Slice files only when you build the project.

C++ Projects

Add the required NuGet packages to your C++ project:

C++ Project using Ice 3.8 C++ Project using Ice 3.7
ZeroC.Ice.Cpp ZeroC.IceBuilder.MSBuild
ZeroC.Ice.V143

After the required NuGet packages are installed, the Ice Builder for Visual Studio extension provides a dedicated Options page for configuring Slice compilation for your C++ project.

C++ Options for Ice 3.8

Options for Ice 3.8


C++ Options for Ice 3.7

Options for Ice 3.7

These options map to the item metadata of the SliceCompile type:

Property Corresponding SliceCompile Item Metadata Notes
Output Directory OutputDir
Header Output Directory HeaderOutputDir
Include Directories IncludeDirectories
Base Directory For Generated #include BaseDirectoryForGeneratedInclude
Generated Header Extension HeaderExt
Generated Source Extension SourceExt
Additional Options AdditionalOptions
C++ Mapping IceCppMapping Project property Only for Ice 3.7

The Ice Builder for Visual Studio extension creates a Slice file filter in the Solution Explorer. We recommend adding your Slice (.ice) files to this filter for convenience, but you may place Slice files in any filter within your project.

The extension also provides a Slice item template that you can use to add new Slice files to your project.

cpp new slice file

You can also add existing Slice files using the Add > Existing Item... context menu command.

The extension automatically sets the Item Type property of added Slice files to SliceCompile, which enables Slice compilation for those files.

The extension adds a CLCompile item for each generated C++ source file and a CLInclude item for each generated C++ header file, ensuring the C++ code generated from the Slice definitions is compiled along your project C++ sources. These generated files are placed in the output directories specified in the Slice compilation options.

The generated items are added when you first build the project—or, if the Compile Slice files immediately after save option is enabled, when you save the Slice file.

By default, generated files are placed in $(IntDir), the intermediate directory for the current build configuration and platform.

To configure the Slice compilation options for a specific Slice file, right-click the file in Solution Explorer and select Properties. The Slice Compile property page will appear in the Properties window.

cpp slice file properties

The per-file options override the global project options configured in the Ice Builder options page described above.

C# Projects

Add the required NuGet packages to your C# project:

C# Project using Ice 3.8 C# Project using Ice 3.7
ZeroC.Ice.Slice.Tools ZeroC.IceBuilder.MSBuild
ZeroC.Ice ZeroC.Ice.Net

For .NET Framework projects, you must reload the project before the Ice Builder options become available and allow you to change the Slice compilation settings.

.NET SDK-style project options

.NET SDK-style project options


.NET Framework-style project options

.NET Framework-style project options

These options are the same for all configurations and platforms and map to item metadata of the SliceCompile type:

Property Corresponding SliceCompile Item Metadata
Output Directory OutputDir
Include Directories IncludeDirectories
Additional Options AdditionalOptions

You can add new Slice files to your C# project using the Add > New Item...

cs new slice file

Or add existing Slice files using the Add > Existing Item... context menu command.

Updating from older versions

The Ice Builder for Visual Studio 7.x release is compatible with Ice Builder for Visual Studio 6.x and 5.x, If your project was created with Ice Builder for Visual Studio 6.x or 5.x, it will continue to work without any modifications.

If you are upgrading from Ice Builder for Visual Studio 4.x or earlier, you will need to first use the Ice Builder for Visual Studio 6.x extension to update your projects. See Upgrading your Projects from Ice Builder 4.x for more information.

Building Ice Builder for Visual Studio from Source

Build Requirements

  • Visual Studio 2026

Build Instructions

  1. Open the IceBuilder.sln solution file in Visual Studio 2026.
  2. Build the IceBuilder project.

After the build completes, the generated VSIX package will be located in:

  • IceBuilder\bin\Debug\IceBuilder.vsix, or
  • IceBuilder\bin\Release\IceBuilder.vsix

About

Configure Ice Builder for MSBuild from Visual Studio

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

32 stars

Watchers

10 watching

Forks

Packages

 
 
 

Contributors

Languages