Referencing .net6 projects

0
0

Hi,

Started a new Wisej 3 project and I would like to reference other projects (like external models, data access layer etc), targeting .net6, from the Wisej 3 project. But Visual Studio complains that the external projects are not compatible, since they are not targeting .NET Framework 4.8 as well. How can we overcome this? Are we obliged to have all our external references targeting 4.8? And all this just for the Designer? Is there some workaround?

Or am I missing something?

Best,

Alex

  • You must to post comments
0
0

In any case you should be able to resolve this with Conditional References. See here

https://markheath.net/post/csproj-conditional-references

Regards
Frank

  • You must to post comments
0
0

Hi Alex,

I hope you´re doing fine!
Can you please give me an example for a reference you´d like to add?

TIA
Frank

  • Alex Prinias
    Hi Frank, hope you are all doing fine! In my case I have a project targeting net6.0, with EntityFrameworkCore v. 6.0.6, let’s say ProjectA, defining a namespace ProjectA.Entities. I would like to reference this from my WiseJ project, which targets net48;net6.0. When I do so and I add a “using ProjectA.Entities”, I get an error that it cannot be found. If I remove the net48 from the WiseJ project, it does not complain any more. But then I cannot run the designer. Alex
  • Frank (ITG)
    Hi Alex, another option is either conditional compilation (using preprocesser directives like ifdef etc.) or create your .NET6 only code in a partial class that is conditionally referenced in. Regards, Frank
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.