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

  • 相关阅读:
    【python刷题】前缀和
    【python刷题】数组链表去重
    【python刷题】滑动窗口法
    【python刷题】二分查找
    【python刷题】广度优先搜索(BFS)
    【python刷题】回溯算法(深度优先搜索DFS)
    机器学习十讲-第三讲分类
    数学知识-质数&约数
    树与图的DFS与BFS
    桥梁保护与监控-开发进度(二)
  • 原文地址:https://www.cnblogs.com/AlexanderZhao/p/12878911.html
Copyright © 2011-2022 走看看