tcprojx project file not found
I'm getting a strange error while running my build:
C:\TeamCity\buildAgent\work\afb48a0fad70f24e\Project1.build.proj(889, 5): error MSB3202: The project file "C:\TeamCity\buildAgent\work\afb48a0fad70f24e\Project1.build.proj.teamcity.patch.tcprojx" was not found.
This is an msbuild project, and is happening on the following:
<Target Name="SignExe">
<ItemGroup>
<SignFiles Remove="@(SignFiles)" /> <!-- clean existing items -->
<SignFiles Include="**\*.exe">
</ItemGroup>
<PropertyGroup>
<SignToolFiles>"@(SignFiles, '" "')"</SignToolFiles>
<BypassTimestamp Condition="'$(Configuration)'=='Debug'">1</BypassTimestamp>
</PropertyGroup>
<MsBuild Projects="$(MSBuildProjectFullPath)" Targets="SignToolTask" Properties="BypassTimestamp=$(BypassTimestamp);SignToolFiles=$(SignToolFiles)" />
</Target>
This does work fine in my current CruiseControl server (or if I run by hand). Basically I'm just calling msbuild again on the project file itself to simplify the way parameters are passed -- I don't remember exactly the reason it was set up this way, it may have just been to avoid having global variables. Anyway, the task runs signtool.exe on all the executables.
I can't figure out why this doesn't work:
- Apparently TC is making a .teamcity.patch.tcprojx file -- but I don't see it in the directory while the build is running
- The error output says Project1.build.proj, and yet, the MSBuildProjectFullPath variable is the tcprojx file -- this seems very strange to me.
Any ideas on what can be done to fix this? I'm not necessarily against changing the way I invoke the SignToolTask target, but that seems like it's just ignoring/working around what could be the real issue here.
Please sign in to leave a comment.
TeamCity create a wrapper msbuild file that includes original msbuild file.
Please try setting environment variable 'teamcity.agent.dotnet.debug' with value 'true' to see generated msbuild script in the build log.
Do you have a code that removes files near Project1.build.proj? TeamCity removes generated .tcprojx file only after a build finished.
Ah, yes I did have code removing all files not in SVN (this was to clean files missed by a 'clean' build, eg, files that were generated in a previous revision and don't get cleaned anymore).
I made an exception to not remove the tcprojx file and now it's working.
Thanks