Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create a manifest resource name error in Visual Studio 2008

Tags:

c#

.net

winforms

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:

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?

like image 786
Jack Avatar asked Feb 09 '11 07:02

Jack


4 Answers

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>
like image 131
Maxence Avatar answered Oct 20 '22 20:10

Maxence


This is my project..

my projectproject pic

Look at SalesSoListReportTest.cs and SalesSoListReportTest.aspx there are warning icons beside it.. Try to delete warning files, and re-add.. You can find the files at recycle bin.. delete, and re-add the files

like image 21
Khaneddy2013 Avatar answered Oct 20 '22 22:10

Khaneddy2013


It basically means it can't find your files. 1. Try to close and reopen the project. 2. Re-add the files via Add -> Existing item.

like image 3
nktsamba Avatar answered Oct 20 '22 21:10

nktsamba


best to run solutions away from desktop. (and "Document and Settings" folder). try moving your solution folder to C:\Projects\ or smth and try again and see if it fixes it.

or if you are not using any resources in your form, then remove it (from project), when you need it will get added automatically next time

like image 1
Bek Raupov Avatar answered Oct 20 '22 20:10

Bek Raupov