lital maatuk
lital maatuk

Reputation: 6249

VS migrating from 2005 to 2010, LNK1316: duplicate managed resource name

i'm migrating C++ .NET solution from vs 2005 to vs 2010 i receive in managed project a linker error: LINK : fatal error LNK1316: duplicate managed resource name\

thanks for your help

Upvotes: 2

Views: 1368

Answers (3)

Alexander
Alexander

Reputation: 21

I also had the same problem, but replacing $(InputName) to $(FileName) or $(ProjectName) did not help. What helped was moving the resource file to the project root directory and leaving the "Resource Logical Name" blank in Properties->Managed Resources->General.

Upvotes: 2

AntonyW
AntonyW

Reputation: 2424

Is it this? :

Link...

EDIT: I'll summarise the answer below to save reading all the comments :

When VS2010 converted the project file from VS2005, it found a macro $(InputName) which is no longer used. It replaces it with %FILENAME. To fix this problem, go to Properties, Managed Resource, Resource Logical Name and change it to %(FileName).

Upvotes: 1

Nathan DeWitt
Nathan DeWitt

Reputation: 6601

Looks like a bug in Visual Studio 2010. In this case, it was

an issue with project system not removing the extra Form2.resx that you change the form2.h from header type to Winform type.

I suggest going through your solution to see if you have any resources that should be removed when file types are changed. They said they might fix it in an updated version, but since the workaround is so easy (delete the file) they aren't going to worry about it.

Upvotes: 1

Related Questions