How to setup MSBuild to name Project.dll instead od Project.vcxproj.dll ?
I've got a problem while using TC.
I build many vcxprojects. Example of setting in TC is:
<runner id="RUNNER_15" name="MP3" type="MSBuild">
<parameters>
<param name="build-file-path" value="Audio\mp3\mp3.vcxproj" />
<param name="dotNetCoverage.NCover.HTMLReport.File.Sort" value="0" />
<param name="dotNetCoverage.NCover.HTMLReport.File.Type" value="1" />
<param name="dotNetCoverage.NCover.Reg" value="selected" />
<param name="dotNetCoverage.NCover.platformBitness" value="x86" />
<param name="dotNetCoverage.NCover.platformVersion" value="v2.0" />
<param name="dotNetCoverage.NCover3.Reg" value="selected" />
<param name="dotNetCoverage.NCover3.args" value="//ias .*" />
<param name="dotNetCoverage.NCover3.platformBitness" value="x86" />
<param name="dotNetCoverage.NCover3.platformVersion" value="v2.0" />
<param name="dotNetCoverage.NCover3.reporter.executable.args" value="//or FullCoverageReport:Html:{teamcity.report.path}" />
<param name="dotNetCoverage.PartCover.Reg" value="selected" />
<param name="dotNetCoverage.PartCover.includes" value="[*]*" />
<param name="dotNetCoverage.PartCover.platformBitness" value="x86" />
<param name="dotNetCoverage.PartCover.platformVersion" value="v2.0" />
<param name="msbuild_version" value="4.0" />
<param name="run-platform" value="x86" />
<param name="toolsVersion" value="4.0" />
</parameters>
</runner>
What is the problem? Problem is, that linker setting in vcxproj file says:
<OutputFile>.\Release\$(ProjectName).dll</OutputFile>
and when I build it using VS2010 command line, it is correct value .\Release\mp3.dll
But when built using TC, I get value .\Release\mp3.vcxproj.dll
Why? How to avoid this strange behavior?
(I don't want to replace line in vcxproj file like <OutputFile>.\Release\mp3.dll</OutputFile>, it's problem with many projects and I'd like to avoid this primitive solution)
Thx for any response.
Please sign in to leave a comment.
Hello,
Is here anybody who can help me with this problem, please?
It's really big problem for me - I'm trying to setup TC for three days, but stil I'm not succesfull.
Originally I thought, that it is problem only when it is LIB od DLL project.
But it is not - whenever I use msbuild myProject.vcxproj, results name is myProject.vcproj.exe | myProject.vcproj.lib | myProject.vcproj.dll depend on type of project.
I'm really annoyed of it, because we have dozens of such projects we need to fit into automated build and I stil don't know how to fix it.
When I use VS2010 command line and run "msbuild myProject.vcxproj", everything is OK. But not using TC.
Where is the problem??
Thanks a lot.
Hello,
Unfortunately, this is an issue of TeamCity/MSBuild integration.
TeamCity used to generate a stub MSBuild project file that is called $(ProjectName).tcprojx
This may affect the behaviour of forthcomeing tasks.
The workarounds are the following:
- use .sln file (thus it would use <MSBuild> in the stub to run it)
- set configuration parameter "teamcity.msbuild.generateWrappingScript" with value "false" (in build configuration: Properties and Environment variables tab)
I created an issue for your case. Please vote for it
http://youtrack.jetbrains.com/issue/TW-20930
Finally I solved the problem this way:
I changed all vcxproj filles adding explicit definition of TargetName, so instead od default assign TargetName = ProjectName it use explitictly declared:
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">myProject</TargetName>
Where ProjectName was used in vcxproj files, i replaced it by TargetName too.
But it was terrible routine work (we have > 150 projects) and I should be fixed IMHO in way how TC works with MSBuild.
Thx.