Fix Code Style issues on Build

There are 3 issues at play here:

1. XAML files placed inside C# files, leading to dotnet rules not applying to C# files.

2. Code style analyzer not matching the compiler's version.

3. Unrelated but warning for missing Appx bundling platforms appears for a sample UWP project.

This patch fixes all of that.
このコミットが含まれているのは:
Nirmal Guru authored and Sergio Pedri committed 2022-10-15 09:10:18 -07:00
1 親 5a942b208b
コミット dfbed35179
3ファイル変更
+9 -8

検索条件に一致するファイルはありません

+3 -3
ファイルの表示
@@ -41,13 +41,13 @@ indent_size = 2
indent_size = 2
insert_final_newline = true
# C# files
[*.cs]
# XAML files
[*.xaml]
indent_size = 4
# C# files
[*.cs]
#### .NET Coding Conventions ####
# this. and Me. preferences
+4 -4
ファイルの表示
@@ -6,11 +6,11 @@
<Features>strict</Features>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>$(NoWarn);MSB3270</NoWarn>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.4.0-2.final" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeStyle" Version="4.4.0-2.final" PrivateAssets="all" />
</ItemGroup>
<!-- Centralized location for all generated artifacts -->
@@ -38,7 +38,7 @@
</PropertyGroup>
<!-- If the current branch and action match a release for NuGet, override the relative build properties -->
<PropertyGroup Condition="'$(GITHUB_EVENT_NAME)' == 'push' AND '$(GITHUB_REF_NAME)' != '' AND '$(IsBranchNameStartingWithRefPrefix)' == 'true'">
<PropertyGroup Condition="'$(GITHUB_EVENT_NAME)' == 'push' AND '$(GITHUB_REF_NAME)' != '' AND '$(IsBranchNameStartingWithRefPrefix)' == 'true'">
<IsCommitOnReleaseBranch>true</IsCommitOnReleaseBranch>
<ComputeSharpPackageVersionFromReleaseBranch>$([System.Text.RegularExpressions.Regex]::Match($(GITHUB_REF_NAME), $(ReleaseVersionParsingRegex)).Groups[1].Value)</ComputeSharpPackageVersionFromReleaseBranch>
<ComputeSharpPackageVersionSuffixFromReleaseBranch>$([System.Text.RegularExpressions.Regex]::Match($(GITHUB_REF_NAME), $(ReleaseVersionParsingRegex)).Groups[2].Value)</ComputeSharpPackageVersionSuffixFromReleaseBranch>
@@ -59,7 +59,7 @@
<RepositoryUrl>https://github.com/Sergio0694/ComputeSharp/</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<ProjectUrl>https://github.com/Sergio0694/ComputeSharp/</ProjectUrl>
<ProjectUrl>https://github.com/Sergio0694/ComputeSharp/</ProjectUrl>
<Authors>Sergio Pedri</Authors>
<Owners>Sergio Pedri</Owners>
<Company>Sergio Pedri</Company>
@@ -72,7 +72,7 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>
+2 -1
ファイルの表示
@@ -18,6 +18,7 @@
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<AppxBundlePlatforms>x64;ARM64</AppxBundlePlatforms>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
@@ -252,7 +253,7 @@
<PropertyGroup>
<PreBuildEvent>powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File $(SolutionDir)\build\CreateBlankAppCenterToken.ps1</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>