-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
The type 'Action<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=5.0.0.0 ...' #129
Comments
Could this be related to dotnet/vscode-csharp#3289 ? |
I tried the workaround suggested there and it didn't seem to have any effect: {
"MSBuild": {
"UseLegacySdkResolver": true
}
} |
FWIW, the Cake.Tool is installed locally, per recommendation, and globally for intellisense. |
No, Cake doesn't rely on MSBuild stuff. This is probably because .NET 5 deps are missing here.
This might be tricky to solve, since Bakery is currently running on .NET 4.6. |
I did a few tests, and the problem seems to have been introduced with Cake 1.0.0 with the addition of the Cake.Bakery resolves
Before Cake 1.0, it resolved to:
Starting with Cake 1.0, it resolves to:
|
So we need a Bakery Tool 🤔 |
Yes, either investigate moving Bakery to .NET 5 (will require changes on O# side on how tool is invoked) or make sure Bakery resolves a Why Cake.Core and Cake.Common targets net5 is something that I don't know. IMO ns2.0 should have been sufficient. |
As an intermediary fix, should we release a new version of Cake.Bakery that resolves |
Preferably the |
I mean, we might be more likely to drop net core 2.x monikers from Cake.Tool in future versions than net core 3.1. |
But shouldn't a net46 binary resolve the net46 assemblies? |
@bjorkstromm Sounds good to me, if
@devlead What do you mean? We don't include |
…etcoreapp3.1 Bakery currently needs Cake.Core and Cake.Common targeting netstandard2.0 only cake-build#129 (comment)
I mean, if Bakery is a |
Cake.Bakery doesn't load (via reflection) Cake.Core nor Cake.Common, it only resolves the paths which are fed to Roslyn (OmniSharp-Roslyn) as Metadatareferences when script is compiled. Resolving a path for a ns2.0 built DLL will work (and has worked), but resolving a net5 built DLL will not work. In the long run, supporting net5 (or preferably net6) is optimal. But that will require more work, both on O# side and Bakery side. How much, I don't know, "here be dragons". |
Ok can't e just ship Core / Common with bakery then? |
Sure, but the original reasoning behind this behavior was to provide intellisense for the Cake version that the user used (e.g. was installed in |
…etcoreapp3.1 Bakery currently needs Cake.Core and Cake.Common targeting netstandard2.0 only cake-build#129 (comment)
Bakery currently needs Cake.Core and Cake.Common targeting netstandard2.0 only #129 (comment)
…/0.6.2 * force-netcoreapp3-1-for-dotnet-global-tool: (GH-129) When using .NET Global tool, resolve Cake.dll to netcoreapp3.1
* hotfix/0.6.2: (GH-129) When using .NET Global tool, resolve Cake.dll to netcoreapp3.1
* hotfix/0.6.2: (GH-129) When using .NET Global tool, resolve Cake.dll to netcoreapp3.1
🎉 This issue has been resolved in version 0.6.2 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
OmniSharp log... (click to expand)
Starting OmniSharp server at 3/7/2021, 2:55:22 PM
Target: c:\augustoproiete\cake\test-bakery
OmniSharp server started.
Path: c:\Users\augustoproiete.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.8-beta.4\OmniSharp.exe
PID: 27192
Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Community 2019 16.8.31019.35 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
2: StandAlone 16.9.0 - "c:\Users\augustoproiete.vscode\extensions\ms-dotnettools.csharp-1.23.9.omnisharp\1.37.8-beta.4.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Visual Studio Community 2019 16.8.31019.35 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin"
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'c:\augustoproiete\cake\test-bakery'.
info: OmniSharp.Cake.CakeProjectSystem
Found 1 Cake files.
info: OmniSharp.Cake.Services.CakeScriptService
Using Cake.Bakery at c:\augustoproiete\cake\test-bakery\tools\Cake.Bakery\tools\Cake.Bakery.exe
info: OmniSharp.Cake.CakeProjectSystem
Added Cake project 'c:\augustoproiete\cake\test-bakery\build.cake' to the workspace.
info: OmniSharp.MSBuild.ProjectSystem
No solution files found in 'c:\augustoproiete\cake\test-bakery'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\augustoproiete\cake\test-bakery'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\augustoproiete\cake\test-bakery' on host 11084.
Received response for /quickinfo but could not find request.
Repro steps:
"omnisharp.path": "latest"
)N.B.: The issue goes away if I install the .NET Core runner and restart OmniSharp as reported by @rmbrunet
The text was updated successfully, but these errors were encountered: