error MSB3073: How do I fix this?

寵の児 提交于 2020-01-22 13:59:30

问题


3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: The command "copy "C:\Users\jlee\Desktop\10_IPG2.7_4\InitialPowerGadget\Release\EnergyLib.dll" "C:\Users\jlee\Desktop\10_IPG2.7_4\InitialPowerGadget\Bins32\EnergyLib32.dll"
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: copy "C:\Users\jlee\Desktop\10_IPG2.7_4\InitialPowerGadget\EnergyDriver\objfre_win7_x86\i386\EnergyDriver.sys" "C:\Users\jlee\Desktop\10_IPG2.7_4\InitialPowerGadget\Bins32"
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(113,5): error MSB3073: :VCEnd" exited with code 1.

I was researching online, I think it has to do something with relative pathing; but I'm not sure. Can someone help explain what is wrong and how to fix this?


回答1:


In my case the problem was that VC++ was trying to copy a .dll file into a system folder. Running it as administrator fixed the problem.




回答2:


For anyone else that comes across this question my problem was that the target directory contained spaces i.e.

C:\Users\Administrator\Documents\Visual Studio 2017\projects\blah

So for me the solution was to wrap $(TargetDir) in double quotes i.e.

copy ..\resources\* "$(TargetDir)" /Y




回答3:


I had the folowing situation: I was overwriting files which were write-protected with an bost-build event copy. I need some time to find this because I copied various files, some were copied with succes some note but for all events an error was displayed. In the example below copy event 4, 5 and 6 failed which is indicated before the error with "Zugriff verweiger" (engl.: access denied):




回答4:


Get it. I have set up a post build event to run the unit tests automatically after each build. Delete this configure, can solve this.




回答5:


Just add your user to permission for cmd.exe file in system32. that will solve this problem.



来源:https://stackoverflow.com/questions/19914339/error-msb3073-how-do-i-fix-this

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!