.NET Core which version to use?

Hi,

So Rhino .NET changed from .NET framework to .net core.

I am trying to migrate my old plugins. All visual studio projects has only .NET framework.
I would like to install .NET Core. Which version should I use?

Would the .NET Core 8.0 would be ok, or must I use 7.0?

It would be great if someone could share experience how to create a grasshopper plugin for .NET CORE 7.0 from scratch.

I installed somehow new template above, now during compilation I get this:

1 Like

Rhino 8 currently uses .NET 7.0.111, so best to get .NET 7.0.

You can ignore the warning for the potential incompatibility.

1 Like

I just installed 7.0

Still there are these reflection errors.

How to get rid of them?
I have no clue what they mean…

Change Build + IntelliSense to Build Only.

edit: Also, you probably need to make sure you don’t have automatic assembly info enabled.
edit2: In your csproj file:

    <GenerateAssemblyInfo>False</GenerateAssemblyInfo>
    <EnableDefaultItems>False</EnableDefaultItems>

in the first <PropertyGroup> tag.

1 Like

Switched to Build Only.

Where the automatic assembly option could be enabled?

I added the info for assembly stuff in my previous message.

You can silence NU1701 warning by adding this in the first <PropertyGroup> tag:

<NoWarn>NU1701</NoWarn>
1 Like

By adding this, build worked:

<GenerateAssemblyInfo>False</GenerateAssemblyInfo>

The other flag somehow did not allow to add any C# file, so I do not use it.

Another question:
By default visual studio builds net48 and net7.0 projects, should I skip net48 and build only 7.0?

If you target Rhino 8 and later only for the project probably easiest to target only .NET 7.

1 Like