How to resolve CVT1100 in Visual Studio 2010 Ultimate?

Viewed 20795

I'm working on a medium-sized project which uses qmake to generate Visual Studio 2005 project files. I'm trying to get it built under Visual Studio 2010 Ultimate. Since qmake doesn't support this IDE yet i had the provided conversion assistant convert my solution.

When trying to build I get the following error in one of the subprojects:

CVTRES : fatal error CVT1100: duplicate resource. type:VERSION,name:1,language:0x0407

After what Google's results told me it seems that this error is likely to occur when migrating to a newer version of Visual Studio but I don't know why and the hacks recommended there don't work for me.

What I already tried is to rename the ressources to random numbers, even a different "name" at every occurence of the version information. When I build the project again after reading the error and deleting the corresponding .RC-file it works once. But that's too much of a hack.

Any ideas anyone? Thanks in advance.

14 Answers

I recently ran into this problem, and by accident ended up with a project file that didn't have the resource conflict. In my case I was importing a QT qmake generated project for VS2008 into VS2010. After using VcprojFormatter and a lot of diffs, I found the difference (for me). I think it is a bug in either the import wizard, or the core of VS 2010.

http://www.codeproject.com/KB/macros/vcproj_formatter.aspx

My resource file was called win32_resources.rc You'll need to edit each intermediate data folder corresponding to your build configurations (release, debug, etc)

Look for a section like the following in your vcxproj file:

<ItemGroup>
  <Resource Include="debug\win32_resources.res">
    <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
  </Resource>
  <Resource Include="release\win32_resources.res">
    <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
  </Resource>
</ItemGroup>

All the "Resource" text should be replaced with "CustomBuildStep":

<ItemGroup>
  <CustomBuildStep Include="debug\win32_resources.res">
    <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
  </CustomBuildStep>
  <CustomBuildStep Include="release\win32_resources.res">
    <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
  </CustomBuildStep>
</ItemGroup>

The problem in the VS2008 file is that the default(?) setting was not explicit:

<File RelativePath="release\win32_resources.res">
  <FileConfiguration
    Name="Debug|Win32"
    ExcludedFromBuild="true"
    >
    <Tool Name="VCCustomBuildTool"/>
  </FileConfiguration>
</File>

The "Tool Name" field was missing.

I came here looking for an answer for this error. I am sorry to burst the bubble. None of the answers worked out for me. My mistake was I had defined 3 MACRO's with same id. That is the reason I was getting the error mentioned in the question.

my code before when the error was showing:

#define IDB_MARKER_NORMAL_LINE          21**6**   
#define IDB_MARKER_ARROW_LINE           21**6**   
#define IDB_MARKER_DOTTED_LINE          21**6**  

i changed it to:

#define IDB_MARKER_NORMAL_LINE          21**6**   
#define IDB_MARKER_ARROW_LINE           21**7**   
#define IDB_MARKER_DOTTED_LINE          21**8**  

Errors were GONE!!!!!!!!!!

I had this and I did the following in resource.h

#undef VS_VERSION_INFO
#define VS_VERSION_INFO                 310

As VS_VERSION_INFO is given resource id 1 in WinRes.h just making it something else fixed my issue.

If you ever encounter this error while compiling (usually a downloaded project from internet), then remove the manifest file and remove the reference to the manifest file in the .rc file.

This answer by hB0 was 100% correct for the case I encountered.

This was very useful to me and I would like others to benefit from knowing this, rather than assuming hB0's answer should be ignored because others have votes and hB0's has zero votes. I have to say it in a separate answer because I the system will not let an unregistered user vote. I even registered so as to be able to vote on this answer but the system still will not let me vote till I am a more mature user.

This answer point a way to find the problem that I encounted. In my senario, the import props has this code:

<ResourceCompile Include="$(VersioningDir)**Version.rc" />

When I delete it, all work is done.

If you ever encounters CVT1100 (duplicate resource) & LNK1123 (failure during conversion to COFF) resource errors in Visual Studio 20XX, then do below steps to resolve it.

  1. Open .rc file & comment / remove below MACRO

    MOVEABLE PURE "res\.manifest"

2 Rename / Delete Manifest file from Resource folder from Project directory.

Now Re-build the solution & Enjoy...

Related