I got an exception in the Visual Designer after adding a .net6 project dependency.
Hi Alaa,
Thanks for your reply!
The conditional compilation approach needs to add a lot of additional code as I did in the attached example.
The addition of a reference to a separate branch is not useful. I can not use the code from the external library in this case in a WiseJ form. Or am I wrong? Can you give me an example?
Best regards,
Yaroslav
Hi Bernhard, Hi Yaroslav,
You can go with the Shared Project approach or include the .NET6 projects as part of the .NET6 dependency branch!
It can be done relatively easily on the project level with the new SDK Project Format too!
As an example:
<ItemGroup Condition="'$(TargetFramework.TrimEnd(`0123456789`))'!='net'">
<ProjectReference Include="..\ClassLibrary1\ClassLibrary1.csproj" />
</ItemGroup>
This way you can still have the NET48 dependency for the designer and continue to work on your project with no issues!
It’s a different take (and a much better one) on the conditional compilation approach!
HTH,
Alaa
Hi Frank,
Hi Yarslav,
we have the same problem. Our solution is to always ensure that we are using the designer using the .net 4.8 target but code everything else on the .net 6 target. Most of our .net 6 code is guarded by conditional compilation to ensure that the library is still able to compile on .net 4.6 and ensure that our controls can be used within the designer. This is a very annoying developer experience.
We are really looking forward for WiseJ designer support for .net 6 and 7. We also opened a ticket 5 months ago: https://wisej.com/support/question/drop-net-4-8-dependency
best regards
Bernhard
Hi Yaroslav,
you should add the reference to the net6.0 branch instead of the net48 branch.
Best regards
Frank
Please login first to submit.