Unable to copy file - access to the path is denied

后端 未结 30 1228
死守一世寂寞
死守一世寂寞 2020-11-30 19:05

I am using Visual Studio 2005. After taking code from version control first, the c#.net application runs correctly. But, after doing some modifications, when I build I am

30条回答
  •  借酒劲吻你
    2020-11-30 19:54

    This has reared it's head again in Visual Studio 2017, in this case the cause is the Application Insights process ServiceHub.DataWarehouseHost.exe.

    There is a workaround discussed in the thread warning MSB3026: Could not copy "obj\Debug\netcoreapp1.1\src.pdb" to "bin\Debug\netcoreapp1.1\src.pdb", which is to add a pre-build event to the project to kill the process every time the project is built. Quoting from that link:

    • Right click properties on project
    • Choose properties
    • Build Events
    • Pre-build event command line
    taskkill /IM ServiceHub.DataWarehouseHost.exe /F 2>nul 1>nul
    Exit 0
    
    • Save and build

提交回复
热议问题