-
Notifications
You must be signed in to change notification settings - Fork 420
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
[Mono] NuGet version too old on Linux #2027
Comments
Same issue here. |
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Dec 7, 2020
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Jan 4, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Jan 12, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Jan 28, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Feb 15, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Mar 19, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Mar 30, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
I seem to be having a similar issue? Also on Emacs using omnisharp-roslyn via lsp-mode. Mine is a .NET Core 3.1 project:
Is this related? |
@JordanAnthonyKing It doesn't seem to be the same issue. Can you confirm that the folder 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder' exists? |
@JoeRobich Hi, I eventually figured this out as a misnomer for an incorrectly configured project. Thanks |
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Apr 20, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
May 19, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.8.0 makes the issue disappear.
grendello
added a commit
to grendello/omnisharp-roslyn
that referenced
this issue
Jul 22, 2021
Fixes: OmniSharp#2027 Fixes the following exception when using OmniSharp on Linux (with Emacs, but possibly breaks with other LSP clients as well): ERROR: OmniSharp.MSBuild.ProjectLoader, The "ResolvePackageAssets" task failed unexpectedly. System.MissingMethodException: Method not found: NuGet.ProjectModel.LockFileTarget NuGet.ProjectModel.LockFile.GetTarget(string,string) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader.CreateReaderFromDisk (Microsoft.NET.Build.Tasks.ResolvePackageAssets task, System.Byte[] settingsHash) at Microsoft.NET.Build.Tasks.ResolvePackageAssets+CacheReader..ctor (Microsoft.NET.Build.Tasks.ResolvePackageAssets task) at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups () at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore () at Microsoft.NET.Build.Tasks.TaskBase.Execute () at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) Currently used NuGet 5.2.0 is too old, update to 5.10.0 makes the issue disappear.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I use omnisharp-roslyn with Emacs on Linux and because Mono bundled with omnisharp doesn't have any other .NET SDKs than 4.5 (and I mostly work with 4.7.2 these days),
I tend to modify the
run
script to start omnisharp with my locally built Mono from themaster
branch. Until recently it's been working fine, but with the latest update to MSBuild16.8, it broke with:
It appears that NuGet 5.2.0 which is used by omnisharp is too old. I fixed it by updating nuget to 5.8.0 (the latest) and rebuilding omnisharp. Everything works perfectly now :)
I tested it only on Linux but I suppose the same might be true on macOS.
Could you please update NuGet to the above-mentioned version? I'm happy to open a PR if needed. Thanks :)
The text was updated successfully, but these errors were encountered: