Targeting .NET 4.5?

I am developing an internal plugin in Visual Studio 2017, and I have a need for some external libraries that are not available in .NET 4.0. Is it possible/advisable to change my project to target .NET 4.5 so that I can leverage these libraries, and how would I do so without breaking the project/plugin for my users?

I am targeting a large number of internal users, but they are all running Rhino 5, soon to be on Windows 10 (though we still currently have some Win 7 holdovers).


You can run the _TestDotNetMessages command to toggle whether Rhino shows .NET SDK info on startup (you’ll have to restart obviously for it to take effect). The first line it prints in the command history is the loaded .NET version, which is .NET Runtime Version = 4.0.30319.42000 on my Rhino5-64bit. If you’re going to reference assemblies build against newer versions you will probably run into trouble.

I don’t remember whether there’s a way to make Rhino5 load .NET 4.5, presuming it is available. @stevebaer do you?

That runtime version number is actually for .NET 4.6 or higher

Rhino 5 will load 4.5 if it is available.

Rhino 5 installs .NET 4.0 so you would need to write an installer that checks or installs the runtime version you need.

1 Like