-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disposable XUnit tests cause cpu to spin #3243
Comments
I noticed an update of the extension to 1.21.1 and also made some changes to my project to clean up my Omnisharp log. It now shows just: Starting OmniSharp server at 8/23/2019, 11:26:47 AM OmniSharp server started with Mono 6.0.0. The VisualBasic.dll issue is gone but the issue with disposable tests remains. |
@sudsy In your error log it says
Do you have the appropriate framework version installed ? |
There were some issues with my project configuration for mono. I have
resolved those and re-tested as mentioned in my previous comment and the
problem still persists.
…On Sat, 24 Aug. 2019, 03:23 Akshita Agarwal, ***@***.***> wrote:
@sudsy <https://github.com/sudsy> In your error log it says
The reference assemblies for framework ".NETFramework,Version=v4.7.2" were
not found. To resolve this, install the SDK or Targeting Pack for this
framework version or retarget your application to a version of the
framework for which you have the SDK or Targeting Pack installed.
Do you have the appropriate framework version installed ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3243>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMOLB44HVKGP5CQUB7TMY3QGAMKTANCNFSM4IORGL2Q>
.
|
It seems that this issue occurs for any class that implements IDisposable. I just encountered the same issue on a different file class that implements IEnumerator which is an IDisposable. If I comment out the Dispose method the problem goes away, but of course I can't implement the interface without the Dispose method. |
This may be related to how CodeLens and Find References is being used by OmniSharp - @sudsy are you still seeing this with the latest extension? |
@cartermp It's still present. Each individual edit of either a test method or the Dispose method spins all 4 cpus on my machine for 10 - 20 seconds. |
Thanks, good to know |
@sudsy If you set |
@JoeRobich changing that setting does make the problem go away. |
@sudsy Ah, I'll open a PR to add |
Issue Description
When editing an XUnit class that inherits from IDisposable, the mono process chews up all cpu on all available cores.
I also notice there are a number of errors relating to a missing Microsoft.VisualBasic.Mono.targets file. The actual file on my system is Microsoft.VisualBasic.targets
Steps to Reproduce
Create an Xunit test project.
Make a new test class that inherits from IDisposable
Create a new test method
Editing content within that method makes the cpu spike
Expected Behavior
Editing should not cause the cpu to spike so dramatically
Actual Behavior
mono uses all of the cpu
Logs
OmniSharp log
Starting OmniSharp server at 22/08/2019, 3:38:54 pm
Target: /Users/bensudbury/Development/gen3/PVL.sln
OmniSharp server started.
Path: /Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/run
PID: 32909
The reference assemblies for framework ".NETFramework,Version=v4.7.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
/Users/bensudbury/Development/gen3/PVL.UserSettings/PVL.UserSettings.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1195,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.7.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
The reference assemblies for framework ".NETFramework,Version=v4.7.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
/Users/bensudbury/Development/gen3/PVL.AuthServer/PVL.AuthServer.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1195,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.7.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
/Users/bensudbury/Development/gen3/PVL.IdMgr/PVL.IdMgr.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1195,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
The reference assemblies for framework ".NETFramework,Version=v4.7.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
/Users/bensudbury/Development/gen3/PVL.UserSettings.Tests/PVL.UserSettings.Tests.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1195,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.7.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
/Users/bensudbury/Development/gen3/PVL.Utilities/PVL.Utilities.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(1195,5): Error: The reference assemblies for framework ".NETFramework,Version=v4.6.1" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
The imported project "/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.Mono.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
/Users/bensudbury/Development/gen3/PVL.WebService.Tests/PVL.WebService.Tests.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.CurrentVersion.targets(55,5): Error: The imported project "/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.Mono.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
The imported project "/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.Mono.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
/Users/bensudbury/Development/gen3/PVL.WebService.Core/PVL.WebService.Core.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.CurrentVersion.targets(55,5): Error: The imported project "/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.Mono.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
The imported project "/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.Mono.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
/Users/bensudbury/Development/gen3/PVL.Orl.Integration.XUnit/PVL.Orl.Integration.XUnit.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.CurrentVersion.targets(55,5): Error: The imported project "/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.Mono.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
The imported project "/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.Mono.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
/Users/bensudbury/Development/gen3/PVL.Proto.WorkerClient/PVL.Proto.WorkerClient.csproj
/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.CurrentVersion.targets(55,5): Error: The imported project "/Users/bensudbury/.vscode/extensions/ms-vscode.csharp-1.21.0/.omnisharp/1.34.0/omnisharp/.msbuild/Current/Bin/Microsoft.VisualBasic.Mono.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Attempted to update project that is not loaded: /Users/bensudbury/Development/gen3/PVL.UserSettings/PVL.UserSettings.csproj
fail: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/bensudbury/Development/gen3/PVL.AuthServer/PVL.AuthServer.csproj
fail: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/bensudbury/Development/gen3/PVL.IdMgr/PVL.IdMgr.csproj
fail: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/bensudbury/Development/gen3/PVL.UserSettings.Tests/PVL.UserSettings.Tests.csproj
fail: OmniSharp.MSBuild.ProjectManager
Attempted to update project that is not loaded: /Users/bensudbury/Development/gen3/PVL.Utilities/PVL.Utilities.csproj
C# log
Empty
Environment information
VSCode version: 1.37.1
C# Extension: 1.21.0
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 2.2.401 Commit: 729b316c13Runtime Environment:
OS Name: Mac OS X
OS Version: 10.14
OS Platform: Darwin
RID: osx.10.14-x64
Base Path: /usr/local/share/dotnet/sdk/2.2.401/
Host (useful for support):
Version: 2.2.6
Commit: 7dac9b1b51
.NET Core SDKs installed:
1.0.4 [/usr/local/share/dotnet/sdk]
2.0.0 [/usr/local/share/dotnet/sdk]
2.1.302 [/usr/local/share/dotnet/sdk]
2.1.500 [/usr/local/share/dotnet/sdk]
2.2.401 [/usr/local/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: