I have a wpf project that I created in VS2012, but am now trying to hack in VS2010.
In the csproj file I removed the 'required version' stuff. I can open the project in VS2010, I can compile it too, but if I try to run it, I get the 'needs v4.5' message.
I tried removing all the references and adding them back in again: still compiles (so all the dependencies should be on my (XP) machine).
Where else should I be looking?
Check the <supportedRuntime>
element in your .config
file.
If it's set to <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
then it will be looking for .NET 4.5. (And, of course, this setting isn't used at all during compilation, which is why VS won't be issuing any warnings or errors about it when you compile)
You need to change the Target Framework
set in the Project properties.
If all else fails, then just create a new solution with a WPF application project and add all the cs files and everything else from your other solution and try then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With