GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add global.json to pick correct SDK version by rkeithhill · Pull Request #5118 · PowerShell/PowerShell

Conversation

@rkeithhill

@rkeithhill Keith Hill (rkeithhill) commented Oct 14, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Fix #5015

This sets the version of the dotnet SDK that should be used to compile the project. I happen to have newer version of the SDK (2.0.2) on my machine and without this file, the build attempts to use the newer version of the SDK which doesn't work.

BTW if you have 2.0.2 installed, without this file when you run Start-PSBuild you get this warning and the build stops - even if you have 2.0.0 installed:

5> Start-PSBuild
WARNING: The currently installed .NET Command Line Tools is not the required version.

Installed version: 2.0.2
Required version: 2.0.0

Fix steps:

1. Remove the installed version from:
    - on windows '$env:LOCALAPPDATA\Microsoft\dotnet'
    - on macOS and linux '$env:HOME/.dotnet'
2. Run Start-PSBootstrap or Install-Dotnet
3. Start-PSBuild -Clean

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@rkeithhill
Add global.json to pick correct SDK version
716a8b5
markekraus
Mark Kraus (markekraus) suggested changes Oct 14, 2017
View reviewed changes
Comment thread global.json Outdated
"sdk": {
"version": "2.0.0"
}
} No newline at end of file

@markekraus Mark Kraus (markekraus) Oct 14, 2017

Copy link
Copy Markdown
Contributor

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.

Please add a newline at the end of the file.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rkeithhill Keith Hill (rkeithhill) Oct 14, 2017

Copy link
Copy Markdown
Collaborator Author

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.

Done. BTW the original file was simply the output of running:

dotnet new global.json --sdk-version 2.0.0

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@markekraus
Mark Kraus (markekraus) requested a review from Dongbo Wang (daxian-dbw) October 14, 2017 12:48
@iSazonov Ilya (iSazonov) assigned Travis Plunk (TravisEz13) Oct 14, 2017
@rkeithhill
Add final newline to make POSIX compliant
331ebae
markekraus
Mark Kraus (markekraus) approved these changes Oct 14, 2017
View reviewed changes
@iSazonov

Ilya (iSazonov) commented Oct 18, 2017

Copy link
Copy Markdown
Collaborator

Dongbo Wang (@daxian-dbw) Could you please review this bit change? It looks very good.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov Ilya (iSazonov) mentioned this pull request Oct 20, 2017
Build powershell core in Visual Studio 2017 #3400
Closed
@rkeithhill

Keith Hill (rkeithhill) commented Oct 21, 2017

Copy link
Copy Markdown
Collaborator Author

Any update on this? I'm constantly having to create this file on every new branch I create. Otherwise, I can't build. Plus this allows the PowerShell team to specify which version of the SDK is requires. This will reduce contributor issues when their build fails with the message above. And when the team is ready to move to a later version of the SKD like 2.0.2, the global.json can be updated to reflect that change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SteveL-MSFT
Steve Lee (SteveL-MSFT) approved these changes Oct 22, 2017
View reviewed changes
@iSazonov Ilya (iSazonov) mentioned this pull request Oct 23, 2017
AppVeyor build fails due to addition of .NET Core 2.0.2 to build image #5201
Closed
@daxian-dbw
Dongbo Wang (daxian-dbw) merged commit 6acbf5c into PowerShell:master Oct 23, 2017
@daxian-dbw

Dongbo Wang (daxian-dbw) commented Oct 23, 2017

Copy link
Copy Markdown
Member

Keith Hill (@rkeithhill) Thanks for this PR! Sorry that we had it slipped off our radar.

rkeithhill reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daxian-dbw Dongbo Wang (daxian-dbw) mentioned this pull request Oct 23, 2017
Export-Csv Test Improvements #5150
Merged
This was referenced Nov 1, 2017
Update powershell to use 2.0.4-servicing dotnet core runtime #5295
Merged
.NET Core tools version check in build.psm1 blocks the build #5260
Closed
@rkeithhill
Keith Hill (rkeithhill) deleted the rkeithhill/add-global-json branch May 29, 2019 15:21
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@rkeithhill @daxian-dbw
Add global.json to pick correct SDK version (PowerShell#5118)
c64693a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@SteveL-MSFT Steve Lee (SteveL-MSFT) SteveL-MSFT approved these changes
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
+1 more reviewer
@markekraus Mark Kraus (markekraus) markekraus approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@TravisEz13 Travis Plunk (TravisEz13)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@rkeithhill @iSazonov @daxian-dbw @markekraus @SteveL-MSFT @TravisEz13
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.