VisualStudio RhinoCommon and .NET


#1

Hi.

Decided to take the step from python scripting to visual studio, but I’m stuck with this error regarding the version of .NET. I’m following this guide http://developer.rhino3d.com/guides/rhinocommon/your-first-plugin-windows/

To resolve this, install the SDK or Targeting Pack for this framework version or retarget 
your application to a version of the framework for which you have the SDK or Targeting 
Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) 
and will be used in place of reference assemblies. 
Therefore your assembly may not be correctly targeted for the framework you intend.	HelloRhinoCommon

I’ve tried to install .NET framework 4.5.2 and 4.7 but to no avail.


#2

Got this question when re-opening the project,

image

The first option did not work. Can’t seem to make it work whatever I do.


(Giulio Piacentino) #3

I think you can go ahead and download the targeting pack.
Other users might not have 4.6.1, unlike you.

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com


#5

Hi

If I choose that download option, I’m put on this website: https://www.microsoft.com/net/download/visual-studio-sdks where I can download the 4.6.1. I tried choosing the developer pack instead of just the runtime, but I don’t know what I’m doing here.

Anyhow. After installing 4.6.1 nothing changes.

Here is what I do from the start according to that tutorial, but I can’t get the boilerplate to compile whatever .net framwork I choose.


#6

Hi, solved this I think. It was insanely hidden and strange procedure.

  1. Right click my “project”, and choose unload
  2. File - Open - File - Open the .csproj file in your project
  3. There at the top there is reference to framework version 4.5 hardcoded since the boilerplate. I changed it to 4.7.1 which I had installed.

Now it works. Sick


(Luis Fraguada) #7

You can do that from the Project Properties > Application page:


#8

How do I find Project Properties?


(Luis Fraguada) #9

In the Visual Studio menu Project -> ProjectName Properties.
or
Right-click on the Project, Select Properties from the drop down.


or
You can double click Properties in the solution explorer.


#10

Thanks! Easy peasy. Seems I took the long route. :smiley: