The Building Coder Samples 2025

I migrated The Building Coder samples to Revit 2025:

Compilation Environment

Before starting with the migration per se, I installed Revit 2025 and ensured that my compilation environment is up to date:

Next, I recompiled The Building Coder samples for Revit 2024 and eliminated all remaining deprecated API usage to ensure zero errors and zero warnings, creating a final release 2024.0.153.1 for that.

.NET Upgrade Assistant

I used the .NET Upgrade Assistant to move from the .NET Framework 4.8 to .NET Core 8:

.NET Upgrade Assistant

.NET Upgrade Assistant

Upgrade assistant target

Upgrade assistant target

Upgrade assistant components

Upgrade assistant components

Upgrade assistant result

Upgrade assistant result

Revit API Assemblies

The .NET Upgrade Assistant successfully upgraded almost everything.

However, the seven Revit 2024 API assemblies that we reference in this project cannot be upgraded, since they are hardwired to the .NET Framework 4.8:

They need to be manually redefined to use the Revit 2025 API assemblies instead.

Errors and Warnings

With the new Revit API assembly references in place, the first compilation attempt produced 12 errors and 2 warnings.

Most errors and the two warnings are trivial to fix:

The remaining three errors in the module CmdDeleteMacros.cs are due to the removal of document-level macros in Revit 2025 and are equally easily eliminated by commenting out the code section causing them:

After removing the TaskDialog ambiguity, comparison of Parameter.GUID property with null and support for document-level macros, The Building Coder samples compile for Revit 2025 with zero errors and zero warnings.

Conclusion

Next, I updated BcSamples.txt with the new binary output path /bin/Debug/net8.0-windows.

The result is published as The Building Coder samples release 2025.0.153.0

The detailed migration steps taken are listed in the comparison with the preceding release

I have not tested the result yet, since I am still in the process of installing the Revit SDK samples and setting up the RvtSamples external application that I use to load both the SDK and The Building Coder samples.

Good luck, have fun and much success with your own migrations!

Stay tuned for further news.