-
Notifications
You must be signed in to change notification settings - Fork 160
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
Shebang directive on top of the file breaks #r SDK parsing #723
Comments
Same issue, SDK is installed 🤷♂️
|
it works on my machine™️ 😀 |
|
do you have the according to the logs, the script uses |
@filipw yes, there seem to be some kind of miss match happening.
|
oh I see the bug now. it's the shebang on top that breaks it. Likely a parser problem. |
thanks Filip, that's exactly it 👍 |
I finally got a chance to get back to this. Yes that seems to be the problem. Also i noticed that the "sdk directive" must be on the first line of the script. If i skip a line putting it on line 2, i also get the AspCore dependencies not found. Noticed in Visual Code Intellisense complains those dependencies are not available but the code does run. Is that because the enable is missing from the .csproj file? I have another dotnet app that i removed that from the .csproj and received the same intellisense warnings but the app. runs. so i assume its the same thing. Is there a template that's used that i can add this so when the .csproj file is being built that tag will be there? |
I would like the winforms / wpf sdk to be usable as well with this. |
In the Specifying an sdk u show an example creating a web app:
#r "sdk:Microsoft.NET.Sdk.Web"
using Microsoft.AspNetCore.Builder;
var a = WebApplication.Create();
a.MapGet("/", () => "Hello world");
a.Run();
====
I get error saying 'AspNetCore' does not exist in namespace 'Microsoft'.
Has this changed?
environment:
Mac osx ARM
i have Core6 and Core7 Frameworks installed. Currently using Core7.
I created project using command as shown in doc $> dotnet script init
thx ~Marvin Foster
mmarvb7@gmail.com or marvinfoster@finsync.com
The text was updated successfully, but these errors were encountered: