-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix vs2022 Image rejecting preview sdks, failing to resolve sdks
#51558
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
Fix vs2022 Image rejecting preview sdks, failing to resolve sdks
#51558
Conversation
|
I was working in another PR to test multiple options at once: #51591 |
I edited the json wrong in dotnet#51558. If this is all that's needed, the fix can be simpler. I think this likely isn't the case since there are tests with a custom global.json file, but it's worth trying.
- VS uses the local appdata, VS versioned folder, sdk.txt file to determine whether or not to accept preview sdks - VS Release rejects preview SDKs by default which causes the msbuild sdk resolver to not find sdks, as msbuild respects the vs settings - This changes the vs settings to enable our internal SDKs to be found by msbuild when it's going under test. - Possible improvements: this PR assumes sdk.txt content ordering does not matter - based on VS code this appears to be true but could change in the future Also tried: - modifying global.json to enable preview sdks, which was not enough. some tests have a custom global.json and it seems to not take precedence setting env vars such as msbuildsdks which did not take precedence over the vs setting This commit is a condensed version of the work done in dotnet#51591 and dotnet#51598
d111492 to
665cdcb
Compare
|
/backport to release/9.0.1xx |
|
/backport to release/8.0.3xx |
|
Started backporting to |
|
@nagilson backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Set sdk.txt file to enable preview SDKs
Using index info to reconstruct a base tree...
M build/RunTestsOnHelix.cmd
Falling back to patching base and 3-way merge...
Auto-merging build/RunTestsOnHelix.cmd
CONFLICT (content): Merge conflict in build/RunTestsOnHelix.cmd
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Set sdk.txt file to enable preview SDKs
Error: The process '/usr/bin/git' failed with exit code 128 |
|
@nagilson backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Set sdk.txt file to enable preview SDKs
Using index info to reconstruct a base tree...
M build/RunTestsOnHelix.cmd
Falling back to patching base and 3-way merge...
Auto-merging build/RunTestsOnHelix.cmd
CONFLICT (content): Merge conflict in build/RunTestsOnHelix.cmd
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Set sdk.txt file to enable preview SDKs
Error: The process '/usr/bin/git' failed with exit code 128 |
|
@nagilson backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Set sdk.txt file to enable preview SDKs
Using index info to reconstruct a base tree...
M build/RunTestsOnHelix.cmd
Falling back to patching base and 3-way merge...
Auto-merging build/RunTestsOnHelix.cmd
CONFLICT (content): Merge conflict in build/RunTestsOnHelix.cmd
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Set sdk.txt file to enable preview SDKs
Error: The process '/usr/bin/git' failed with exit code 128 |
|
/backport to release/9.0.1xx |
|
Started backporting to |
Co-authored-by: nagilson <23152278+nagilson@users.noreply.github.com>
Co-authored-by: nagilson <23152278+nagilson@users.noreply.github.com>
|
I suppose we might want to fix this for when vs 2026 goes into release |
|
/backport to release/10.0.1xx |
|
/backport to release/10.0.2xx |
|
Started backporting to |
|
/backport to main |
|
Started backporting to |
|
Started backporting to |
|
@nagilson backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Set sdk.txt file to enable preview SDKs
Applying: Get global json tools vs by default when locating VS
Using index info to reconstruct a base tree...
M eng/common/tools.ps1
Falling back to patching base and 3-way merge...
Auto-merging eng/common/tools.ps1
CONFLICT (content): Merge conflict in eng/common/tools.ps1
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Get global json tools vs by default when locating VS
Error: The process '/usr/bin/git' failed with exit code 128 |
|
@nagilson backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Set sdk.txt file to enable preview SDKs
Applying: Get global json tools vs by default when locating VS
Using index info to reconstruct a base tree...
M eng/common/tools.ps1
Falling back to patching base and 3-way merge...
Auto-merging eng/common/tools.ps1
CONFLICT (content): Merge conflict in eng/common/tools.ps1
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Get global json tools vs by default when locating VS
Error: The process '/usr/bin/git' failed with exit code 128 |
|
@nagilson backporting to git am output$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Set sdk.txt file to enable preview SDKs
Applying: Get global json tools vs by default when locating VS
Using index info to reconstruct a base tree...
M eng/common/tools.ps1
Falling back to patching base and 3-way merge...
Auto-merging eng/common/tools.ps1
CONFLICT (content): Merge conflict in eng/common/tools.ps1
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Get global json tools vs by default when locating VS
Error: The process '/usr/bin/git' failed with exit code 128 |
|
Actually, we've informed Arcade and they can fix all of the repos, so I think the urgency of pushing this to 10 / 11 is not needed. |
resolves #51525,
VS uses the local appdata, VS versioned folder, sdk.txt file to determine whether or not to accept preview sdks
VS Release rejects preview SDKs by default which causes the msbuild sdk resolver to not find sdks, as msbuild respects the vs settings
This changes the vs settings to enable our internal SDKs to be found by msbuild when it's going under test.
Arcade doesn't fallback to the global VS if the vs requirements is missing, but it should, so changed this
Possible improvements: this PR assumes sdk.txt content ordering does not matter - based on VS src code this appears to be true but could change in the future
Also tried:
modifying global.json to enable preview sdks, which was not enough. some tests have a custom global.json and it seems to not take precedence
setting env vars such as msbuildsdks which did not take precedence over the vs setting.