From 62adcde245f75150ed946e59f4680eb74a7fc4aa Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 16 Sep 2024 18:39:47 +0200 Subject: [PATCH 1/2] Fix UWP NuGet packing --- README.md | 3 ++- azure-pipelines/build.yml | 6 ++++++ ...icrosoft.Xaml.Behaviors.Uwp.Managed.nuspec | 2 +- .../Microsoft.Xaml.Interactions.Design.csproj | 21 ++++++++----------- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 11012e4b..d084c2f6 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,8 @@ The [documentation](https://github.com/Microsoft/XamlBehaviors/wiki) explains ho - Open the "BehaviorsSDKManaged.sln" solution in Visual Studio - Change Build Configuration to Release - Build [Ctrl + B] -- Run `msbuild /t:Pack src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj` +- Ensure that [nuget.exe](https://learn.microsoft.com/en-us/nuget/install-nuget-client-tools?tabs=windows) is available in PATH +- Run `msbuild /t:pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactions.Design\Microsoft.Xaml.Interactions.Design.csproj` - *(Optional)* Add `/p:TimestampPackage=true` to include the timestamp in the NuGet package version For WinUI: diff --git a/azure-pipelines/build.yml b/azure-pipelines/build.yml index 7c942682..07d6b906 100644 --- a/azure-pipelines/build.yml +++ b/azure-pipelines/build.yml @@ -106,6 +106,12 @@ extends: platform: Any CPU configuration: Release clean: true + - task: VSBuild@1 + displayName: Build UWP Managed NuGet package + inputs: + solution: src\BehaviorsSDKManaged\Microsoft.Xaml.Interactions.Design\Microsoft.Xaml.Interactions.Design.csproj + msbuildArgs: /t:Pack /p:SignType=$(SignType) /p:TimestampPackage=$(TimestampPackage) /p:PackageOutputPath="$(Build.SourcesDirectory)out" + configuration: Release - task: VSBuild@1 displayName: Build WinUI Managed NuGet package inputs: diff --git a/scripts/Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec b/scripts/Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec index 67f8eaed..ce571d81 100644 --- a/scripts/Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec +++ b/scripts/Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec @@ -1,5 +1,5 @@  - + Microsoft.Xaml.Behaviors.Uwp.Managed $version$ diff --git a/src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj b/src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj index dfc5ce70..dfae47ce 100644 --- a/src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj +++ b/src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj @@ -115,20 +115,17 @@ - - Microsoft.Xaml.Behaviors.Uwp.Managed - Microsoft.Xaml.Behaviors.Uwp.Managed - Microsoft - © Microsoft Corporation. All rights reserved. - Behavior Action Behaviors Actions Blend Managed C# Interaction Interactivity Interactions - http://go.microsoft.com/fwlink/?LinkID=708401 - http://go.microsoft.com/fwlink/?LinkID=651678 - http://go.microsoft.com/fwlink/?LinkID=708511 - ..\..\..\scripts\Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec - ..\..\..\out\NuGetPackages - + + + + + \ No newline at end of file From 6006a3b16cea14f5e2da57f6ee94ccf43ea55229 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Mon, 16 Sep 2024 18:43:34 +0200 Subject: [PATCH 2/2] Move output folder to property --- .../Microsoft.Xaml.Interactions.Design.csproj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj b/src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj index dfae47ce..da9caa20 100644 --- a/src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj +++ b/src/BehaviorsSDKManaged/Microsoft.Xaml.Interactions.Design/Microsoft.Xaml.Interactions.Design.csproj @@ -126,6 +126,9 @@ This target can be remove if we figure out how to just import the "pack" targets correctly. --> - + + ..\..\..\out\NuGetPackages + + \ No newline at end of file