picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.52k stars 319 forks source link

Visual Studio Preview Plugin fails to render dependent forms #2642

Open ccurtis0 opened 2 months ago

ccurtis0 commented 2 months ago

This report is for "Eto.Forms Templates and Previewer" for Visual Studio Marketplace - https://marketplace.visualstudio.com/items?itemName=CurtisWensley.EtoFormsVisualStudioAddin That site doesn't allow me to post in the Q&A section so I hope posting here is acceptable.

Here is my issue: I created a "widget" based on an Eto.Forms.Panel in a .eto.cs file. I can view this form in the preview area.

In another .eto.cs file I then created a second Eto.Forms.Panel widget that uses the first one as part of a StackLayout. This all works fine when I run the program, but in Visual Studio the bottom of the preview window shows a black-on-red error message that says: "A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)" when I declare the variable.

image

When I then try to put the variable in a Layout, it says: "Compile error: The type 'Panel' is defined in an assembly that is not referenced. You must add a reference to assembly 'Eto, Version=2.7.0.0, Culture=neutral, PublicKeyToken=...'. // The best overloaded Add method 'Collection.Add(StackLayoutItem)' for the collection initializer has some invalid arguments. // Argument 1: cannot convert from '' to 'Eto.Forms.StackLayoutItem'"

image

I found one resource online suggesting signing the assembly to give it a strong name and I enabled this option but to no effect. I also tried to "using static" the type with the same non-result. Should this work or what am I missing to make it render with my custom widget in the preview?

Specifications