简体   繁体   English

解决MSBuild 4.0警告

[英]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.

相关问题 如何在msbuild中禁止DISPPARAMS警告? - How to suppress DISPPARAMS warnings in msbuild? MSBuild无法解析指向GAC外部的引用 - MSBuild not resolving references pointing outside of GAC MSBuild在解析COM引用时失败。 为什么? - MSBuild failed at resolving COM reference. Why? .NET Framework 4.0中的MSBuild ExecuteDDL失败 - MSBuild ExecuteDDL fails in .NET Framework 4.0 在没有Visual Studio 2010的情况下安装MSBuild 4.0 - Installing MSBuild 4.0 without Visual Studio 2010 无法在服务解析源生成器中使用 MSBuild 属性 - Unable to consume MSBuild properties in service resolving source generator 使用msbuild的命令行参数将.NET 4.0作为目标后出现BadImageFormatException - BadImageFormatException after targeting .NET 4.0 using command line parameters to msbuild MSBuild 4.0无法执行XMLQuery任务(来自MSBuild社区任务包),错误为MSB4018 - MSBuild 4.0 failing on XMLQuery task (from MSBuild Community Tasks package) with error MSB4018 当项目以3.5为目标时,Msbuild 4.0引用System.Core 4.0? - Msbuild 4.0 is referencing System.Core 4.0 when the project targets 3.5? XC1020:WWF4.0 控制台应用程序中的 XAML MSBuild 任务发生构建错误 - XC1020: Build error occurred in the XAML MSBuild task in WWF4.0 console application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM