DxfModel loading Windows.Forms
Axon
7/7/2023 11:48 AM
|
---|
Hello,
I'm encountering a problem when I try to instantiate a new DxfModel
(Could not load file or assembly 'System.Windows.Forms, Version=6.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
I didn't have this problem when I used the nugget package for the preliminary version with the license we bought. But now that we've imported the dll as an assembly I get this problem no matter which DxfVersion I provide to the constructor.
Is it normal that it's trying to access Windows.Forms ? And why was it working without any problem with the evaluation version ?
Kind Regards,
|
Wout
7/7/2023 12:05 PM
|
---|
Hi,
The Windows version of CadLib does not use nuget. If you're referencing CadLib through nuget, you're referencing the multi-platform version.
The windows version uses windows forms, the multi-platform does not. It sounds like you evaluated the multi-platform version (nuget), and then purchased the windows version (not nuget)?
- Wout
|
Wout
7/7/2023 12:11 PM
|
---|
For the Windows version of CadLib 6.0, make sure your Visual Studio project has the TargetFramework property set to net6.0-windows, otherwise the windows forms assemblies will not be available.
For console applications:
<OutputType>Exe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
For windows applications:
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
- Wout
|