Skip to content

Commit

Permalink
feature: Add .NET 5 support (#627)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson authored Nov 11, 2020
1 parent e62f8c0 commit f6158a1
Show file tree
Hide file tree
Showing 58 changed files with 1,179 additions and 190 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ jobs:
with:
dotnet-version: 3.1.x

- name: Install .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

- name: Add MSBuild to PATH
uses: glennawatson/setup-msbuild@v1.0.3

- name: Update VS2019
shell: powershell
run: Start-Process -Wait -PassThru -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "update --passive --norestart --installpath ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"""

- name: NBGV
id: nbgv
uses: dotnet/nbgv@master
Expand All @@ -37,11 +49,8 @@ jobs:
run: dotnet restore
working-directory: src

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1

- name: Build
run: msbuild /t:build,pack /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }}
run: msbuild /t:build,pack /nowarn:MSB4011 /maxcpucount /p:NoPackageAnalysis=true /verbosity:minimal /p:Configuration=${{ env.configuration }}
working-directory: src

- name: Run Unit Tests and Generate Coverage
Expand All @@ -52,7 +61,6 @@ jobs:
exclude-filter: '[${{env.productNamespacePrefix}}.*.Tests.*]*'
include-filter: '[${{env.productNamespacePrefix}}*]*'
output-format: cobertura
merge-with: '../../artifacts/coverage.json'
output: '../../artifacts/'
configuration: ${{ env.configuration }}

Expand Down
6 changes: 3 additions & 3 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Xunit.StaFact" Version="1.0.37" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="4.4.1" />
<PackageReference Include="Microsoft.Reactive.Testing" Version="5.0.0" />
<PackageReference Include="PublicApiGenerator" Version="10.2.0" />
<PackageReference Include="DiffEngine" Version="6.1.4" />
<PackageReference Include="DiffEngine" Version="6.3.0" />
</ItemGroup>

<ItemGroup Condition="$(IsTestProject)">
Expand All @@ -68,7 +68,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.205" PrivateAssets="all" />
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.261" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="3.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="all" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Splat.AppCenter/Splat.AppCenter.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<AssemblyName>Splat.AppCenter</AssemblyName>
<RootNamespace>Splat</RootNamespace>
<Authors>.NET Foundation and Contributors</Authors>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net461</TargetFrameworks>
<AssemblyName>Splat.ApplicationInsights</AssemblyName>
<RootNamespace>Splat</RootNamespace>
<Authors>.NET Foundation and Contributors</Authors>
Expand All @@ -9,7 +10,7 @@
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.15.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.16.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Splat.Autofac.Tests/Splat.Autofac.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0;netcoreapp3.1</TargetFrameworks>

<IsPackable>false</IsPackable>
<NoWarn>$(NoWarn);1591;CA1707;SA1633;CA2000</NoWarn>
Expand Down
6 changes: 3 additions & 3 deletions src/Splat.Autofac/Splat.Autofac.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="MSBuild.Sdk.Extras">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net461;uap10.0.16299</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net461</TargetFrameworks>
<Description>Autofac adapter for Splat</Description>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Splat.Common.Test/Splat.Common.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
<NoWarn>$(NoWarn);CA2000</NoWarn>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[assembly: System.Resources.NeutralResourcesLanguage("en-US")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Splat.Drawing.Tests")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Splat.TestRunner.Android")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Splat.TestRunner.Uwp")]
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Splat.Tests")]
[assembly: System.Runtime.Versioning.TargetFramework(".NETFramework,Version=v4.6.1", FrameworkDisplayName=".NET Framework 4.6.1")]
[assembly: System.Runtime.Versioning.SupportedOSPlatform("Windows7.0")]
[assembly: System.Runtime.Versioning.TargetFramework(".NETCoreApp,Version=v5.0", FrameworkDisplayName="")]
[assembly: System.Runtime.Versioning.TargetPlatform("Windows7.0")]
namespace Splat
{
public static class BitmapLoader
Expand Down
Loading

0 comments on commit f6158a1

Please sign in to comment.