-
Notifications
You must be signed in to change notification settings - Fork 31
Move from netcoreapp3.1 to net6.0
#195
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ pr: | |
|
|
||
| # Global variables | ||
| variables: | ||
| DotNetCoreVersion: 3.1.100 | ||
| DotNetCoreVersion: 6.0.x | ||
|
|
||
| jobs: | ||
| - job: build | ||
|
|
@@ -42,22 +42,8 @@ jobs: | |
| inputs: | ||
| version: $(DotNetCoreVersion) | ||
|
|
||
| - task: NuGetToolInstaller@0 | ||
| displayName: 'Install NuGet' | ||
| inputs: | ||
| versionSpec: 5.x | ||
|
|
||
| - task: NuGetCommand@2 | ||
| displayName: 'NuGet Restore' | ||
| inputs: | ||
| restoreSolution: Xamarin.Android.Tools.sln | ||
| feedsToUse: config | ||
| nugetConfigPath: NuGet.config | ||
|
|
||
| - task: MSBuild@1 | ||
| - script: dotnet build Xamarin.Android.Tools.sln -bl:$(Build.ArtifactStagingDirectory)/build.binlog | ||
| displayName: 'Build solution Xamarin.Android.Tools.sln' | ||
| inputs: | ||
| solution: Xamarin.Android.Tools.sln | ||
|
|
||
| - task: DotNetCoreCLI@2 | ||
| displayName: 'Run Tests' | ||
|
|
@@ -73,15 +59,13 @@ jobs: | |
| Write-Host "##vso[task.setvariable variable=xat.nuget.version]$version" | ||
| condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) | ||
|
|
||
| - task: MSBuild@1 | ||
| - script: dotnet pack src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj -p:Version=$(xat.nuget.version) -p:PackageOutputPath=$(Build.ArtifactStagingDirectory) -bl:$(Build.ArtifactStagingDirectory)/pack.binlog | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could also use |
||
| displayName: 'Build NuGet' | ||
| inputs: | ||
| solution: 'src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj' | ||
| msbuildArguments: '/t:pack /p:Version=$(xat.nuget.version) /p:OutputPath=$(Build.ArtifactStagingDirectory)' | ||
| condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) | ||
|
|
||
| - task: PublishBuildArtifacts@1 | ||
| - task: PublishPipelineArtifact@1 | ||
| displayName: Upload Artifacts | ||
| inputs: | ||
| pathtoPublish: $(Build.ArtifactStagingDirectory) | ||
| condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT')) | ||
| path: $(Build.ArtifactStagingDirectory) | ||
| artifactName: $(vmImage) | ||
| condition: always() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
It may be preferable to use DotNetCoreCLI@2 here, though it shouldn't make much of a difference
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.
I thought I would also have to put
command: buildorcommand: pack.Does it do anything extra that is helpful? Like insert warnings inline in PRs? Something else?
Otherwise a one-line
script:block seems simpler?Uh oh!
There was an error while loading. Please reload this page.
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.
The
command: buildparam is used by default, so it doesn't need to be set when building. You would need to setcommand: packfor packing though.I think the only advantage to using the task over a script is that it will probe multiple locations for
dotnet, but since we're using theUseDotNettask there shouldn't be a difference either way.There may also be some improvements to the
Checkstab of PRs/commits when things fail like you suggested (for instance some extra logger settings are set), though I am not positive.