-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Try fixing rejection of preview SDK #51591
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
Closed
nagilson
wants to merge
13
commits into
dotnet:release/9.0.3xx
from
nagilson:nagilson-reject-vs-previews-alt
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
bff1870
Enable preview SDK in Test run
nagilson 5725c74
Set the Resolver CLI Dir
nagilson 40ba94a
Use \d as it represents the host location, while \r represents the ms…
nagilson 9769317
remove possible ai nonsense
nagilson c477e2a
try to enable preview sdks on build
nagilson a82d8d9
consider that vs tool may not exist?
nagilson eaa36c7
also allow pre-release in main global.json
nagilson 0b089d5
move allowprerelrease to sdk root json node
nagilson fd4017b
apparently there's a 'dotnet' node
nagilson 35bae26
Set MSBuildSDKsPath
nagilson 9165c01
Try to force VS to enable preview SDKs
nagilson 0311c56
Fix formatting
nagilson c762b23
try to detect vs version folder in case it doesn't exist
nagilson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| param() | ||
|
|
||
| $RepoRoot = Split-Path -Parent $PSScriptRoot | ||
| if (-not $RepoRoot) { | ||
| throw "Unable to determine repository root." | ||
| } | ||
|
|
||
| . "$PSScriptRoot\common\tools.ps1" | ||
|
|
||
| try { | ||
| $vsInfo = LocateVisualStudio | ||
| } | ||
| catch { | ||
| Write-Host "LocateVisualStudio failed: $_" | ||
| return | ||
| } | ||
|
|
||
| if ($null -eq $vsInfo) { | ||
| Write-Host "No Visual Studio instance detected; preview SDKs remain enabled by default." | ||
| return | ||
| } | ||
|
|
||
| $vsId = $vsInfo.instanceId | ||
| $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] | ||
| $instanceDir = Join-Path $env:USERPROFILE "AppData\Local\Microsoft\VisualStudio\$vsMajorVersion.0_$vsId" | ||
|
|
||
| Create-Directory $instanceDir | ||
|
|
||
| $sdkFile = Join-Path $instanceDir 'sdk.txt' | ||
| 'UsePreviews=True' | Set-Content -Path $sdkFile -Encoding ASCII | ||
|
|
||
| Write-Host "Updated $sdkFile" | ||
| Get-Content -Path $sdkFile | ForEach-Object { Write-Host " $_" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.