Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Move Tye to .NET 6 #1215

Merged
merged 10 commits into from
Nov 16, 2021
Merged

Move Tye to .NET 6 #1215

merged 10 commits into from
Nov 16, 2021

Conversation

philliphoff
Copy link
Contributor

@philliphoff philliphoff commented Nov 11, 2021

Moves the Tye CLI and related components (like the container proxy) to .NET 6. Updates test asset projects to .NET 6 as well. These changes mean development machines must have .NET 6 installed in order to use Tye in addition to the .NET SDK/runtime used by the projects built/started by Tye. For example, if your application still targets .NET Core 3.1, you will need to have both the .NET 6 runtime and the .NET Core 3.1 SDK/runtime installed.

Existing .NET Standard libraries (e.g. the configuration library) will continue to target .NET Standard.

NOTE: Samples are not planned to be updated with this PR. This work will be done in a follow-up PR.

Related to #1213
Resolves #1216

@philliphoff philliphoff marked this pull request as ready for review November 13, 2021 00:07
Copy link

@ravipal ravipal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/Microsoft.Tye.Proxy/Program.cs Show resolved Hide resolved
var majorString = element.Value.GetProperty("major").GetString();
var minorString = element.Value.GetProperty("minor").GetString();

if (majorString != null && minorString != null)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will element.Value.GetProperty("major").GetString() ever return null?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GetProperty() will return null if the property doesn't exist, which is unlikely, but could conceivably happen.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it throws error instead of returning null. Even if it returns null, the .GetString() will result into null ref exception.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, sorry, my mistake. It's GetString() which could return null (if the property exists but is set to null).

@philliphoff
Copy link
Contributor Author

Should this https://github.com/dotnet/tye/blob/main/docs/getting_started.md be updated as well?

Yes, thanks for thinking of that. I made a quick pass through the docs and updated outdated references to .NET Core.

@philliphoff philliphoff merged commit 1c8577f into main Nov 16, 2021
@philliphoff philliphoff deleted the philliphoff-dotnet-6 branch November 16, 2021 17:20
@marinasundstrom
Copy link

Too late, but this is missing:

In order for Tye to work on a Mac that has both the arm64 and x64 SDKs you need to supply the -a x64parameter when installing the tool. That is because Tye is dependant on .NET Core 3.1 which is x64.

Example:

dotnet tool install -a x64 -g Microsoft.Tye --version "0.10.0-alpha.21420.1"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: move to latest Mac OS
3 participants