GetWinFXPath task could not be loaded
I recently ran into this issue and couldn't find much info on it so I thought i'd post it in case someone else had the same problem. While trying to build my project(targeting .NET 3.5/C#) in Visual Studio I got the following error:
The "Microsoft.Build.Tasks.Windows.GetWinFXPath" task could not be loaded from the assembly PresentationBuildTasks, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Could not load file or assembly 'PresentationBuildTasks, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Confirm that thedeclaration is correct, and that the assembly and all its dependencies are available.
There were no other errors listed and it worked the day before. A little digging and I found that .NET 3.0 had somehow been disabled. To fix it I just had to re-enable it. These steps apply to Windows Vista, but i'm sure would work in Windows XP as well, but by going a different route.
- Go to your Control Panel and click "Programs and Features"
- Click "Turn Windows features on or off" on the left panel(Kicks in UAC if it's enabled)
- Find "Microsoft .NET Framework 3.0" and expand it
- Check off at least XPS Viewer and click "OK".
- Close P&F and CP. If Visual Studio or Visual Web Developer is open, close and reopen it, and reubild your project. The error should disappear.

2 comment(s)
Leave a reply