What is going wrong when Visual Studio tells me “xcopy exited with code 4”

后端 未结 16 2082
北荒
北荒 2020-12-05 01:33

I\'m not very familiar with post-build events, so I\'m a little confused as to what\'s going wrong with my program. When compiling in visual studio 2010, I get the following

16条回答
  •  失恋的感觉
    2020-12-05 02:08

    I had a post build command that worked just fine before I did an update on VS 2017. It turned out that the SDK tools updated and were under a new path so it couldn't find the tool I was using to sign my assemblies.

    This changed from this....

    call "%VS140COMNTOOLS%vsvars32"
        "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\sn.exe" -Ra "$(TargetPath)" "$(ProjectDir)Key.snk"
    

    To This...

    "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\sn.exe" -Ra "$(TargetPath)" "$(ProjectDir)Key.snk"
    

    Very subtle but breaking change, so check your paths after an update if you see this error.

提交回复
热议问题