Skip to content
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

Force specific SDK and runtime versions. #377

Merged
merged 9 commits into from
Mar 7, 2019

Conversation

johnstairs
Copy link
Member

@johnstairs johnstairs commented Mar 6, 2019

Description

.NET runtime version 2.2.2 has a bug that breaks our end to end tests when run locally. So we want to make sure to use 2.2.1.

There are two default behaviors that work against this goal:

  1. At runtime, the latest patch version of the runtime is used. So if you happen to have 2.2.2 installed on your system, it will use that instead of the requested 2.2.1.
  2. If the SDK version in global.json is not installed on the system, the latest installed SDK is used instead.

For (1), in order to prevent the lastest runtime patch from being used, we inject:

"applyPatches": false

into the runtimeconfig.json file

For (2), we want to make sure that only the specified sdk is used. The reason for this is to be able to target the specific runtime version that the SDK ships with. To enforce this, I created an msbuild task that reads the global.json file and compares that version with the actual sdk version used during the build. If they don't match the build fails.

Related issues

Addresses #373

@johnstairs johnstairs marked this pull request as ready for review March 6, 2019 08:49
@johnstairs johnstairs merged commit e8faf39 into master Mar 7, 2019
@johnstairs johnstairs deleted the personal/jostairs/deterministic-sdk-version branch March 15, 2019 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants