Skip to content

Commit

Permalink
Merge pull request #96 from nventive/dev/juca/uno5
Browse files Browse the repository at this point in the history
feat!: Target Uno 5
  • Loading branch information
carlh98 authored Dec 22, 2023
2 parents ae4b349 + 4df3799 commit 8bc6744
Show file tree
Hide file tree
Showing 17 changed files with 71 additions and 374 deletions.
8 changes: 8 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Breaking Changes

## 2.0.0
- Added support for .NET 7.
- Updated Uno.WinUI to 5.0.19.
- Updated Windows SDK version from 18362 to 19041.
- Removed support for Xamarin.
- Removed support for .NET 6.
- Removed support for NetStandard2.0 in DynamicMvvm.Uno.WinUI.

## 1.4.1
- Dynamic properties no longer throw an `ObjectDisposedException` when we set their `Value` while they're disposed.
- We've discovered that this safeguard is not needed and was causing unjustified issues when using dynamic properties in a multi-threaded environment. This is especially true with the _DynamicPropertyFromObservable_ variant, which can easily be disposed from a different thread than the one the observable source uses.
Expand Down
35 changes: 0 additions & 35 deletions DynamicMvvm.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicMvvm.Tests", "src\Dy
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicMvvm", "src\DynamicMvvm\DynamicMvvm.csproj", "{B78A5229-FF24-483E-BB4E-9BC1200C262A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicMvvm.Uno", "src\DynamicMvvm.Uno\DynamicMvvm.Uno.csproj", "{955B4011-FBB9-4B71-87AE-5CE114D10F02}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicMvvm.Reactive", "src\DynamicMvvm.Reactive\DynamicMvvm.Reactive.csproj", "{9D94D67C-B58B-498E-B6F3-BE8FB4BB7802}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamicMvvm.FluentValidation", "src\DynamicMvvm.FluentValidation\DynamicMvvm.FluentValidation.csproj", "{4EED6C41-468A-436F-B95F-9F6371090815}"
Expand Down Expand Up @@ -131,38 +129,6 @@ Global
{B78A5229-FF24-483E-BB4E-9BC1200C262A}.Release|x64.Build.0 = Release|Any CPU
{B78A5229-FF24-483E-BB4E-9BC1200C262A}.Release|x86.ActiveCfg = Release|Any CPU
{B78A5229-FF24-483E-BB4E-9BC1200C262A}.Release|x86.Build.0 = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|Android.ActiveCfg = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|Android.Build.0 = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|iOS.ActiveCfg = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|iOS.Build.0 = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|NuGet.ActiveCfg = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|NuGet.Build.0 = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|Simulator.ActiveCfg = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|Simulator.Build.0 = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|UAP.ActiveCfg = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|UAP.Build.0 = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|x64.ActiveCfg = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|x64.Build.0 = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|x86.ActiveCfg = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Debug|x86.Build.0 = Debug|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|Android.ActiveCfg = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|Android.Build.0 = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|Any CPU.Build.0 = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|iOS.ActiveCfg = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|iOS.Build.0 = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|NuGet.ActiveCfg = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|NuGet.Build.0 = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|Simulator.ActiveCfg = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|Simulator.Build.0 = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|UAP.ActiveCfg = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|UAP.Build.0 = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|x64.ActiveCfg = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|x64.Build.0 = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|x86.ActiveCfg = Release|Any CPU
{955B4011-FBB9-4B71-87AE-5CE114D10F02}.Release|x86.Build.0 = Release|Any CPU
{9D94D67C-B58B-498E-B6F3-BE8FB4BB7802}.Debug|Android.ActiveCfg = Debug|Any CPU
{9D94D67C-B58B-498E-B6F3-BE8FB4BB7802}.Debug|Android.Build.0 = Debug|Any CPU
{9D94D67C-B58B-498E-B6F3-BE8FB4BB7802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -332,6 +298,5 @@ Global
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\DynamicMvvm.Shared\DynamicMvvm.Shared.projitems*{1e13272a-4270-4f68-88b7-a54375866640}*SharedItemsImports = 5
src\DynamicMvvm.Shared\DynamicMvvm.Shared.projitems*{955b4011-fbb9-4b71-87ae-5ce114d10f02}*SharedItemsImports = 5
EndGlobalSection
EndGlobal
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public MainPage()
}
```

#### Legacy
For UWP or Uno.UI apps, install the `Chinook.DynamicMvvm.Uno` nuget package.
You can then use `CoreDispatcherDispatcher` or `BatchingCoreDispatcherDispatcher`.
```csharp
Expand Down
15 changes: 4 additions & 11 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
include:
- main

resources:
containers:
- container: windows
image: nventive/vs_build-tools:17.2.5

variables:
- name: NUGET_VERSION
value: 6.2.0
Expand All @@ -20,8 +15,8 @@ variables:
- name: IsReleaseBranch # Should this branch name use the release stage
value: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/feature/'))]
# Pool names
- name: windowsPoolName
value: 'windows 2022'
- name: windowsHostedAgentImage
value: 'windows-2022'

stages:
- stage: Build
Expand All @@ -36,7 +31,7 @@ stages:
GeneratePackageOnBuild: true

pool:
name: $(windowsPoolName)
vmImage: $(windowsHostedAgentImage)

variables:
- name: PackageOutputPath # Path where nuget packages will be copied to.
Expand All @@ -45,8 +40,6 @@ stages:
workspace:
clean: all # Cleanup the workspaca before starting

container: windows

steps:
- template: stage-build.yml

Expand All @@ -57,7 +50,7 @@ stages:
- job: Publish_NuGet_External

pool:
name: $(windowsPoolName)
vmImage: $(windowsHostedAgentImage)

workspace:
clean: all # Cleanup the workspaca before starting
Expand Down
26 changes: 20 additions & 6 deletions build/stage-build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
steps:
parameters:
DotNetVersion: '7.0.102'
UnoCheck_Version: '1.11.0'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json'

steps:
- task: gitversion/setup@0
inputs:
versionSpec: '5.10.1'
Expand All @@ -10,12 +15,21 @@
configFilePath: $(Build.SourcesDirectory)/build/gitversion.yml
displayName: 'Calculate version'

- task: DotNetCoreCLI@2
displayName: 'Install dotnet 6 workloads'
- task: UseDotNet@2
displayName: 'Use .NET SDK ${{ parameters.DotNetVersion }}'
retryCountOnTaskFailure: 3
inputs:
command: 'custom'
custom: 'workload'
arguments: 'install android ios macos maccatalyst'
packageType: sdk
version: ${{ parameters.DotNetVersion }}
includePreviewVersions: true

- powershell: |
& dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json
& uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vsmac --skip androidsdk --skip androidemulator --manifest ${{ parameters.UnoCheck_Manifest }}
displayName: Install .NET Workloads | Uno-check
errorActionPreference: continue
ignoreLASTEXITCODE: true
retryCountOnTaskFailure: 3

- task: MSBuild@1
displayName: 'Restore solution packages'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Description>Chinook.DynamicMvvm is a collection of extensible MVVM libraries for declarative ViewModels.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>mvvm;xamarin;ios;android;uwp;chinook;maui;winui;</PackageTags>
<PackageTags>mvvm;ios;android;chinook;maui;winui;</PackageTags>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/nventive/Chinook.DynamicMvvm</PackageProjectUrl>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Description>Chinook.DynamicMvvm is a collection of extensible MVVM libraries for declarative ViewModels.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>mvvm;xamarin;ios;android;uwp;chinook;maui;winui;</PackageTags>
<PackageTags>mvvm;ios;android;chinook;maui;winui;</PackageTags>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/nventive/Chinook.DynamicMvvm</PackageProjectUrl>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Description>Chinook.DynamicMvvm is a collection of extensible MVVM libraries for declarative ViewModels.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>mvvm;xamarin;ios;android;uwp;chinook;maui;winui;</PackageTags>
<PackageTags>mvvm;ios;android;chinook;maui;winui;</PackageTags>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/nventive/Chinook.DynamicMvvm</PackageProjectUrl>

Expand Down
2 changes: 1 addition & 1 deletion src/DynamicMvvm.Reactive/DynamicMvvm.Reactive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Description>Chinook.DynamicMvvm is a collection of extensible MVVM libraries for declarative ViewModels.</Description>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageTags>mvvm;xamarin;ios;android;uwp;chinook;maui;winui;</PackageTags>
<PackageTags>mvvm;ios;android;chinook;maui;winui;</PackageTags>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/nventive/Chinook.DynamicMvvm</PackageProjectUrl>

Expand Down
11 changes: 6 additions & 5 deletions src/DynamicMvvm.Uno.WinUI/DynamicMvvm.Uno.WinUI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.44">
<PropertyGroup>
<TargetFrameworks>net6.0-windows10.0.18362;netstandard2.0;net6.0-android;net6.0-ios;net6.0-macos;net6.0-maccatalyst;</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<TargetFrameworks>net7.0;net7.0-windows10.0.19041;net7.0-android;net7.0-ios;net7.0-macos;net7.0-maccatalyst;</TargetFrameworks>
<LangVersion>11.0</LangVersion>
<!-- Ensures the .xr.xml files are generated in a proper layout folder -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>
<RootNamespace>Chinook.DynamicMvvm</RootNamespace>
Expand Down Expand Up @@ -32,11 +32,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Uno.WinUI" Version="4.4.13" />
<PackageReference Include="Uno.WinUI" Version="5.0.19" />
<PackageReference Include="Uno.SourceGenerationTasks" Version="4.1.0" />
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
<PropertyGroup Condition="'$(TargetFramework)'=='net7.0'">
<DefineConstants>$(DefineConstants);__WASM__</DefineConstants>
</PropertyGroup>

Expand All @@ -45,7 +45,7 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)'=='net6.0-windows10.0.18362'">
<ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows10.0.19041'">
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.0" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22000.24" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22000.24" />
Expand All @@ -56,4 +56,5 @@
</ItemGroup>

<Import Project="..\DynamicMvvm.Shared\DynamicMvvm.Shared.projitems" Label="Shared" />
<Import Project="winappsdk-workaround.targets" />
</Project>
27 changes: 27 additions & 0 deletions src/DynamicMvvm.Uno.WinUI/winappsdk-workaround.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<Project>
<!--
Workaround to avoid including Uno.Toolkit.UI XBFs in the PRI file:
> C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(5097,5):
> error MSB3030: Could not copy the file "D:\a\1\s\src\Uno.Toolkit.UI\obj\Uno.Toolkit.WinUI\Release\net7.0-windows10.0.19041\Controls\AutoLayout\AutoLayout.xbf" because it was not found.
> [D:\a\1\s\src\Uno.Toolkit.RuntimeTests\Uno.Toolkit.RuntimeTests.WinUI.csproj]
Just <Import /> this file into the winui project appearing in the `[]` bracket.
-->
<Target Name="AdjustGetPackagingOutput1" AfterTargets="GetMrtPackagingOutputs">
<Message Importance="high" Text="Applying NuGet packaging workaround for dependent PRI files exclusion" />
<ItemGroup>
<_OtherPriFiles Include="@(PackagingOutputs)" Condition="'%(Extension)' == '.pri' and ('%(PackagingOutputs.ReferenceSourceTarget)' == 'ProjectReference' or '%(PackagingOutputs.NugetSourceType)'=='Package')" />
<PackagingOutputs Remove="@(_OtherPriFiles)" />
</ItemGroup>
</Target>

<Target Name="AdjustGetPackagingOutput2" BeforeTargets="AddPriPayloadFilesToCopyToOutputDirectoryItems">
<Message Importance="high" Text="Applying NuGet packaging workaround for dependent PRI files exclusion" />
<ItemGroup>
<_OtherPriFiles1 Include="@(_ReferenceRelatedPaths)" Condition="'%(Extension)' == '.pri' and ('%(_ReferenceRelatedPaths.ReferenceSourceTarget)' == 'ProjectReference' or '%(_ReferenceRelatedPaths.NugetSourceType)'=='Package')" />
<_ReferenceRelatedPaths Remove="@(_OtherPriFiles1)" />

<_OtherPriFiles2 Include="@(ReferenceCopyLocalPaths)" Condition="'%(Extension)' == '.pri' and ('%(ReferenceCopyLocalPaths.ReferenceSourceTarget)' == 'ProjectReference' or '%(ReferenceCopyLocalPaths.NugetSourceType)'=='Package')" />
<ReferenceCopyLocalPaths Remove="@(_OtherPriFiles2)" />
</ItemGroup>
</Target>
</Project>
119 changes: 0 additions & 119 deletions src/DynamicMvvm.Uno/Dispatchers/BatchingCoreDispatcherDispatcher.cs

This file was deleted.

Loading

0 comments on commit 8bc6744

Please sign in to comment.