-
-
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
When referencing dll compiled with .net standard 2, intellisense in vs code stop working. #81
Comments
I think, this issue is related to OmniSharp/omnisharp-roslyn#996 But the solution in that issue dosn't works in .cake files. The solution is:
|
I'm getting the same thing, but with a normal .NET Framework assembly. Nothing .NET Core in the picture. |
@jnm2 ah, I see.. Don't think we actually handle |
I ran into the same problem today with |
@gabomgp said:
Yes, we don't currently support that directive in Cake. |
@mholo65 The bigger issue is that I didn't need the |
@jnm2 oh, totally missed that. No there's no issue for that. Would you mind submitting one. |
Sure. #86 |
@mholo65 The reason is that i want to regenerate the whole database and populate that using entity framework core and cake as the task runner. But, the models and the context are projects compiled with .net standard 2. I must use the context and models to use code first migrations with entity framework core, to create the empty database and populate it easily in developer's machines. I can't do it from cake because the code is in a .net standard 2 library. So, that's the reason :) |
@gabomgp I'm sorry but I don't understand this. Cake does not support netstandard2.0 in any way, so why would it help to have support for it in Bakery? You simply can't reference a netstandard2.0 assembly in a cake script until we've merged the work done in Cake for supporting it. Would you mind elaborating on why you would need Bakery support for this when it's not supported by the Cake script runner? |
@gabomgp wouldn’t it make more sense to use the .NET Core EF Command Line Tools for dropping and creating your database? You can still use Cake as task runner and no need to reference DBContext in your Cake script. |
@mholo65 It's a good alternative. Thanks for the suggestion. I'll try it. |
@ecampidoglio hmm, seems like some reference is not passed correctly to Roslyn. What version of Cake are you using? Are you using Cake, Cake.CoreCLR or Cake.Tool? What version of Cake.Bakery are you using? What version of C# for VS Code are you using? Do you use the default OmniSharp version shipped with the VS Code extension, or do specify another version? Do you have a minimal script where this can be reproduced? |
I'll see if I can reproduce this in a minimal script. Btw, everything works as expected with the exact same repo on Windows. |
This happens every time with the simplest of scripts: Task("Hello")
.Does(() =>
{
Information("World");
}) Error message:
Here's the OmniSharp log:
|
Hmm, might be something with the Mono version on your system (or with the one shipped with OmniSharp). Could you try playing with the omnisharp.useGlobalMono in VS Code and see if it helps? Also, can you reproduce using Cake or Cake.Tool? |
Setting the Here's the log:
|
I create a minimal test case.
The problem is in intellisense is not working when i reference a dll copiled with .net standard 2.0
The code is avalaible in https://github.com/gabomgp/test-case-bug-bakery
In the code linked, the build.cake is inside a folder with a project in .net standard 2.0. But, the problem is showed too when the build.cake is outside that folder, and inside the solution's folder, where there are other projects, some projects compiled with .net standard 2.0 and others with .net 4.6.
The text was updated successfully, but these errors were encountered: