Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
15 changes: 13 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- uses: nuget/[email protected]
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- uses: nuget/[email protected]
- name: Restore
run: nuget restore src/BehaviorsSdk.sln
- uses: microsoft/[email protected].1
- uses: microsoft/[email protected].2
- name: Build
run: msbuild src/BehaviorsSdk.sln /p:Configuration=Release
- name: Pack Behaviors
if: success()
run: msbuild src/Microsoft.Xaml.Behaviors/Microsoft.Xaml.Behaviors.csproj /p:Configuration=Release -t:pack
- name: Upload NuGet Artifacts
if: success()
uses: actions/upload-artifact@v2
with:
path: src/Microsoft.Xaml.Behaviors/bin/Release/*.nupkg
6 changes: 3 additions & 3 deletions Test/UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/2.0.43">
<Project Sdk="MSBuild.Sdk.Extras/2.1.2">
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net45;netcoreapp3.0;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<IsPackable>false</IsPackable>
<UseWPF>true</UseWPF>
<OutputType>Library</OutputType>
Expand All @@ -20,5 +20,5 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Xaml.Behaviors\Microsoft.Xaml.Behaviors.csproj" />
</ItemGroup>

</Project>
28 changes: 16 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pr:
- rel/*

pool:
vmImage: windows-2019
vmImage: windows-latest

variables:
buildConfiguration: Release
Expand All @@ -19,25 +19,29 @@ steps:
custom: tool
arguments: install --tool-path . nbgv
displayName: Install NBGV tool

- script: nbgv cloud
displayName: Set Version

- task: MSBuild@1
- task: UseDotNet@2
displayName: 'Use .NET Core sdk 5.0'
inputs:
packageType: sdk
version: 5.0.100

- task: DotNetCoreCLI@2
displayName: Build Solution
inputs:
solution: src/*.sln
msbuildArguments: /restore
configuration: $(buildConfiguration)
maximumCpuCount: false
command: build
projects: src/*.sln
arguments: '--configuration $(buildConfiguration)'

- task: MSBuild@1
- task: DotNetCoreCLI@2
displayName: Pack Behaviors
inputs:
solution: src/**/Microsoft.Xaml.Behaviors.csproj
msbuildArguments: /t:Pack /p:PackageOutputPath=$(Build.ArtifactStagingDirectory)
configuration: $(buildConfiguration)
maximumCpuCount: false
command: pack
packagesToPack: src/**/Microsoft.Xaml.Behaviors.csproj
arguments: '--configuration $(buildConfiguration)'

- task: VSTest@2
displayName: Run Tests
Expand Down
10 changes: 5 additions & 5 deletions src/Microsoft.Xaml.Behaviors/Microsoft.Xaml.Behaviors.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras/2.0.43">
<Project Sdk="MSBuild.Sdk.Extras/2.1.2">
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net45;netcoreapp3.0;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);IncludeProjectToProjectAssets</TargetsForTfmSpecificBuildOutput>
<OutputType>Library</OutputType>
<PackageId>Microsoft.Xaml.Behaviors.Wpf</PackageId>
Expand Down Expand Up @@ -35,7 +35,7 @@
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net45'">
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -76,7 +76,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nerdbank.GitVersioning" Version="2.3.38" PrivateAssets="All" />
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
Expand All @@ -103,7 +103,7 @@
<Target Name="IncludeProjectToProjectAssets">
<ItemGroup>
<BuildOutputInPackage Include="$(ProjectDir)bin\$(Configuration)\net45\Design\Microsoft.Xaml.Behaviors.DesignTools.dll"
Condition="'$(TargetFramework.StartsWith('netcoreapp3.'))">
Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '3.0'))">
<TargetPath>Design</TargetPath>
</BuildOutputInPackage>
<BuildOutputInPackage Include="$(ProjectDir)bin\$(Configuration)\net45\Design\Microsoft.Xaml.Behaviors.Design.dll"
Expand Down