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

Fix UWP NuGet packing #273

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion scripts/Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<package >
<package>
<metadata>
<id>Microsoft.Xaml.Behaviors.Uwp.Managed</id>
<version>$version$</version><!--Overridden using -Version switch in nuget pack command-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,20 @@
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<PropertyGroup>
<PackageId>Microsoft.Xaml.Behaviors.Uwp.Managed</PackageId>
<Title>Microsoft.Xaml.Behaviors.Uwp.Managed</Title>
<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageTags>Behavior Action Behaviors Actions Blend Managed C# Interaction Interactivity Interactions</PackageTags>
<PackageLicenseUrl>http://go.microsoft.com/fwlink/?LinkID=708401</PackageLicenseUrl>
<PackageProjectUrl>http://go.microsoft.com/fwlink/?LinkID=651678</PackageProjectUrl>
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=708511</PackageIconUrl>
<NuspecFile>..\..\..\scripts\Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec</NuspecFile>
<PackageOutputPath>..\..\..\out\NuGetPackages</PackageOutputPath>
</PropertyGroup>
<Import Project="..\Version\NuGetPackageVersion.props" />
<Import Project="..\..\..\scripts\Microsoft.Xaml.Behaviors.Signing.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets" Condition="Exists('..\packages\Microsoft.VisualStudioEng.MicroBuild.Core.1.0.0\build\Microsoft.VisualStudioEng.MicroBuild.Core.targets')" />

<!--
This project needs to be packed with 'nuget pack' directly on the .nuspec file.
Note that in order to add this comment, 'nuget.exe' must be present in PATH.
This target can be remove if we figure out how to just import the "pack" targets correctly.
-->
<Target Name="Pack">
<PropertyGroup>
<PackageOutputPath>..\..\..\out\NuGetPackages</PackageOutputPath>
</PropertyGroup>
<Exec Command="nuget pack ..\..\..\scripts\Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec -outputDirectory $(PackageOutputPath) -version $(PackageVersion)" />
</Target>
</Project>
Loading