在Visual Studio 2008中无法创建清单资源名称错误 [英] Unable to create a manifest resource name error in Visual Studio 2008

查看:1170
本文介绍了在Visual Studio 2008中无法创建清单资源名称错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在Windows Forms应用程序中创建了Form1.cs,并且已经有一个Form1.resx文件。但是,每当我尝试运行应用程序时,都会不断出现以下错误:

I've created a Form1.cs in a Windows Forms application, and there's already a file Form1.resx. But whenever I try to run my application, I'm constantly getting the following error:


无法为创建清单资源名称。 ... \gg\Form1.resx。找不到文件'C:\Documents and Settings\Administrator\Desktop\gg\Form1.cs'。

Unable to create a manifest resource name for "....\gg\Form1.resx". Could not find file 'C:\Documents and Settings\Administrator\Desktop\gg\Form1.cs'.

任何人都可以告诉我一个原因,我该如何解决我的问题?

Could anyone please tell me a reason, and how can I overcome my problem?

推荐答案

您的.csproj已损坏。您需要手动编辑。对于表单,必须有3个条目:

Your .csproj is corrupted. You need to manually edit it. For a form, there must be 3 entries:

<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>

这篇关于在Visual Studio 2008中无法创建清单资源名称错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆