Microsoft.Expression.Blend in a WPF Application for .net 4.0

I have a wpf application for .NET 4.0 I am using Microsoft.Expression.Blend.dll

Every time I build, I get a few warnings that look like this:

The primary reference "Microsoft.Expression.Blend, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86" could not be resolved because it has an indirect dependency on the .NET Framework assembly "Microsoft.Build.Engine, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which has a higher version "12.0.0.0" than the version "4.0.0.0" in the current target framework. 

Or that:

 The primary reference "Microsoft.Expression.Blend, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86" could not be resolved because it has an indirect dependency on the assembly "Microsoft.Expression.DesignHost, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0". 

What can I do to prevent these warnings from disappearing? I can find versions, for example, Microsoft.Expression.Interactions that target .net 4.0 but don't mix.

+6
source share
1 answer

I have replicated your problem with a new WPF project focused on .NET 4.0, both in VS2012 and VS2013.

This is probably not the answer you are hoping for, but from what I see, Microsoft.Expression.Blend.dll is not part of the Microsoft Expression SDK and therefore is not licensed for redistribution. Thus, I do not think that what you are trying to do is supported by Microsoft. However, it can work in .NET 4.5 ...

The Microsoft Expression SDK for .NET 4.0 is located under "Program Files (x86) \ Microsoft SDK \ Expression \ Blend.NETFramework \ v4.0". According to the Redist readme, files for Libraries, Templates, and "Program Files (x86) \ MSBuild \ Microsoft \ Expression \ Blend.NETFramework \ v4.0 \" are licensed for redistribution. Microsoft.Expression.Interactions.dll is located in the Libaries folder, which means that it is licensed for redistribution, and also explains why it works.

Unfortunately, Microsoft.Expression.Blend.dll is not located in any of these folders. It is located in "Program Files (x86) \ Microsoft Visual Studio 12.0 \ Blend \", which indicates that it is part of Blend for VS2013 (an application, not an SDK), which is mainly based on .NET 4.5. Since this dll has dependencies on .NET 4.5 builds, I don't think it ever worked when configuring .NET 4.0.

I would suggest revising your use of this assembly. You did not explain what features you are trying to use from it, but since it is not part of the Express Blend SDK, using it using .NET 4.0 is not intended to work.

+4
source

All Articles