CAD/BIM
Revit 2027 is installed, but your add-in is missing from the ribbon – or Revit reports at start-up that it cannot be loaded. The reason is almost always the same: Revit 2027 runs on .NET 10, and your add-in was built for .NET 8 or .NET Framework.
How a Revit add-in is structured
A Revit add-in is a .NET DLL with at least one class implementing IExternalCommand (a command) or IExternalApplication (start-up and shutdown, for example for the ribbon). Which DLL and which class Revit should load is stated in a small XML file with the extension .addin, the manifest. Every change to the model needs a Revit transaction:
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
[Transaction(TransactionMode.Manual)]
public class SetComment : IExternalCommand
{
public Result Execute(ExternalCommandData commandData, ref string message,
ElementSet elements)
{
var uidoc = commandData.Application.ActiveUIDocument;
var doc = uidoc.Document;
// Every change to the model needs a Revit transaction
using (var t = new Transaction(doc, "Set comment"))
{
t.Start();
foreach (var id in uidoc.Selection.GetElementIds())
{
var parameter = doc.GetElement(id)
.get_Parameter(BuiltInParameter.ALL_MODEL_INSTANCE_COMMENTS);
if (parameter != null && !parameter.IsReadOnly)
{
parameter.Set("checked");
}
}
t.Commit();
}
return Result.Succeeded;
}
}
The command sets the comment on all selected elements. With the attribute TransactionMode.Manual the add-in manages its transactions itself. Without Commit, Revit rolls back the changes when the using block is left.
What changes with Revit 2027
Revit 2024 and earlier run on .NET Framework 4.8, Revit 2025 and 2026 on .NET 8. Revit 2027 runs on .NET 10, and according to Autodesk all add-ins must be built with the .NET 10 SDK. Microsoft ends support for .NET 8 on 10 November 2026. Autodesk has therefore announced that Revit 2025 and 2026 will also move to .NET 10 and has asked developers to test their add-ins against it.
According to the Autodesk developer blog post on the Revit 2027 SDK, there are further changes:
- New locations: Revit no longer looks for all-user add-ins under
C:\ProgramData\Autodesk\Revit\Addins\2027but underC:\Program Files\Autodesk\Revit\Addins\2027. The per-user folder still works.Application.AllUsersAddinsLocationalso returns a different value. - Isolation: since Revit 2026 an add-in can get its own load context in the manifest under
ManifestSettingswithUseRevitContextandContextName. Revit 2027 addsPublicAssemblies,DependenciesandUseAllContextsForDependencyResolutionso that add-ins can refer to each other explicitly. - Changed API:
CloudRegionUSandCloudRegionEMEAare replaced byModelPathUtils.GetAllCloudRegions(). Among the deprecated or removed items Autodesk lists AXM import, members ofMechanical.Zone, legacy rebar creation methods and severalEnergyDataSettingsproperties.
Migrating in four steps
Step 1: the project file. Create a new project file in SDK format. If Revit 2024 and 2027 are to be served from one code base, the SDK builds both versions one after the other:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- One code base, two builds: Revit 2024 and Revit 2027 -->
<TargetFrameworks>net48;net10.0-windows</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net48'">
<RevitPath>C:\Program Files\Autodesk\Revit 2024\</RevitPath>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0-windows'">
<RevitPath>C:\Program Files\Autodesk\Revit 2027\</RevitPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="RevitAPI">
<HintPath>$(RevitPath)RevitAPI.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="RevitAPIUI">
<HintPath>$(RevitPath)RevitAPIUI.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
</Project>
For Revit 2025 and 2026 you can add a further target if needed. Autodesk also recommends a global.json that pins the .NET 10 SDK, and Visual Studio 2026 as the development environment.
Step 2: build and work through the messages. Warning CA1416 goes away with the line [assembly: SupportedOSPlatform("windows")], which Autodesk itself suggests for the SDK samples. After that come the places where you use removed or changed parts of the API.
Step 3: the .NET 10 pitfalls. What applies to AutoCAD applies here too: BinaryFormatter always throws an exception, code page 1252 requires registering CodePagesEncodingProvider, and Process.Start only opens files with UseShellExecute = true. This particularly affects add-ins that read Excel or CSV files.
Step 4: deploy and test. Adapt your installer to the new locations and test your add-in in Revit 2027 together with the other add-ins your users have installed. Especially with shared libraries, only that test shows whether the isolation works as intended.
Typical mistakes
- The add-in is built for .NET 8 and dropped into Revit 2027. It does not load.
- The installer still writes the manifest to
ProgramData. Revit 2027 no longer looks there. UseWPFandUseWindowsFormsare missing from the project file although the user interface needs both.- The Revit DLLs are copied to the output folder with
Privateset totrue. - Pressing Esc during selection throws
Autodesk.Revit.Exceptions.OperationCanceledException. Catching the exception of the same name fromSystemreports a cancellation as an error. - Two add-ins ship the same library in different versions, and nobody has tested the combination.
How we help
- Training: our “Revit .NET API with C#” course works with Revit 2027 and .NET 10.
- Revit 2027 add-in check: we check your add-in for .NET 10, the new locations and isolation, and tell you what needs to be done.
- Project: we develop Revit add-ins – for example an export of laboratory project data to XML, JSON and PDF for a laboratory technology provider – and migrate existing ones. Arrange an initial consultation.
- The book: the .NET 10 pitfalls are described in detail in Ebi F. Eilber’s book “AutoCAD .NET API”, expected in 2027.
Sources: Autodesk Developer Blog, “Revit 2027 SDK: .NET 10, API Changes and Additions” (10 April 2026) and “Call for Preview Testing: Revit 2026/2025 Migration to .NET 10” (29 April 2026); Ebi F. Eilber, AutoCAD .NET API (book, expected 2027)
