Hi,
I have build a VC++ dll project that build fine in visual studio environment.
I need to deploy that project to a server, which does not have VS2012, so I wrote a batch file to execute the build tasks using
Msbuild.
Please look at the code below:
@ECHOOFFfor /f "tokens=2*" %%A in ('REG QUERY "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') DO (
set MSBuildToolsPathVS=%%B)
@ECHO"MSbuildexePath= " %MSBuildToolsPathVS%
set SolFilePath="C:\C++\DllCreateProj\DllCreateProj.vcxproj"@ECHO"SolFilePath= "%SolFilePath%
cd %MSBuildToolsPathVS%
msbuild.exe %SolFilePath% /p:configuration=release;Platform=x64
The project build fine,except the following warning:
Quote:
Creating "x64\release\DllCreateproj.unsucessfullbuild" because "alwayscreate" was specified
I had this message before for the same project at different location, so I copied solution, and rebuilt it, and there is no such message in VS IDE but msbuild gives this message
I modify the script to log the results as:
@ECHO OFF
for /f "tokens=2*" %%A in (set MSBuildToolsPathVS=%%B)
@ECHO "MSbuildexePath= " %MSBuildToolsPathVS%
set SolFilePath="C:\C++\DllCreateProj\DllCreateSol.sln"
@ECHO "SolFilePath= "%SolFilePath%
set MSBuildLogPath="C:\C++\DllCreateProj\Buildlog.txt"
@ECHO "MSBuildLogPath= "%MSBuildLogPath%
cd %MSBuildToolsPathVS%
msbuild.exe %SolFilePath% /p:configuration=release;Platform=x64^
/fileLoggerParameters:LogFile=%MSBuildLogPath%;Verbosity=detailed;
/t:clean;rebuild
Now, the paths print out correctly and I have verified that.
However, "Buildlog.txt" is not created and also, after the "build Suceeded" message, I get following message twice
Quote:
The filename,directory name ,or volume label syntax is incorrect.
So, I have following questions:
1) How do I solve the warning for "unsucessfulbuild" ?
2) How do I specify path for log file correctly.
3) Why do I get the "volume label incorrect " message, and is there a way to get more information about that?
4) Given path to msbuild that I have extracted, I need to modify "SolFilePath" and "msBuildLogPath" as being relative to ,say release path
Quote:
C:\C++\DllCreateProj\x64\Release
"
Any help with that?
Thanks