All Discussions Tagged 'custom' - Grasshopper2024-03-28T20:02:19Zhttps://www.grasshopper3d.com/group/weaverbird/forum/topic/listForTag?tag=custom&feed=yes&xn_auth=noNancyFX module causes an exception in Weaverbird !tag:www.grasshopper3d.com,2019-05-31:2985220:Topic:19890002019-05-31T08:30:43.404ZArefin Mohiuddinhttps://www.grasshopper3d.com/profile/ArefinMohiuddin
<p>I have written my own GH plugin for Rhino 6. I want to use a nancy self hosting server. On installing the NuGet package and using this code - </p>
<p></p>
<code><br />
private string _url = "http://localhost";<br />
private int _port = 12345;<br />
private NancyHost _nancy;<br />
<br />
public override void AddedToDocument(GH_Document document){<br />
var uri = new Uri($"{_url}:{_port}/");<br />
_nancy = new NancyHost(uri);<br />
_nancy.Start();<br />
base.AddedToDocument(document);<br />
}<br />
</code><br />
<br />
<p>I am getting the following…</p>
<p>I have written my own GH plugin for Rhino 6. I want to use a nancy self hosting server. On installing the NuGet package and using this code - </p>
<p></p>
<code><br />
private string _url = "http://localhost";<br />
private int _port = 12345;<br />
private NancyHost _nancy;<br />
<br />
public override void AddedToDocument(GH_Document document){<br />
var uri = new Uri($"{_url}:{_port}/");<br />
_nancy = new NancyHost(uri);<br />
_nancy.Start();<br />
base.AddedToDocument(document);<br />
}<br />
</code><br />
<br />
<p>I am getting the following exception</p>
<br />
<code>System.TypeLoadException<br />
HResult=0x80131522<br />
Message=Method 'Equals' in type 'Weaverbird.Geometry.IPoints.PointList`2' from assembly 'WeaverBird.Core, Version=0.9.0.1, Culture=neutral, PublicKeyToken=7441991d7d373a63' does not have an implementation.<br />
Source=mscorlib<br />
StackTrace:<br />
at System.RuntimeTypeHandle.GetDeclaringType(RuntimeType type)<br />
at System.RuntimeType.RuntimeTypeCache.GetEnclosingType()<br />
at Nancy.TinyIoc.TinyIoCContainer.b__13(Type type)<br />
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()<br />
at Nancy.TinyIoc.TinyIoCContainer.AutoRegisterInternal(IEnumerable`1 assemblies, DuplicateImplementationActions duplicateAction, Func`2 registrationPredicate)<br />
at Nancy.DefaultNancyBootstrapper.AutoRegister(TinyIoCContainer container, IEnumerable`1 ignoredAssemblies)<br />
at Nancy.Bootstrapper.NancyBootstrapperBase`1.Initialise()<br />
at Nancy.Hosting.Self.NancyHost..ctor(INancyBootstrapper bootstrapper, HostConfiguration configuration, Uri[] baseUris)<br />
at DStar.DStarRemote.AddedToDocument(GH_Document document) in C:\Users\sr-02502\Documents\GitHub\DStar\DStarRemote.cs:line 53<br />
at Grasshopper.Kernel.GH_Document.AddObject(IGH_DocumentObject docObject, Boolean update, Int32 index)<br />
at Grasshopper.GUI.Canvas.GH_Canvas.InstantiateNewObject(IGH_DocumentObject obj, String init_code, PointF at, Boolean update)<br />
</code><br />
<br />
Any idea why this is happening? I am flabbergasted. <br/>
Help appreciated ! Thanks.