Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

code_az

@code_az
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Msbuild for VC++ project having path errors
    C code_az

    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:

    @ECHO OFF
    for /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 ('REG QUERY "HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0" /v MSBuildToolsPath') DO (
    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 extr

    C / C++ / MFC visual-studio question workspace csharp c++
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups