From 7d2af2775dbe382420f5a66b45e3e8a9d42b760c Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Fri, 28 May 2021 18:39:12 +0100 Subject: [PATCH] try build and pack with nuspec --- azure-pipelines.yml | 17 +++++-- build/Build.Microsoft.Maui.Graphics-net6.sln | 49 ------------------- ...t.Maui.Graphics.Win2D.WinUI.Desktop.nuspec | 34 +++++++++++++ eng/package.ps1 | 30 ++++++++---- 4 files changed, 69 insertions(+), 61 deletions(-) delete mode 100644 build/Build.Microsoft.Maui.Graphics-net6.sln create mode 100644 build/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.nuspec diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9c833bb..95310ec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -98,14 +98,25 @@ stages: displayName: update vs - script: dotnet cake --configuration=${{ BuildCondition }} - displayName: pack nugets + displayName: build net6 solutions + + - task: NuGetCommand@2 + displayName: 'Pack nupkg' + inputs: + command: 'pack' + packagesToPack: | + build/Microsoft.Maui.Graphics.nuspec + build/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.nuspec + packDestination: '$(Build.ArtifactStagingDirectory)/${{ BuildCondition }}' + configuration: ${{ BuildCondition }} + basePath: '$(System.DefaultWorkingDirectory)' + versioningScheme : 'byEnvVar' + versionEnvVar: 'BUILD_BUILDNUMBER' - task: CopyFiles@2 displayName: 'Copy SignList.xml and Packages' inputs: Contents: | - **/Microsoft.Maui.*.nupkg - **/Microsoft.Maui.*.snupkg **/SignList.xml TargetFolder: '$(Build.ArtifactStagingDirectory)/${{ BuildCondition }}' flattenFolders: true diff --git a/build/Build.Microsoft.Maui.Graphics-net6.sln b/build/Build.Microsoft.Maui.Graphics-net6.sln deleted file mode 100644 index a5a34c8..0000000 --- a/build/Build.Microsoft.Maui.Graphics-net6.sln +++ /dev/null @@ -1,49 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30523.141 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{9E4B772B-D417-4147-B8B1-FD9E3B0B4EC5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2BAF0999-6876-4091-9FCE-CBC56D80BEC3}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{8A2197EB-6E30-495D-9DE9-2E40032FB2E9}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Graphics-net6", "..\src\Microsoft.Maui.Graphics\Microsoft.Maui.Graphics-net6.csproj", "{8E78C89F-7AE7-4342-BFFE-227873D89397}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Graphics.Win2D.WinUI.Desktop-net6", "..\src\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop\Microsoft.Maui.Graphics.Win2D.WinUI.Desktop-net6.csproj", "{00145282-A205-4230-8AC8-161E59E5C00A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - AppStore|Any CPU = AppStore|Any CPU - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8E78C89F-7AE7-4342-BFFE-227873D89397}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {8E78C89F-7AE7-4342-BFFE-227873D89397}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {8E78C89F-7AE7-4342-BFFE-227873D89397}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E78C89F-7AE7-4342-BFFE-227873D89397}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8E78C89F-7AE7-4342-BFFE-227873D89397}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E78C89F-7AE7-4342-BFFE-227873D89397}.Release|Any CPU.Build.0 = Release|Any CPU - {00145282-A205-4230-8AC8-161E59E5C00A}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU - {00145282-A205-4230-8AC8-161E59E5C00A}.AppStore|Any CPU.Build.0 = Debug|Any CPU - {00145282-A205-4230-8AC8-161E59E5C00A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {00145282-A205-4230-8AC8-161E59E5C00A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {00145282-A205-4230-8AC8-161E59E5C00A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {00145282-A205-4230-8AC8-161E59E5C00A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {8E78C89F-7AE7-4342-BFFE-227873D89397} = {9E4B772B-D417-4147-B8B1-FD9E3B0B4EC5} - {00145282-A205-4230-8AC8-161E59E5C00A} = {9E4B772B-D417-4147-B8B1-FD9E3B0B4EC5} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {0B07E734-6AE2-4A12-AD60-C072F3695854} - EndGlobalSection -EndGlobal diff --git a/build/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.nuspec b/build/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.nuspec new file mode 100644 index 0000000..f25e7f2 --- /dev/null +++ b/build/Microsoft.Maui.Graphics.Win2D.WinUI.Desktop.nuspec @@ -0,0 +1,34 @@ + + + + Microsoft.Maui.Graphics.Win2D.WinUI.Desktop + $version$ + Microsoft.Maui.Graphics.Win2D.WinUI + Microsoft + Microsoft + true + Microsoft.Maui.Graphics for WinUI powered by Win2D + Microsoft.Maui.Graphics for WinUI powered by Win2D + https://github.com/dotnet/Microsoft.Maui.Graphics + © Microsoft Corporation. All rights reserved. + + MIT + C# + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eng/package.ps1 b/eng/package.ps1 index f9cb882..cee1c25 100644 --- a/eng/package.ps1 +++ b/eng/package.ps1 @@ -14,7 +14,8 @@ if($IsWindows) } $artifacts = Join-Path $PSScriptRoot ../artifacts -$sln = Join-Path $PSScriptRoot ../Microsoft.Maui.Graphics-net6.sln +$slnnet6 = Join-Path $PSScriptRoot ../Microsoft.Maui.Graphics-net6.sln +$sln = Join-Path $PSScriptRoot ../build/Build.Microsoft.Maui.Graphics.Windows.sln # Bootstrap ./bin/dotnet/ $csproj = Join-Path $PSScriptRoot ../build/DotNet/DotNet.csproj @@ -61,7 +62,17 @@ if ($OnWindows) # Put our local dotnet.exe on PATH first so Visual Studio knows which one to use $env:PATH=($dotnet + [IO.Path]::PathSeparator + $env:PATH) - # Have to build the solution first so the xbf files are there for pack + # Have to build the solution first so the xbf files are there for pack + & $msbuild $slnnet6 ` + /p:configuration=$configuration ` + /p:SymbolPackageFormat=snupkg ` + /restore ` + /t:build ` + /p:Packing=true ` + /bl:"$artifacts/maui-graphics-net6-build-$configuration.binlog" + if (!$?) { throw "Build failed." } + + & $msbuild $sln ` /p:configuration=$configuration ` /p:SymbolPackageFormat=snupkg ` @@ -69,14 +80,15 @@ if ($OnWindows) /t:build ` /p:Packing=true ` /bl:"$artifacts/maui-graphics-build-$configuration.binlog" - if (!$?) { throw "Build failed." } + if (!$?) { throw "Build failed." } - & $msbuild $sln ` - /p:configuration=$configuration ` - /p:SymbolPackageFormat=snupkg ` - /t:pack ` - /p:Packing=true ` - /bl:"$artifacts/maui-graphics-pack-$configuration.binlog" + + # & $msbuild $sln ` + # /p:configuration=$configuration ` + # /p:SymbolPackageFormat=snupkg ` + # /t:pack ` + # /p:Packing=true ` + # /bl:"$artifacts/maui-graphics-pack-$configuration.binlog" if (!$?) { throw "Pack failed." } } finally