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

Update Oryx feature to install if a newer version of .NET is present #769

Closed
wants to merge 6 commits into from

Conversation

seesharprun
Copy link

Oryx fails to install if a newer version of .NET is present.

I suspect this is due to a missing --framework argument.

I also took this opportunity to spell out the full name of other dotnet build and dotnet publish arguments to make it easier to debug for the person that comes next.

@seesharprun
Copy link
Author

seesharprun commented Nov 30, 2023

@seesharprun
Copy link
Author

There is still some more work that needs to be done. Even on my local machine, I can't build Oryx from source if I have both .NET 7 and .NET 8 installed.

@seesharprun
Copy link
Author

It looks like the feature runs dotnet --version which will always return the latest version of .NET.

Instead it should check dotnet --list-sdks to see if .NET 7 is included in the list.

@seesharprun
Copy link
Author

A little more investigating has uncovered that some of the assemblies (Ex: Microsoft.NET.Sdk.Razor/source-generators/Microsoft.NET.Sdk.Razor.SourceGenerators.dll) will always use the latest .NET version if multiple versions are enabled.

I looked around on GitHub and found a couple of example issues where the .NET team says this is intentional behavior. They don't want someone to "freeze" on an old dependency and lock it in for years after moving on to newer versions of .NET.

@seesharprun
Copy link
Author

I have a new PR open on the Oryx repo to see if they are willing to bump their .NET 7-locked dependencies forward so the project can be built on both a .NET 7 and a .NET 7 + 8 environment.

@samruddhikhandale
Copy link
Member

Feel free to close this in favor of #825 which should unblock devcontainers/images#855

@seesharprun seesharprun deleted the patch-1 branch January 31, 2024 13:56
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.

2 participants