Visual Studio For Mac for Rhino Common, but having references issue

Hello im trying to learn Rhino Common development, so ive tried to follow “Your first plugin (Mac)” in the Rhino Common Guides, but visual studio keeps showing these problems as below. although there is no intellisense, etc, the project does build without errors, and least by following the guide, it runs as a command, properly. is there some configuration i can look into? im using the RhinoVisualStudioExtension for mac, on a m1 machine, and i do not have net 4.8. i wondered if it was because i did not have net4.8, but it seems like its not available on mac? I would appreciate any guidance, and if needed will provide more info.

i find it quite perplexing that not only Rhino Common cant be found, but System as well.

@curtisw can you advise?

im still stuck here haha.
just to be clear, by using the RhinoVisualStudioExtension wizard, i do not need to add any dependencies correct? and on mac do not need net4.8 on my machine since its somehow in the sdk under dependencies in the project? I have reinstalled multiple times and still nothing, maybe ill try the 2019 version. it showing that System is missing is what bothers me the most.

update: okay 2019 version has conflicts about dotnet sdks on m1. too bad.

so i got it to work by doing this:

commented out the RhinoCommon reference in the csproj and instead referenced the dll from the rhino installation.

seems to work so far during debug and all, but not sure if this is a correct way of setting a project.
@curtisw @Gijs could u give me any advice?

I recently bought a MacBookAir M2 and the same problem appeared.

I installed VisualStudio2022 as well as VisualStudio2019 and installed both mpacks and now I can get references correctly in 2022.

thanks that worked!

Hey @tkahng and @11159,

I’m glad you found a solution, but installing both 2019 and 2022 really shouldn’t be necessary. This could have been something to do with the version of .NET SDK installed, or even a bug in VS 2022.

It is normal for error squiggles to be shown until the nuget package restore is completed and a short amount of time has passed for VS to rescan the project. Building the project would also do it for you.

I have tried with the latest VS 2022 currently (17.4.2), and creating a new RhinoCommon project doesn’t appear to have any issues.

Hope this helps!

1 Like