cad.net WPF MarkupExtension interface reference problem, System.Xaml.dll reference problem

Unfortunately, if you type WPF on cad, you will inevitably need to set the project to a .NET standard project.

Because WPF needs to judge different net versions, and the traditional .NET Framework cannot judge ...

And happily, you don't need to change the code, you only need to learn to write .csporj files ... this is equivalent to writing an xml ...

 

And why should we judge the net version? Because there is a version difference in writing WPF, this version difference is the low version of net3.5 and the high version of net4.0,

Because net4.0 wrote a lot of very rich functions ... 

The WPF MarkupExtension interface has a difference between net3.5 and net4.0. This difference needs to be resolved by referencing a System.Xaml.dll in net4.0 (or above).

 

We generally write references here

 

But because you want to judge the version of net, you need to write it here:

 

In this way, dll can be loaded separately on different net versions ...

 

Miya

Guess you like

Origin www.cnblogs.com/JJBox/p/12677496.html