开发者

How do I upgrade WPF apps to Framework 4?

开发者 https://www.devze.com 2023-01-04 08:32 出处:网络
How am I supposed to upgrade my WPF applications to the Framework 4? Every time I try to change the target framework to version 4, it keeps telling me that WindowsBase, PresentationCore and Presentati

How am I supposed to upgrade my WPF applications to the Framework 4? Every time I try to change the target framework to version 4, it keeps telling me that WindowsBase, PresentationCore and PresentationFramework aren't in the targeted framework.

This seems to preclude me from using .NET 4, so clearly I'm missing something major here.

Here are the steps I'm taking

1) Open VS2008 solution using VS2010. 2) Let it do the upgr开发者_如何学Pythonade for me. 3) Attempt to change the target framework of the WPF project to .Net 4 Client Profile. 4) Error message pops up


You may have to remove and re-add the references to those assemblies in Visual Studio. When you add the references, make sure that you are pulling them from the GAC and not using file references.

The problem might be that you are referencing the old versions explicitly and you have to re-add the reference to retarget it to the new framework version. I would expect Visual Studio would do this for you automatically, but you may have to do it manually.


Turns out this is an issue with my machine, as other machines in our office can upgrade the project no problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消