-
Notifications
You must be signed in to change notification settings - Fork 672
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
Use the .NET runtime extension to find an appropriate .NET install #7684
base: main
Are you sure you want to change the base?
Conversation
env: this.getEnvironmentVariables(dotnetPath), | ||
}; | ||
let dotnetExecutablePath: string; | ||
if (commonOptions.dotnetPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be deprecated in favor of the options on the .net install tool side. However I plan to tackle that in a separate PR as we'll need to separate out the O# usage of this option.
}, | ||
versionSpecRequirement: 'greater_than_or_equal', | ||
}; | ||
const result = await vscode.commands.executeCommand<string>('dotnet.findPath', findPathRequest); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi @nagilson - https://github.com/dotnet/vscode-dotnet-runtime/blob/a2e6a5c385190fe8e48e51dca17897b3a209d4f1/vscode-dotnet-runtime-extension/src/test/functional/DotnetCoreAcquisitionExtension.test.ts#L235 appears to indicate it returns a IDotnetAcquireResult
, but it appears to only ever return a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can return an IDotnetAcquireResult
if the existingDotnetPath
is set. It should always return an IDotnetAcquireResult
. This was a mistake on my part, thank you for bringing this to my attention. I will make a fix.
@@ -83,6 +84,35 @@ export async function activate( | |||
requiredPackageIds.push('OmniSharp'); | |||
} | |||
|
|||
const dotnetRuntimeExtensionId = 'ms-dotnettools.vscode-dotnet-runtime'; | |||
const requiredDotnetRuntimeExtensionVersion = '2.2.1'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too bad this can't be expressed in the package.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, unfortunately no versions in extension dependencies :(
converting to draft - there is one slight modification to the API coming in version |
C# extension side of microsoft/vscode-dotnettools#1243
Switches from our custom dotnet resolution to call the .net install tool API. Also ensures that a high enough version of the install tool exists.