Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8565

Type is defined in an assembly that is not referenced (Visual Studio with RhinoCommon) [Solved]

$
0
0

@Ivan1 wrote:

Hello,

I have been trying to compile a visual studio project that contains a lot of Rhino Plugins lately and while I had a lot of errors at the beginning (around 400 compiler errors),

I managed to reduce almost all the errors. Mostly they were of the following type: "some external namespace" couldn't be found. I then installed all the necessary nuget packages and visual studio extensions through the Visual Studio Gallery online (QuickGraph, Newtonsoft.Json, Eto.Forms, etc. for example) ...

...and now I am down to only having one error which I can't handle myself.

The compiler error I get is the following:

CS0012 - The type "DialogResult" is defined in an assembly that is not referenced. You must add a reference to assembly "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

It appears to me that the standard Windows.Forms Dialog namespaces are colliding with the Rhino.UI. Here is the code: The second line is underlined red.

var dlg = new Rhino.UI.OpenFileDialog { Title = "select file", DefaultExt = "json" };
dlg.ShowDialog();

I installed the RhinoCommon templates v5, I even added RhinoCommon.dll manually.
I have Rhino 5 for Windows installed as well. I am using Visual Studio 2015 with Xamarin (because we want cross platform GUI functionality).

I hope someone can help me fix this very Windows-specific issue (as it appears to be).

Ivan

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 8565

Trending Articles