Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changed framework version results in: Could not load file or assembly PresentationFramework?

I am working on WPF application, which was first targeted to 3.0 framework. When I tried to make it work on 4.0, I got following Exception.

System.IO.FileNotFoundException was unhandled Message: Could not load file or assembly 'PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

If I compile application using .Net 4.0 it is working fine. But 3.0 exes are not working with 4.0.

Thanks in advance.

like image 319
Pranit Kothari Avatar asked Nov 04 '22 22:11

Pranit Kothari


1 Answers

Try to remove the DLL reference to the PresentationFramework in your Visual Studio project, then retarget your application framework in the Project Properties, and then add PresentationFramework reference again.

like image 141
StuffHappens Avatar answered Nov 13 '22 03:11

StuffHappens