VolocyNazad.Revit.Sdk 1.0.45

<Sdk Name="VolocyNazad.Revit.Sdk" Version="1.0.45" />
                    
For projects that support Sdk, copy this XML node into the project file to reference the package.
#:sdk VolocyNazad.Revit.Sdk@1.0.45
                    
#:sdk directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.

Revit.Sdk

Revit 2021-2027 License: MIT VolocyNazad

An MSBuild SDK for developing Autodesk Revit extensions. It streamlines plugin project setup, selects the target platform for a given Revit version, and automates common build operations.

Features

  • support for Revit 2021–2027;
  • selecting the target Revit version via the build configuration name;
  • automatic selection of net48 for Revit before 2024 and net8.0-windows for Revit 2025–2026;
  • conditional compilation constants for different API versions: VERSION_2025, IS2025, BEFORE2026, AFTER2024, and others;
  • excluding RevitAPI.dll and RevitAPIUI.dll from the output directory;
  • launching the installed Revit during debugging;
  • generating an .addin manifest for external applications and commands;
  • optional dependency merging via ILRepack.

Usage

Specify the SDK package and its version in the project file:

<Project Sdk="VolocyNazad.Revit.Sdk/VERSION">
  <PropertyGroup>
    <Configurations>Debug_2024;Debug_2025;Release_2024;Release_2025</Configurations>
  </PropertyGroup>
</Project>

Replace VERSION with the package version you need. The configuration name must follow the <Debug|Release>_<year> format, e.g. Debug_2025. The SDK extracts the year after the _ character and uses it as the target Revit version.

Manifest generation

To generate .addin on build, enable GenerateAddinOnBuild and declare the extension classes:

<PropertyGroup>
  <GenerateAddinOnBuild>true</GenerateAddinOnBuild>
  <AddinOutputDirectory>$(MSBuildProjectDirectory)\output</AddinOutputDirectory>
  <Authors>YOUR_VENDOR_ID</Authors>
</PropertyGroup>

<ItemGroup>
  <ExternalApplication Include="My application">
    <Name>My application</Name>
    <FullClassName>MyPlugin.Application</FullClassName>
  </ExternalApplication>

  <ExternalCommand Include="My command">
    <Name>My command</Name>
    <FullClassName>MyPlugin.Commands.MyCommand</FullClassName>
    <Text>Run command</Text>
    <VisibilityMode>AlwaysVisible</VisibilityMode>
  </ExternalCommand>
</ItemGroup>

The Authors value is used as VendorId and VendorDescription in the generated manifest.

After the build, the manifest will be created at:

<AddinOutputDirectory>/addins/<RevitVersion>/<AssemblyName>.addin

By default, AddinOutputDirectory points to the project directory.

Debugging in Revit

Add the LaunchRevit property to launch Revit together with the debugger:

<PropertyGroup>
  <LaunchRevit>true</LaunchRevit>
</PropertyGroup>

By default, the SDK launches C:\Program Files\Autodesk\Revit <year>\Revit.exe with the /language ENG argument. The path and arguments can be overridden via the StartProgram and StartArguments properties.

Dependency merging

To merge libraries into the plugin assembly, add the ILRepack package and enable repacking:

<PropertyGroup>
  <IsRepackable>true</IsRepackable>
  <RepackBinariesExcludes>RevitAPI.dll;RevitAPIUI.dll</RepackBinariesExcludes>
</PropertyGroup>

<ItemGroup>
  <PackageReference Include="ILRepack" Version="VERSION" PrivateAssets="all" />
</ItemGroup>

Building the SDK

dotnet build Toolkit.Revit.Sdk.slnx -p:Platform=x64

The NuGet package is created automatically in the artifacts directory.

License

The project is distributed under the MIT license.

Development documentation

Contributing

Read CONTRIBUTING.md before submitting changes.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.45 102 9/14/2026
1.0.44 321 9/3/2026
1.0.43 313 7/24/2026
1.0.42 160 6/22/2026
1.0.40 122 6/22/2026
1.0.39 120 6/21/2026