[Share] Resource to help package authors upgrade to .NET8 for Revit 2025

Hi Developer,
Aa you know is Revit 2025 Released, I just want to share the way to setup Zero Touch Node project to match with .NET 8 and Dynamo Revit .

Configuration & new SDK Style :slight_smile:

<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>net8.0</TargetFramework>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
        <RevitVersion>2025</RevitVersion>
        <DynVersion>3.0</DynVersion>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="Chuongmep.Revit.Api.RevitAPI" Version="$(RevitVersion).*">
            <ExcludeAssets>runtime</ExcludeAssets>
        </PackageReference>
        <PackageReference Include="Chuongmep.Revit.Api.RevitAPIUI" Version="$(RevitVersion).*">
            <ExcludeAssets>runtime</ExcludeAssets>
        </PackageReference>
        <PackageReference Include="DynamoVisualProgramming.Revit" Version="$(DynVersion).*">
            <ExcludeAssets>runtime</ExcludeAssets>
        </PackageReference>
        <PackageReference Include="DynamoVisualProgramming.Core" Version="$(DynVersion).*">
            <ExcludeAssets>runtime</ExcludeAssets>
        </PackageReference>
        <PackageReference Include="DynamoVisualProgramming.DynamoCoreNodes" Version="$(DynVersion).*">
            <ExcludeAssets>runtime</ExcludeAssets>
        </PackageReference>
    </ItemGroup>
</Project>

Function Example :

public static class Hello
{
    public static string SayHello(string name)
    {
        return $"Hello, {name}!";
    }
    public static double Add(double a, double b)
    {
        return a + b;
    }
    public static Document GetDBDocument()
    {
         var doc = DocumentManager.Instance.CurrentDBDocument;
         return doc;
    }
}

Open Source : GitHub - chuongmep/DynamoRevit2025PackageDemo: demo how to update your package to dynamo revit 2025

I hope you guys keep upgrade for your package.

Hot Link :

Regard !

5 Likes

Might I propose a new thread title?

I think saying something like:

[Share] Resource to help package authors upgrade to .NET8 Framework for Revit 2025

“A lot of packages dead” seems to be panic-inducing and possibly not completely accurate.

6 Likes

Hofix for now :melting_face:

2 Likes

I’ve personally enjoyed using this GIF a lot lately.
NinjaTurtleFireGIF

5 Likes

Thus far I have had this reaction every time I have seen it.

Funny to see how you and John react totally different on the same thing :grinning:

1 Like

There must always be balance in the Dynamo universe…both sides of the same coin… a light side and a dark side…

But mostly I just laugh at that gif no matter who posts it… Does not remind me of the TMNT that I grew up with…

3 Likes

Does polymorphism affect programmers as well?

the-simpsons-ralph-wiggum

4 Likes