我在 Windows 窗体应用程序中创建了一个 Form1.cs,并且已经有一个文件 Form1.resx。但是每当我尝试运行我的应用程序时,我都会不断收到以下错误:
Unable to create a manifest resource name for "....\gg\Form1.resx". Could not find file 'C:\Documents and Settings\Administrator\Desktop\gg\Form1.cs'.
谁能告诉我一个原因,我该如何克服我的问题?
最佳答案
您的 .csproj 已损坏。您需要手动编辑它。对于一个表单,必须有 3 个条目:
<Compile Include="MyForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MyForm.Designer.cs">
<DependentUpon>MyForm.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="MyForm.resx">
<DependentUpon>MyForm.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
关于c# - 无法在 Visual Studio 2008 中创建 list 资源名称错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4942332/