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

Pack UWP .NET 9 projects for .NET SDK support #294

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ The [documentation](https://github.com/Microsoft/XamlBehaviors/wiki) explains ho
- If you're building from CLI (Visual Studio Developer Command prompt):
- Run `nuget restore src\BehaviorsSDKManaged\BehaviorsSDKManaged.sln`
- Run `msbuild -t:build src\BehaviorsSDKManaged\BehaviorsSDKManaged.sln /p:Configuration=Release`
- Run `msbuild /t:pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.Design\Microsoft.Xaml.Interactivity.Design.csproj`

For UWP:
- Run `msbuild /t:pack src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.Uwp\Microsoft.Xaml.Interactivity.Uwp.csproj /p:Configuration=Release`
- *(Optional)* Add `/p:TimestampPackage=true` to include the timestamp in the NuGet package version

For WinUI:
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ extends:
- task: VSBuild@1
displayName: Build UWP Managed NuGet package
inputs:
solution: src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.Design\Microsoft.Xaml.Interactivity.Design.csproj
solution: src\BehaviorsSDKManaged\Microsoft.Xaml.Interactivity.Uwp\Microsoft.Xaml.Interactivity.Uwp.csproj
msbuildArgs: /t:Pack /p:SignType=$(SignType) /p:TimestampPackage=$(TimestampPackage) /p:PackageOutputPath="$(Build.SourcesDirectory)\out"
configuration: Release
- task: VSBuild@1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,4 @@
<Import Project="..\Version\NuGetPackageVersion.props" />
<Import Project="..\..\..\scripts\Microsoft.Xaml.Behaviors.Signing.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" DependsOnTargets="TimestampNugetPackage">
<PropertyGroup>
<PackageOutputPath Condition=" '$(PackageOutputPath)' == '' ">..\..\..\out\NuGetPackages</PackageOutputPath>
</PropertyGroup>
<Exec Command="nuget pack ..\..\..\scripts\Microsoft.Xaml.Behaviors.Uwp.Managed.nuspec -outputDirectory $(PackageOutputPath) -version $(PackageVersion)" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,23 @@
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="..\Microsoft.Xaml.Interactivity.Shared\Microsoft.Xaml.Interactivity.Shared.projitems" Label="Shared" />
<Import Project="..\Version\NuGetPackageVersion.props" />
<Import Project="..\..\..\scripts\Microsoft.Xaml.Behaviors.Signing.targets" />
<PropertyGroup>
<!-- We only add this here as it produces the matching assembly attribute, the other properties are in the .nuspec -->
<PackageId>Microsoft.Xaml.Behaviors.Uwp.Managed</PackageId>
<Version>$(PackageVersion)</Version>
<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 Condition=" '$(PackageOutputPath)' == '' ">..\..\..\out\NuGetPackages</PackageOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DocumentationFile>..\..\..\out\Uwp\BehaviorsSDKManaged\bin\$(Platform)\Release\Microsoft.Xaml.Interactivity.xml</DocumentationFile>
</PropertyGroup>
<Import Project="..\Microsoft.Xaml.Interactivity.Shared\Microsoft.Xaml.Interactivity.Shared.projitems" Label="Shared" />
<Import Project="..\..\..\scripts\Microsoft.Xaml.Behaviors.Signing.targets" />
</Project>