Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

the type from assembly is built with an older version of blend sdk and is not supported in a windows presentation foundation 4 project

I created a WPF project in VS 2013. After upgrading to VS 2015, this error showed in the designer on types derived from the Blend SDK:

the type from assembly is built with an older version of blend sdk and is not supported in a windows presentation foundation 4 project

like image 910
Domysee Avatar asked Aug 15 '15 10:08

Domysee


3 Answers

  1. Run Command Prompt as Administrator

  2. Change Directory to Blend SDK: cd C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.5\Libraries\

  3. Register DLL: gacutil -i System.Windows.Interactivity.dll

  4. Restart Visual Studio

Reference: https://connect.microsoft.com/VisualStudio/feedback/details/755407/xaml-designer-will-not-display-when-using-blend-sdk-behaviors

like image 97
Lücks Avatar answered Nov 18 '22 09:11

Lücks


You can resolve this issue by manually changing the version numbers in .sln and .csproj files.

In .csproj and .csproj.user change ToolsVersion to your current Visual Studio version. VS 2013 is version 12, VS 2015 is version 14.

In .sln change VisualStudioVersion to the current version, you can find it in the About window.

Also change Microsoft Visual Studio Solution File, Format Version to your current version (eg 14.00, 12.00)

Note: This only works for built-in assemblies. If external dependencies (like Prism) cause this error, you'd have to recompile them using the new Blend SDK. You could also try to update the dependency, maybe the newest version is already compiled using the latest Blend SDK.

like image 45
Domysee Avatar answered Nov 18 '22 09:11

Domysee


None of the other answers here worked for me. What finally solved it was deleting the .NET v4.0 version of the file in the SDK folder:

C:\Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries\

I am referencing the v4.5 file via NuGet, but it seems that the designer was finding the file in the above folder. The v4.0 file was not registered in the GAC.

like image 8
Terrence Avatar answered Nov 18 '22 09:11

Terrence