zoukankan      html  css  js  c++  java
  • Visual Studio警告IDE0006的解决办法 引用的dll或者包出现黄色叹号

    一、按照微软官方给的解决方案,查找错误日志:

    1. 关闭 Visual Studio。

    2. 删除解决方案下的.vs文件夹,这个文件夹默认是隐藏的,找不到的需要打开隐藏文件设置

    3. 打开 Visual Studio 开发人员命令提示符 //开始菜单中找Developer Command Prompt for VS 2017

    4. 将环境变量 " TraceDesignTime" 设置为 true (设置成 TraceDesignTime=true)    

    在命令行中运行命令

    set TraceDesignTime=true

    devenv


    5. 在上一步打开的vs中打开解决方案
    6. 找到生成的日志,在“C:Users你的用户名AppDataLocalTempECharts*.designtime.log”并查找失败任务(FAILED) //日志文件有多个,根据需要查看。类似下面代码:

    生成失败。
    
    ***: error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..packagesMicrosoft.Net.Compilers.1.0.0uildMicrosoft.Net.Compilers.props.
        0 个警告
        1 个错误

    二、我遇到的错误是:

    This project references NuGet package(s) that are missing on this computer. Nuget包无法还原,引用的dll显示为黄色叹号。

    在网上找到的解决方案:

    1. 打开web项目的.csproj 文件,一般是asp.net mvc web项目会出现上述错误,找到以下代码,删除

    <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use 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('......AssembliesNuGetSpecFlow.Plus.Excel.1.4.2uildSpecFlow.Plus.Excel.targets')" Text="$([System.String]::Format('$(ErrorText)', '......AssembliesNuGetSpecFlow.Plus.Excel.1.4.2uildSpecFlow.Plus.Excel.targets'))" />

     2. 在vs中,打开程序包管理控制台,执行以下命令重新安装包:

               Update-Package –reinstall

  • 相关阅读:
    使用PHP绘制统计图
    微信公众平台商户模块
    jQuery Mobile入门教程
    2013中国微信公众平台用户研究报告
    WordPress的SEO技术
    微信公众平台消息接口星标功能
    微信5.0打飞机怎么取得高分?
    微信公众平台的服务号和订阅号
    微信公众平台开发(58)自定义菜单
    微信公众平台开发(57)Emoji表情符号
  • 原文地址:https://www.cnblogs.com/AlexanderZhao/p/12878911.html
Copyright © 2011-2022 走看看