• 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

  • 相关阅读:
    nginx优化:使用expires在浏览器端缓存静态文件
    nginx优化:worker_processes/worker_connections/worker_rlimit_nofile
    centos8平台使用ulimit做系统资源限制
    centos8平台nginx服务配置打开文件限制max open files limits
    nginx安全:配置allow/deny控制ip访问(ngx_http_access_module)
    python 菜鸟入门
    正则表达式预查询
    selenium 关键字驱动部分设计思路
    Idea安装Python插件并配置Python SDK
    ORACLE LOG的管理
  • 原文地址:https://www.cnblogs.com/AlexanderZhao/p/12878911.html
Copyright © 2020-2023  润新知