MSBuild throws error MSB4025

Recently I came across issue with build of a .NET project using integration server. The problem was caused by change in msbuild task where MSBuild version 2.0.50727 was replaced by  version 4.0.30319. The whole error message looked like this:

The project file could not be loaded. Could not find file ‘Project.csproj.metaproj’.

Strange thing was, that the build was successful on the development machine without any problems. After some lingering digging I found an support ticket on Microsoft sites saying that there is a problem with MSBuild when passing global properties whose values contain “escapable characters”. These include $, @, (, ), %. In my case I used round brackets in the configuration name. After removing, build was successfully finished.

Leave a Reply

Your email address will not be published. Required fields are marked *