[英]Resolving MSBuild 4.0 warnings
I've upgraded a solution to use MSBuild 4.0. 我升级了一个使用MSBuild 4.0的解决方案。 It compiles but I get lots of warnings, for example:
它编译但我收到很多警告,例如:
"T:\projects\Castle.Core\buildscripts\Build.proj" (Package target) (1) -> "T:\projects\Castle.Core\Castle.Core-vs2008.sln" (Build target) (2:2) -> "T:\projects\Castle.Core\src\Castle.DynamicProxy.Tests\Castle.DynamicProxy.Tests-vs2008.csproj" (default target) (3:2) -> D:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(847,9): warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0.30319" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [T:\projects\Castle.Core\src\Castle.DynamicProxy.Tests\Castle.DynamicProxy.Tests-vs2008.csproj]
How can I fix these warnings? 我该如何解决这些警告? It is related to .NET 4.0 Multitargeting pack or SDK, but there's no SDK for .NET 4.0 AFAIK and Multi-Target pack can not be installed separatly.
它与.NET 4.0 Multitargeting pack或SDK有关,但是没有适用于.NET 4.0的SDK AFAIK和Multi-Target pack不能单独安装。
Any ideas would be appreciated. 任何想法,将不胜感激。
Apparently a known issue. 显然是一个已知的问题。
Did you install .NET 4 Client Profile or Full? 您安装了.NET 4 Client Profile还是Full?
Have you tried looking at the output of the 'ResolveAssemblyReferences' task in MSBuild with diagnostic level debugging turned on ('/v:diag'). 您是否尝试在MSBuild中查看“ResolveAssemblyReferences”任务的输出并启用了诊断级别调试('/ v:diag')。 This should tell you what directories the build process is searching to find the dlls.
这应该告诉你构建过程正在搜索哪些目录来查找dll。 Although, if the build process can't find it, I'm kind of surprised that the IDE doesn't show an issue with that reference in the project.
虽然,如果构建过程找不到它,我有点惊讶IDE没有在项目中显示该引用的问题。
There is a .Net Framework SDK, but its also part of the Windows SDK. 有一个.NET Framework SDK,但它还是Windows SDK的一部分。 The version that shipped with VS2010 is 7.0A, and the latest is 7.1.
VS2010附带的版本为7.0A,最新版本为7.1。 There might be a path/reference conflict that was introduced by the installers if you've installed one or both separately.
如果您已单独安装一个或两个,则安装程序可能会引入路径/引用冲突。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.