dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.84k stars 666 forks source link

Omnisharp is locking files #2934

Closed Logerfo closed 1 day ago

Logerfo commented 5 years ago

Environment data

dotnet --info output: SDK do .NET Core (refletindo qualquer global.json): Version: 2.2.103 Commit: 8edbc2570a

Ambiente de tempo de execução: OS Name: Windows OS Version: 10.0.17763 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.2.103\

Host (useful for support): Version: 2.2.1 Commit: 878dd11e62

.NET Core SDKs installed: 2.1.600 [C:\Program Files\dotnet\sdk] 2.1.601 [C:\Program Files\dotnet\sdk] 2.2.103 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-download

VS Code version: 1.32.3 C# Extension version: 1.71.1

Steps to reproduce

Expected behavior

The build should succeed.

Actual behavior

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4194,5): warning MSB3026: Could not copy "obj\Debug\netstandard1.3\SOSAnalyzer.dll" to "bin\Debug\netstandard1.3\SOSAnalyzer.dll". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\Debug\netstandard1.3\SOSAnalyzer.dll' because it is being used by another process. The file is locked by: "OmniSharp (4172)"

julichan commented 5 years ago

I've seen the same problem with the nuget repository with a project using Refit package. It seems the omisharp and "net core host" processes are always locking some dll.

ryepup commented 4 years ago

I'm experimenting with switching from Visual Studio to Visual Studio Code (VSC) + Omnisharp + Windows Services for Linux (WSL). I end up with both open a lot; doing some work with Omnisharp and some work in Visual Studio. I feel like this issue is preventing me from really evaluating the VSC option.

1jeffchristensen commented 4 years ago

My team is suffering from unnecessary file locks when using Omnisharp.

JoeRobich commented 1 day ago

There have been lots of improvements since this issue was opened. Please open a new issue with logs if you are still running into this.