Error the process cannot access the file because it is being used by another process while building project by CLI on .NET Core

后端 未结 8 1291
一个人的身影
一个人的身影 2021-01-11 23:56

I got following error while running dotnet build command on my .NET Core project.

C:\\Program Files\\dotnet\\sdk\\2.1.2\\Microsoft.Common.Curre         


        
8条回答
  •  独厮守ぢ
    2021-01-12 00:40

    Your ASP.Net application is running from the same directory, that is why you couldn't build your code. You have following options:

    1. Terminate the running ASP.Net application;
    2. Copy your code to another directory and build it from there; or
    3. Restart your computer and try building it again.

    I would go with first option, but if you have difficulty finding out how to do it, last option is the easiest. In any case if for any reason you couldn't restart your computer, second one will surely work.

提交回复
热议问题