-
Notifications
You must be signed in to change notification settings - Fork 174
(Feature proposal) Ability to specify SDK #689
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
Comments
That makes sense to me, we would still default to I also think this should be quite easy to implement (unless I am being a short-sighted). |
Is there any workaround I could use today that would allow |
We will include this feature as part of the upcoming release. #694 |
Closed by #694 |
We currently have a couple of issues (#636 , #602 and #588) which points back to the fact that it is currently not possible to specify the SDK being used by
dotnet-script
.Today we have a
csproj
template file that looks like this.Say now that we wanted to spin up a minimal web api in a script.
This would require the project sdk to be set to
<Project Sdk="Microsoft.NET.Sdk.Web">
, but since that is basically "hardcoded" into the template we currently don't have a way for specifying the SDK.For this to work not only during execution, but also from the OmniSharp side we would need something that can be read when resolving dependencies (runtime and compilation).
Since
<Project Sdk="Microsoft.NET.Sdk">
basically is a way to specify which assemblies from the shared framework to be pulled in, it might make sense to extend upon the#r
directive here.Suggested syntax
We will then use the given sdk when creating the csproj file used for restore and dependency resolving.
The default would be
Microsoft.NET.Sdk
as before unless specified in the#r
directivecsproj file with
#r "sdk:Microsoft.NET.Sdk.Web"
@filipw Thoughts? 😃
The text was updated successfully, but these errors were encountered: