зеркало из https://github.com/DeGsoft/maui-linux.git
Csharp9 (#640)
* Update to C#9 * - add one C#9 feature * - toolset * - NS20 only * - check msbuild version
This commit is contained in:
Родитель
e0b7d31cc6
Коммит
70b23f45f0
|
@ -44,4 +44,8 @@
|
|||
<Target Name="GitInfo" />
|
||||
<Import Condition="'$(EnvironmentBuildPropsImported)' != 'True'" Project="$(MSBuildThisFileDirectory)eng\Environment.Build.props" />
|
||||
<Import Condition="'$(SampleProject)' != 'True' and '$(CI)' == 'true'" Project="$(MSBuildThisFileDirectory)eng\SourceLink.Build.props" />
|
||||
</Project>
|
||||
|
||||
<ItemGroup Condition="'$(MSBuildVersion)' != '' AND '$(MSBuildVersion)' < '16.7.0' ">
|
||||
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.9.0" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- This is used by the libraries -->
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
This is needed for non SDK style project so the IDE will pick the correct LangVersion.
|
||||
Once this is an SDK style project it will pick this up from the Directory.Build.Props file correctly
|
||||
-->
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
This is needed for non SDK style project so the IDE will pick the correct LangVersion.
|
||||
Once this is an SDK style project it will pick this up from the Directory.Build.Props file correctly
|
||||
-->
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
This is needed for non SDK style project so the IDE will pick the correct LangVersion.
|
||||
Once this is an SDK style project it will pick this up from the Directory.Build.Props file correctly
|
||||
-->
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
This is needed for non SDK style project so the IDE will pick the correct LangVersion.
|
||||
Once this is an SDK style project it will pick this up from the Directory.Build.Props file correctly
|
||||
-->
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
This is needed for non SDK style project so the IDE will pick the correct LangVersion.
|
||||
Once this is an SDK style project it will pick this up from the Directory.Build.Props file correctly
|
||||
-->
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
This is needed for non SDK style project so the IDE will pick the correct LangVersion.
|
||||
Once this is an SDK style project it will pick this up from the Directory.Build.Props file correctly
|
||||
-->
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
This is needed for non SDK style project so the IDE will pick the correct LangVersion.
|
||||
Once this is an SDK style project it will pick this up from the Directory.Build.Props file correctly
|
||||
-->
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace Microsoft.Maui
|
|||
|
||||
handler.SetVirtualView(view);
|
||||
|
||||
if (!(handler.NativeView is UIView result))
|
||||
if (handler.NativeView is not UIView result)
|
||||
{
|
||||
throw new InvalidOperationException($"Unable to convert {view} to {typeof(UIView)}");
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<MDocDocumentationDirectory>$(MSBuildThisFileDirectory)..\docs\en</MDocDocumentationDirectory>
|
||||
<DebugType>portable</DebugType>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="$(TargetFramework.Contains('-windows')) == true ">
|
||||
<NoWarn>$(NoWarn);CA1416;CS8305</NoWarn>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<MDocDocumentationDirectory>$(MSBuildThisFileDirectory)..\docs\en</MDocDocumentationDirectory>
|
||||
<DebugType>portable</DebugType>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)'=='Debug' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<RootNamespace>Microsoft.Maui.Resizetizer</RootNamespace>
|
||||
<AssemblyName>Microsoft.Maui.Resizetizer</AssemblyName>
|
||||
<!--<Nullable>enable</Nullable>-->
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<IncludeBuildOutput>False</IncludeBuildOutput>
|
||||
<NoWarn>$(NoWarn);NU5100;NU5128;</NoWarn>
|
||||
<IsTrimmable>false</IsTrimmable>
|
||||
|
|
Загрузка…
Ссылка в новой задаче