WPF and NET from 3.5 to 4 multi-targeting

I have a WPF 3.5 control library that works with a WPF 3.5 application. Now I would like to create a version of WPF 4 application and use the same library (source code) for both versions 3.5 and 4 of the application.

What are my options here? What are the common ways (if any) to handle this type of multi-targeting?

Should I support two different projects for the versions of the WPF 3.5 and WPF 4 library with reference to the same files / source code (with manual updates for both projects)? Or should I only support WPF 3.5, and in my WPF 4 link is the WPF 3.5 binary library?

I tried the latter and found out that this might work with some “remapping app.config”, but I would not be able to directly access the source code of the WPF 3.5 library from the WPF 4 project.

Any pointers are appreciated.

EDIT: The NET 3.5 project / solution must be supported in VS2008, while the NET 4 solution is supported in VS2010.

+3
source share
2 answers

Just one solution with two projects:
Project 1: your 3.5 WPF Management Library project.
Project 2: Your version of WPF 4.0 for targeting 4.0 applications.

There is nothing wrong with this, it is very simple to do, and you can have direct links from project 4.0 to 3.5.

alt text

+2
source

. , .

, :

  • / ( VS2010 VS2008)
  • Mantain your lib VS2008, . : 4.0 profile "plain" 4.0.
0

Source: https://habr.com/ru/post/1778931/


All Articles