简体   繁体   English

针对.net 4.0的WPF应用中的Microsoft.Expression.Blend

[英]Microsoft.Expression.Blend in a WPF app targeting .net 4.0

I have a wpf app targeting .NET 4.0 I am using the Microsoft.Expression.Blend.dll 我有一个针对.NET 4.0的wpf应用程序我正在使用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. 我可以找到目标.net 4.0的Microsoft.Expression.Interactions版本,但不能混合。

I have replicated your problem with a new WPF project targeting .NET 4.0 both under VS2012 and VS2013. 我已经在VS2012和VS2013下使用针对.NET 4.0的新WPF项目复制了您的问题。

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. 这可能不是您希望的答案,但从我所看到的情况来看,Microsoft.Expression.Blend.dll不是Microsoft Expression SDK的一部分,因此未获得重新分发许可。 As such, I don't think what you're trying to do is supported by Microsoft. 因此,我不认为您正在尝试做的事情是微软支持的。 It may, however, work under .NET 4.5 ... 但是,它可以在.NET 4.5下运行...

The Microsoft Expression SDK for .NET 4.0 is located under "Program Files (x86)\\Microsoft SDKs\\Expression\\Blend.NETFramework\\v4.0". 用于.NET 4.0的Microsoft Expression SDK位于“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. 根据Redist自述文件,库,模板和“程序文件(x86)\\ MSBuild \\ Microsoft \\ Expression \\ Blend.NETFramework \\ v4.0 \\”下的文件被许可用于重新分发。 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. Microsoft.Expression.Interactions.dll位于Libaries文件夹下,这意味着它获得了重新分发许可,这也解释了它的工作原理。

Unfortunately, Microsoft.Expression.Blend.dll is not located in any of these folders. 不幸的是,Microsoft.Expression.Blend.dll不在任何这些文件夹中。 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. 它位于“Program Files(x86)\\ Microsoft Visual Studio 12.0 \\ Blend \\”中,它向我表明它是Blend for VS2013(应用程序,而不是SDK)的一部分,它主要基于.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. 由于这个dll依赖于.NET 4.5程序集,因此我不认为它在面向.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. 您没有解释您尝试使用哪种功能,但由于它不是Express Blend SDK的一部分,因此您对.NET 4.0的使用并不适用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM