解析到相同的输出的两个输出文件名文件名、两个

2023-09-03 15:38:56 作者:無與倫比的美

正在开发.NET应用程序的.NET 3.5框架。最近,我创造了新的形式calledc WorkersScreen。当我尝试运行项目中,我得到这个错误:

Am developing .NET Application for .NET 3.5 Framework. Recently I created new Form calledc WorkersScreen. When I try to run the project I got this error:

Error   1   Two output file names resolved to the same output path: "obj\x86\Debug\DryWash.WorkersScreen.resources" DryWash

这是什么意思?

What does it mean ?

推荐答案

这可以通过以下两种.resx文件指向同一个表单事件发生。重命名表单时(其他原因可以申请,我不是很确定)

This can happen in the event of two .resx files pointing to the same form. Mostly happens when renaming forms (other reasons may apply, I'm not exactly sure)

如果您的特定形式的文件看起来是这样的:

If your particular form files looks like this:

Form1.cs
Form1.designer.cs
MyFormerFormName.resx
Form1.resx

那么这通常意味着重命名的形式,但Visual Studio中没有删除旧的.resx文件。一旦你删除的文件(在本例中 MyFormerFormName.resx )手动,应该走在下一版本的错误。

then that usually implies that you renamed the form but Visual Studio didn't remove the old .resx file. Once you delete the file (in this example MyFormerFormName.resx) manually, the error should be gone upon next build.