*.dll.licenses file in obj directory not created with msbuild in TeamCity

后端 未结 8 2036
眼角桃花
眼角桃花 2020-12-23 17:20

I am working on upgrading our TeamCity projects from VS2012 to VS2015 and I am running into an issue compiling our MVC application.

Old MSBuild (v4.0.30319.34209) g

8条回答
  •  醉话见心
    2020-12-23 17:48

    We had the same problem when building with VisualBuild. I found a solution without installing the Win10 SDK:

    In the projects properties Compile Settings we added a "Pre-build Event Command Line" like this:

    pushd "%VS120COMNTOOLS%..\..\VC"
    call vcvarsall.bat
    popd
    pushd $(ProjectDir)\"My Project"
    lc /target:$(TargetFileName) /complist:licenses.licx /outdir:"..\obj\$(ConfigurationName)"
    popd
    popd
    

    This command uses the (older) VS12 Tools and starts the lc compiler tool manually prior to the build of the project and compiles the licenses.licx file into the *.licenses resource file

提交回复
热议问题