I am developing Revit addin in Vidual Studio in c++/cli as class library.
Before moving to .net platform everyhing was working fine. But in .net Windows form design views doesnt work. Though when I add form element by code. It compiles and works.
The error is:
The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: ModelessForm --- The base class 'System.Windows.Forms.Form' could not be loaded. Ensure the assembly has been referenced and that all projects have been built.
Regarding to Windows forms I aded lines below to .vcxproj file
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<TargetFramework>net8.0-windows</TargetFramework>
<ItemGroup>
<FrameworkReference Include="Microsoft.WindowsDesktop.App" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App.WPF" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" />
</ItemGroup>
Instances of this error (1)
- Hide Call Stack
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
This is form design view window.
The Visual Studio project file is at link below.
https://sendgb.com/U9ePtjK7T5x
Does snybody have any idea how i can resolve that problem?