Skip to content

Commit

Permalink
Add .NET 6.0 Support (MvvmCross#4319)
Browse files Browse the repository at this point in the history
* Bump build stuff + dependencies for .NET6.0

* Switch to WeakReference. WeakAttribute doesn't seem present in new TFMs :'(

* Bump cake

* Build DroidX with net6.0-android tfm

* Build plugins for .NET 6.0

* Build playground core for .net 6.0

* No need for this maui check

* Remove useless plugins

* Don't force Java 8 SDK

* Run sonar on windows-2022

* Update targets

* windows-2022 doesn't have anything lower than uap10.0.19041

* Fix a bit of broken playground

* Bye old unused test suite

* Make analyzer a bit happier

* Remove pointless navigation test

* Fix bundle tests

* Fix linkerpleaseinclude files

* Switch playground layout files to xml

* Get droid playground working on net6.0-android

* Build unit tests for net6.0

* Remove Android resoruce stuff from plugins

* Add .net6.0 tfms to forms projects

* Add back setting JAVA_HOME

* Migrate iOS Playground to .NET 6.0

* Underp some configurations

* Bump minversion to 15.0

* Remove old project code

* Fix silly sonar warnings

* Squelch some warnings

* Remove EOL TFMs

* nfloat has changed, need to import ObjCRuntime

* Sidebar is incompatible with latest net6.0-ios. Removing.

* Also remove from csproj

* Bump targets

* Help global usings understanding we want AndroidX stuff

* Keyboard stuff is no bueno on maccatalyst

* net48 doesn't like me + adding maccatalyst and bumping monodroid

* Implicit usings please to fix nfloat fuckery

* Serilog.Sinks.Xamarin needs updating to net6 :'-(

* install maccatalyst

* Remove net48 projects

* Remove unneeded full debug

* Lint

* Only check whitespace. Analyzers and style are super aggressive and mess up code

* dotnet format is included in net6

* lint some more

* Bump cake and switch to dotnet build

* Bump target for forms droid

* Ensure Object is Java.Lang.Object

* compound workload installs

* Fix types with implicit usings in Forms project

* Skip net6.0 for forms for now

* Bump forms to latest

* More ambiguous types due to implicit refs

* Switch some projects to Xamarin.Legacy.Sdk

* Revert building with dotnet build

* Switch only to target net6.0 bits

* Bye old samples

* Bye forms
  • Loading branch information
Cheesebaron authored Jun 29, 2022
1 parent 4a710f6 commit f76f09f
Show file tree
Hide file tree
Showing 741 changed files with 472 additions and 31,820 deletions.
8 changes: 1 addition & 7 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"cake.tool": {
"version": "2.1.0",
"version": "2.2.0",
"commands": [
"dotnet-cake"
]
Expand All @@ -13,12 +13,6 @@
"commands": [
"reportgenerator"
]
},
"dotnet-format": {
"version": "5.1.250801",
"commands": [
"dotnet-format"
]
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:

- name: Run dotnet format
run: |
dotnet format --verify-no-changes MvvmCross.sln
dotnet format whitespace --no-restore --verify-no-changes MvvmCross.sln
14 changes: 4 additions & 10 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project>
<Project>
<PropertyGroup>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
<PackageLicenseExpression>MS-PL</PackageLicenseExpression>
Expand All @@ -16,10 +16,11 @@
<RepositoryUrl>https://github.com/MvvmCross/MvvmCross</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<Version>7.0.0</Version>
<Version>8.1.0-net6.1</Version>

<!--<Nullable>enable</Nullable>-->
<LangVersion>8.0</LangVersion>
<LangVersion>latest</LangVersion>
<ImplicitUsings>true</ImplicitUsings>
<NoWarn>$(NoWarn);1591;1701;1702;1705;VSX1000;CS0109;CS0108;CS0618;CS0114;NU1603</NoWarn>
<Platform>AnyCPU</Platform>

Expand Down Expand Up @@ -49,11 +50,6 @@
<Deterministic>true</Deterministic>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup Condition="'$(IsLibraryProject)' == 'true'">
<None Include="$(MSBuildThisFileDirectory)\LICENSE" Pack="true" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)\icon.png" Pack="true" PackagePath="\" />
Expand All @@ -72,6 +68,4 @@
<TargetsToBuild>All</TargetsToBuild>
</PropertyGroup>



</Project>
22 changes: 17 additions & 5 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,32 @@
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
<DefineConstants>$(DefineConstants);NETSTANDARD;PORTABLE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants>$(DefineConstants);NET;WPF;XAML</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('uap'))">
<DefineConstants>$(DefineConstants);NETFX_CORE;XAML;WINDOWS;WINDOWS_UWP;UWP</DefineConstants>
<TargetPlatformVersion>10.0.16299.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.ios'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;APPLE;IOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-ios'))">
<DefineConstants>$(DefineConstants);MONO;UIKIT;COCOA;APPLE;IOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.mac'))">
<DefineConstants>$(DefineConstants);MONO;COCOA;APPLE;MAC</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-macos'))">
<DefineConstants>$(DefineConstants);MONO;COCOA;APPLE;MAC</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-maccatalyst'))">
<DefineConstants>$(DefineConstants);MONO;COCOA;APPLE;IOS;MACCATALYST</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.tvos'))">
<DefineConstants>$(DefineConstants);MONO;COCOA;APPLE;TVOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-tvos'))">
<DefineConstants>$(DefineConstants);MONO;COCOA;APPLE;TVOS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('xamarin.watchos'))">
<DefineConstants>$(DefineConstants);MONO;COCOA;APPLE;WATCHOS</DefineConstants>
</PropertyGroup>
Expand All @@ -28,13 +37,16 @@
<AndroidResgenClass>Resource</AndroidResgenClass>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net6.0-android'))">
<DefineConstants>$(DefineConstants);MONO;ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'monoandroid10.0'">
<DefineConstants>$(DefineConstants);MONO;ANDROID;__ANDROID_29__;</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))">
<DefineConstants>$(DefineConstants);NETCORE;NETCOREAPP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp3.'))">
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp3'))">
<DefineConstants>$(DefineConstants);WPF</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('tizen'))">
Expand Down
9 changes: 4 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
<PackageVersion Include="Xamarin.GooglePlayServices.Location" Version="118.0.0.1" />
<PackageVersion Include="Microsoft.CodeAnalysis" Version="4.1.0" />
<PackageVersion Include="Newtonsoft.Json" Version="12.0.3" />
<PackageVersion Include="SidebarNavigation" Version="2.1.0" />
<PackageVersion Include="Xamarin.Build.Download" Version="0.11.0" />
<PackageVersion Include="Xamarin.Forms.Platform.WPF" Version="5.0.0.1931" />
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.1931" />
<PackageVersion Include="Xamarin.Forms.Platform.WPF" Version="5.0.0.2478" />
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.2478" />
<PackageVersion Include="Roslynator.Analyzers" Version="4.0.2" />
<PackageVersion Include="AsyncFixer" Version="1.5.1" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0" />
Expand All @@ -39,8 +38,8 @@
<PackageVersion Include="Serilog" Version="2.10.0"/>
<PackageVersion Include="Serilog.Sinks.Xamarin" Version="0.2.0.64"/>
<PackageVersion Include="Xamarin.FFImageLoading" Version="2.4.11.982" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="3.1.0" />
<PackageVersion Include="Serilog.Sinks.Debug" Version="2.0.0" />
</ItemGroup>
</Project>

This file was deleted.

Loading

0 comments on commit f76f09f

Please sign in to comment.