-
Notifications
You must be signed in to change notification settings - Fork 200
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
Upgrade DataGateway Solution to .Net 6 #164
Conversation
Will investigate pipeline failures. |
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.
Looks like the failures in the pipeline are just formatting issues. Dotnet format should be able to fix this. This extension might fix it automatically for you on save. |
hey, @Mathos1432 , do you know if we can configure , within the Build-pipelines.yml file, the version of .Net the container is built with? In this example failed task The Docker step is running: |
@seantleonard isn't it using https://github.com/Azure/hawaii-gql/blob/main/Dockerfile as the Dockerfile for build? You could bump that to .NET 6, or parameterise it if desired. |
Now pending resolution of dotnet/format#1519 and workaround for manually installing dotnet 6 on Mac runs. |
@@ -23,6 +23,11 @@ variables: | |||
buildPlatform: 'Any CPU' | |||
buildConfiguration: 'Release' | |||
steps: | |||
- task: UseDotNet@2 |
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.
Just confirming this is only needed when the imageName is macOS-latest, right as per description?
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.
As-is, this will download and install .NET 6.x.x SDK for Cosmos tests on all platforms. The effect seems minimal (7-10seconds) on Linux/Mac, but Windows, the task is now ~45 seconds. Maybe as future optimization step, we could specifically not run this on windows, as it is preinstalled on Win2022 images.
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.
Looks good, thanks for unblocking this!
Could you please update the PR description with latest before merging?
Summary
Upgrades the .csproj files to build against .Net 6. Also updates the Build pipeline files to use
Ubuntu-latest
andwindows-2022
as they have .NET 6 installed.Example of
System.Text.JsonSerializer
operation. This may also address comments relevant to #60Example:
JsonSerializer.SerializeToDocument(value: "{}", inputType: typeof(string));
Docs: https://docs.microsoft.com/dotnet/api/system.text.json.jsonserializer.serializetodocument?view=net-6.0#system-text-json-jsonserializer-serializetodocument(system-object-system-type-system-text-json-jsonserializeroptions)
resolves #154