Question

I have a wpf app targeting .NET 4.0 I am using the Microsoft.Expression.Blend.dll

Everytime I build I get several 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 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 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 make these warnings go away? I can find versions of for example Microsoft.Expression.Interactions that target .net 4.0, but not blend.

Was it helpful?

Solution

I have replicated your problem with a new WPF project targeting .NET 4.0 both under VS2012 and VS2013.

This is probably not the answer you're hoping for, but from what I can see, Microsoft.Expression.Blend.dll is not part of the Microsoft Expression SDK, and therefore is not licensed for redistribution. As such, I don't think what you're trying to do is supported by Microsoft. It may, however, work under .NET 4.5 ...

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

Unfortunately, Microsoft.Expression.Blend.dll is not located in any of these folders. It's located in "Program Files (x86)\Microsoft Visual Studio 12.0\Blend\", which indicates to me that it is part of Blend for VS2013 (the application, not the SDK), which is primarily based on .NET 4.5. Since this dll has dependencies on .NET 4.5 assemblies, I don't think it's ever going to work when targeting .NET 4.0.

I would suggest reconsidering your use of this assembly. You've not explained which functionality you're trying to use from it, but since it's not part of the Express Blend SDK, your use of it targeting .NET 4.0 is not intended to work.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top