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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Msbuild for VC++ project having path errors

Msbuild for VC++ project having path errors

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studioquestionworkspacecsharpc++
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    code_az
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

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