none
Issue(s) upgrading vs2008 to vs2015

    Question

  • 1)  After upgrading I see that $(TargetPath) is no longer set to value specified in linker output . For example project mydll will have  linker output file set to ../output/DebugUnicode/mydll.dll   

    but $(TargetPath) will be  c:\Projects\mydll\DebugUnicode/mydll.dll 

    this results in linker warning 

    warning MSB8012 TargetPath(C:\Projects\mydll\DebugUnicode\mydll.dll) does not match the Linker's OutputFile property value (C:\Projects\output\DebugUnicode\mydll.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). 

    whereas in vs2008 $(Targetpath) will have the value 

    c:\projects\output\DebugUnicode\mydll.dll 

     and no issue 

    So it seems in VS2008 $(TargetPath) is set by the linkers Output file specification  but not so in VS2015 

    2) 

    if project name is something like "mymod  x64"

    and linker output file is $(OutDir)mymod.exe  

    then warning MSB8012: TargetPath(C:\Projects\mymod\..\output\DebugUnicode\x64\mymod  x64.exe) does not match the Linker's OutputFile property value (C:\Projects\output\DebugUnicode\x64\mymod.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile). 

    in vs@2015 the ProjectName with space is used for TargetName  ? 

    no issue in vs2008

      
    Friday, September 2, 2016 5:08 PM

Answers

  • Hi chaz s,

    According to the error messages, both of them are related to Linker output directory when upgrade your Visual Studio 2008 C++ project to Visual Studio 2015.

    This is a know issue when upgrade a previous version C++ project to higher version C++ project. Please refer to following blog which introduce Visual Studio 2010 C++ Project Upgrade Guide. It also can be applied to your situation. Please refer to the part "Linker output directory" in this blog. Hope that can help you.

    https://blogs.msdn.microsoft.com/vcblog/2010/03/02/visual-studio-2010-c-project-upgrade-guide/

    Best Regards,
    Weiwei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, September 5, 2016 5:52 AM
    Moderator