Manifest resource name are the same???

feurich

Centurion
Joined
Oct 21, 2003
Messages
170
Location
Holland
Hi there,

I'm having a strange problem. I'm writting a file import module and the following problem has occurred. I added a form to the project that automatically gets the name form1 and later i renamed the form to frmMain. Now when I want to run the application in Visual studio I get the error

Resources 'Forms\Form1.resx' and 'Forms\frmMain.resx' have the same manifest resource name 'AutoImport.frmMain.resources'.

Can anybody help me out.... :confused:

Cire
 
Can nooene help me

OK,

If noone can help me I have to redo the project.
Cause I can't find the problem.......

:o :(

OOH we'll
 
Found it but it's not pretty

I just started hacking project files to see what effect my it had.
In the vbproj file there where some entries that seemed likely to be the problem.
Opening the vbproj file in a tekst editor it looked like this.
<Files>
<Include>
<File
RelPath = "AssemblyInfo.vb"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Forms\frmMain.vb"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "Forms\frmMain.resx"
DependentUpon = "frmMain.vb"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "Forms\frmSplash.vb"
SubType = "Form"
BuildAction = "Compile"
/>
<File
RelPath = "Forms\frmSplash.resx"
DependentUpon = "frmSplash.vb"
BuildAction = "EmbeddedResource"
/>
<File
RelPath = "Modules\ModGlobals.vb"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>

In this section the RelPath was set to to Forms/form1.resx I deleted them and Voila I can run the project again without any errors.

maybe not the most pretty solution but ....

Hidieho
 
Last edited:
To fix this problem, simply:
-> go to the solution explorer and click on the "show all files" icon.
-> Expand the branch for your form by clicking the little plus sign.
-> Then delete the erroneous ".resx" file and everything should work fine.

- DjTranny
 
Back
Top