Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Added .NET 5.0 as target framework and updated Core to 3.4.0-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
sungaila committed Nov 11, 2020
1 parent 4f48a25 commit c111478
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 deletions.
8 changes: 5 additions & 3 deletions NetCore.Tests/NetCore.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Assembly -->
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0-windows</TargetFramework>
<AssemblyName>PresentationBase.Tests</AssemblyName>
<RootNamespace>PresentationBase.Tests</RootNamespace>
<IsPackable>false</IsPackable>
Expand All @@ -12,7 +12,9 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<Features>strict</Features>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors>nullable;NU1605</WarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>

<!-- Project references -->
Expand All @@ -22,7 +24,7 @@

<!-- NuGet Icon -->
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="coverlet.collector" Version="1.3.0">
Expand Down
2 changes: 1 addition & 1 deletion NetCore.Tests/WpfTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void Initialize()
while (!appStarted) { }
}

protected void CreateInvisibleMainWindow()
protected static void CreateInvisibleMainWindow()
{
App!.MainWindow = new Window
{
Expand Down
17 changes: 9 additions & 8 deletions NetCore/NetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<!-- Assembly -->
<PropertyGroup>
<TargetFrameworks>net45;net48;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net45;net48;netcoreapp3.1;net50-windows</TargetFrameworks>
<AssemblyName>PresentationBase</AssemblyName>
<RootNamespace>PresentationBase</RootNamespace>
<EmbedAllSources>true</EmbedAllSources>
Expand All @@ -12,17 +12,16 @@

<!-- NuGet -->
<PropertyGroup>
<VersionPrefix>3.3.0</VersionPrefix>
<VersionPrefix>3.4.0</VersionPrefix>
<VersionSuffix>preview</VersionSuffix>
<Authors>David Sungaila</Authors>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>Icon.png</PackageIcon>
<PackageProjectUrl>https://github.com/sungaila/PresentationBase</PackageProjectUrl>
<PackageIconUrl>https://raw.githubusercontent.com/sungaila/PresentationBase/master/NuGet/Icon.png</PackageIconUrl>
<Description>A lightweight MVVM implementation for WPF (Windows Presentation Foundation) targeting both .NET Framework and .NET Core.</Description>
<PackageReleaseNotes>Updates coming from PresentationBase.Core 3.3.0:
- Added TrxViewModel for short-term and long-term rollbacks
- ViewModel implements INotifyPropertyChanging now</PackageReleaseNotes>
<Description>A lightweight MVVM implementation for WPF (Windows Presentation Foundation) targeting both .NET Framework and .NET (Core).</Description>
<PackageReleaseNotes>Added .NET 5.0 as a target framework.</PackageReleaseNotes>
<PackageTags>WPF MVVM ViewModel Converter IValueConverter Command INotifyPropertyChanged INotifyPropertyChanging INotifyDataErrorInfo IEditableObject IRevertibleChangeTracking ICommand XAML Markup DTO C#</PackageTags>
<RepositoryUrl>https://github.com/sungaila/PresentationBase.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand All @@ -35,7 +34,9 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<Features>strict</Features>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors>nullable;NU1605</WarningsAsErrors>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
</PropertyGroup>

<!-- Debug builds -->
Expand Down Expand Up @@ -67,7 +68,7 @@

<!-- SourceLink build steps and PresentationBase.Core -->
<ItemGroup>
<PackageReference Include="PresentationBase.Core" Version="3.3.0" />
<PackageReference Include="PresentationBase.Core" Version="3.4.0-preview" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
1 change: 1 addition & 0 deletions PresentationBase.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetCore", "NetCore\NetCore.
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BA209F08-E6AA-4928-A9DD-1DCAFB4DF1CB}"
ProjectSection(SolutionItems) = preProject
azure-pipelines.yml = azure-pipelines.yml
Icon.png = Icon.png
README.md = README.md
EndProjectSection
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![NuGet downloads](https://img.shields.io/nuget/dt/PresentationBase.svg?style=flat-square)](https://www.nuget.org/packages/PresentationBase/)
[![GitHub license](https://img.shields.io/github/license/sungaila/PresentationBase?style=flat-square)](https://github.com/sungaila/PresentationBase/blob/master/LICENSE)

A lightweight MVVM implementation for WPF ([Windows Presentation Foundation](https://en.wikipedia.org/wiki/Windows_Presentation_Foundation)) targeting both **.NET Framework** and **.NET Core**.
A lightweight MVVM implementation for WPF ([Windows Presentation Foundation](https://en.wikipedia.org/wiki/Windows_Presentation_Foundation)) targeting both **.NET Framework** and **.NET (Core)**.

It contains base implementations for *view models* (and their *commands*), frequently used *value converters*, useful *XAML markup extensions* and more. I consider these as a bare minimum when I start professional or free time WPF projects.

Expand Down
12 changes: 11 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
- job: Build
displayName: 'Build'
steps:
- task: UseDotNet@2
displayName: 'Install .NET 5 SDK'
inputs:
packageType: 'sdk'
version: '5.x'
- task: DotNetCoreCLI@2
displayName: 'Build solution'
inputs:
Expand Down Expand Up @@ -58,11 +63,16 @@ jobs:
buildType: 'current'
artifactName: 'Tests'
targetPath: '$(Pipeline.Workspace)'
- task: UseDotNet@2
displayName: 'Install .NET 5 SDK'
inputs:
packageType: 'sdk'
version: '5.x'
- task: VSTest@2
displayName: 'Run tests'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: '$(Pipeline.Workspace)\**\PresentationBase.Tests.dll'
testAssemblyVer2: '$(Pipeline.Workspace)\**\net5.0\PresentationBase.Tests.dll'
searchFolder: '$(System.DefaultWorkingDirectory)'
runTestsInIsolation: true
codeCoverageEnabled: true
Expand Down

0 comments on commit c111478

Please sign in to comment.