【问题标题】:C# won't compileC# 不会编译
【发布时间】:2021-10-05 21:14:36
【问题描述】:

我正在尝试发布一个简单的 c# 脚本,但是每次都失败。

程序每次都会成功构建,但发布时会失败。我尝试了许多不同的脚本,甚至是默认的 Hello world,每次都遇到同样的错误。

2>The process cannot access the file 'C:\Users\Parzavil\.nuget\packages\microsoft.aspnetcore.app.runtime.win-x86\3.1.17\runtimes\win-x86\lib\netcoreapp3.1\System.Windows.Extensions.dll' because it is being used by another process.

我已经重新启动了我的电脑,并且只启动了 VS,但它仍在使用中。这可能是由我的 AV 引起的,因为我使用的是公司管理的 CarbonBlack AV,还是与我的 VS 安装有关?

【问题讨论】:

  • 如果@guustysebie 的解决方案不起作用,您可以安全地删除作为下载优化缓存的.nuget 文件夹,据我所知。如果做不到,请尝试使用lockhunter.com 之类的软件或使用控制台手动搜索网络以进行直接破解。

标签: c# visual-studio build compiler-errors publish


【解决方案1】:

您的 nuget 包似乎有问题。

您可以尝试重新安装它们。

nuget locals all -list
nuget locals all -clear

【讨论】:

    猜你喜欢
    • 2016-10-05
    • 1970-01-01
    • 1970-01-01
    • 2011-10-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-31
    相关资源
    最近更新 更多