Visual Studio 2013 项目中所有引用的黄色警告 [英] Visual studio 2013 yellow warning on all references in project

查看:78
本文介绍了Visual Studio 2013 项目中所有引用的黄色警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 C# 项目,目标框架设置为 .NET 4.5.出于某种奇怪的原因,所有引用都标有黄色警告三角形,如下所示.我试过卸载和重新加载项目.我什至尝试手动重新添加系统引用之一无济于事.

I have a C# project with target framework set to .NET 4.5. For some strange reason, all references are marked with the yellow warning triangle as shown below. I have tried unloading and reloading the project. I even tried manually re-adding one of the system references to no avail.

我得到的警告是:

警告 13 找不到引用的组件AutoMapper".Services.Contracts 警告 14 引用的组件找不到AutoMapper.Net4".服务合同警告 15 找不到引用的组件log4net".Services.Contracts 警告 16 引用的组件找不到Mindscape.LightSpeed".服务合同警告 17 引用的组件Mindscape.LightSpeed.Linq"可能找不到.Services.Contracts 警告 18 引用的组件找不到系统".服务合同警告 19找不到引用的组件System.Core".Services.Contracts 警告 25 引用的组件System.Data"找不到.Services.Contracts 警告 24 所引用的找不到组件System.Data.DataSetExtensions".Services.Contracts 警告 20 引用的组件找不到System.Runtime.Serialization".服务合同警告 21 无法引用引用的组件System.ServiceModel"成立.Services.Contracts 警告 22 引用的组件找不到System.ServiceModel.Web".服务合同警告 26 找不到引用的组件System.Xml".Services.Contracts 警告 23 引用的组件找不到System.Xml.Linq".服务.合同

Warning 13 The referenced component 'AutoMapper' could not be found. Services.Contracts Warning 14 The referenced component 'AutoMapper.Net4' could not be found. Services.Contracts Warning 15 The referenced component 'log4net' could not be found. Services.Contracts Warning 16 The referenced component 'Mindscape.LightSpeed' could not be found. Services.Contracts Warning 17 The referenced component 'Mindscape.LightSpeed.Linq' could not be found. Services.Contracts Warning 18 The referenced component 'System' could not be found. Services.Contracts Warning 19 The referenced component 'System.Core' could not be found. Services.Contracts Warning 25 The referenced component 'System.Data' could not be found. Services.Contracts Warning 24 The referenced component 'System.Data.DataSetExtensions' could not be found. Services.Contracts Warning 20 The referenced component 'System.Runtime.Serialization' could not be found. Services.Contracts Warning 21 The referenced component 'System.ServiceModel' could not be found. Services.Contracts Warning 22 The referenced component 'System.ServiceModel.Web' could not be found. Services.Contracts Warning 26 The referenced component 'System.Xml' could not be found. Services.Contracts Warning 23 The referenced component 'System.Xml.Linq' could not be found. Services.Contracts

发生了什么,我该如何解决?

What happened and how do I fix this?

推荐答案

我遇到了同样的问题,我从 .csproj 文件中删除了以下条目,它为我解决了问题.

I had the same problem and I removed the following entry from the .csproj file and it fixed the problem for me.

<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">  
  <PropertyGroup>
    <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
  </PropertyGroup>
  <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
</Target>

这篇关于Visual Studio 2013 项目中所有引用的黄色警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆