c# - Visual Studio 显示我无法解释的错误
问题描述
所以我正在运行 ac# 程序,然后我在错误列表部分看到了这个
Warning MSB3026 Could not copy "C:\Users\USER\source\repos\app\app\obj\Debug\netcoreapp3.1\app.exe" to "bin\Debug\netcoreapp3.1\app.exe". Beginning retry 10 in 1000ms. The process cannot access the file 'bin\Debug\netcoreapp3.1\app.exe' because it is being used by another process. The file is locked by: "app (11048)" app D:\Visual Studio\main app\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 4651
顺便说一句,这是我的代码:
using System.Collections.Generic;
using System.Linq;
using System.Reflection.Metadata.Ecma335;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace app
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(GetMax(2, 1, 3));
}
static int GetMax(int num1, int num2, int num3 )
{
int result;
if (num1 >= num2 && num1 >= num3)
{
result = num1;
}
else if (num2 >= num1 && num2 >= num3)
{
result = num2;
}
else { result = num3; }
return result;
}
}
}
它说没有发现问题,但我仍然收到该错误消息,有人可以帮忙吗?我在谷歌上也找不到任何解决方案
解决方案
当我们遇到警告MSB3026错误时,我们可以参考下面的链接使用一般的方法来处理问题。
推荐阅读
- html - 右键单击在新选项卡中打开在 div 标签内的 routerlink 上不可用
- php - 现有图像未以编辑形式显示以在 larvel(5.8) 中更新
- javascript - 我不能用 src="" 在我的 html 中引用 javascript
- join - 如果有两个以上的表,分桶如何帮助。(Hive 排序合并桶连接)
- javascript - console.log 在 react 和 graphql 中不起作用
- python - 嵌套for循环不断重复
- sql-server - 字符串 ')' 后的非闭合引号 - OPENQUERY
- python - Django Form 某些字段总是在 clean_field() 或 clean() 中得到 None
- perl - 如何检查 cidr 值是否有效
- c# - Encoding.GetString() 仅返回字节数组中的第一个字节