C# Component Warning (CS1701)

Hi all,

I am developing a GH plugin and for now, I am referencing a C# class library assembled in VS, and this throws a warning message.

  1. Warning (CS1701): Assuming assembly reference ‘RhinoCommon, Version=6.35.21222.17000, Culture=neutral, PublicKeyToken=552281e97c755530’ matches ‘RhinoCommon, Version=7.11.21293.9001, Culture=neutral, PublicKeyToken=552281e97c755530’, you may need to supply runtime policy

I understand this has something to do with its version, but wonder C# component and library aren’t forward compatible? It says “you may need to supply runtime policy”, and how do I do this?

Thanks,

W

Hi,

I am just updating the question.

I am developing GH plugin with a class library set in VS2019. I used Nuget Package manager to reference Grasshopper and Rhinocommon DLLs, both the latest stable (7.12.21313.6341)

However, I am still getting this warning in the C# scripting component that references the DLL.

Warning (CS1702): Assuming assembly reference ‘RhinoCommon, Version=7.12.21313.6340, Culture=neutral, PublicKeyToken=552281e97c755530’ used by ‘AptEval_CL’ matches identity ‘RhinoCommon, Version=7.12.21313.6342, Culture=neutral, PublicKeyToken=552281e97c755530’ of ‘RhinoCommon’, you may need to supply runtime policy (line 0)

Below is the screengrab of the Visual Studio, I don’t know why the version of the reference from the package differs from that of the package. Also, I wonder if there is any way of preventing these warning messages in the first place. Why do the versions differ from each other? 6340, 6341, 6342???

Hi, I guess you can just ignore the warning. My suggestion is you should compile a simple test code and see if it runs. If the component is properly loaded and run, you can ignore the warning.

Thanks for the reply. It seems like it works regardless of the warning. If I hit the play button in the scripting component, the warning goes away but it later comes back in a random fashion. Hope this will be fixed in future updates.