mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-24 21:54:01 -10:00
* Fix handling of repo analyzers and warnings-as-errors When we brought in the new SDK, it enabled analyzers by default (which then used our custom ruleset), but a bunch of projects (in particular tests) weren't expecting that, such that we now have thousands of warnings in the repo. This opts-out those projects. It also enables warnings-as-errors at the root level of the repo, to hopefully avoid such warning storms in the future, and to also clean up the remaining that exist. This includes a bunch of new obsoletion and platform compat warnings that are firing in the runtime tests. We may choose to run analyzers on additional projects in the future where it's currently disabled, but this gets us back to a state at least as good if not better than we were previously. * Fix analyzer warnings on Microsoft.NET.HostModel Fixes the warnings that were triggered by our rule set applying to this project. All fixes were automated. * Fix analyzer warnings in additional projects * Remove several `<RunAnalyzers>false</RunAnalyzers>` * Try to opt-out remaining coreclr tests Co-authored-by: David Mason <[email protected]>
119 lines
7.3 KiB
XML
119 lines
7.3 KiB
XML
<Project TreatAsLocalProperty="RepoRoot">
|
|
|
|
<PropertyGroup>
|
|
<!--
|
|
For non-SDK projects that import this file and then import Microsoft.Common.props,
|
|
tell Microsoft.Common.props not to import Directory.Build.props again
|
|
-->
|
|
<ImportDirectoryBuildProps>false</ImportDirectoryBuildProps>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
Import the arcade sdk with these requirements.
|
|
After:
|
|
Configuration setup
|
|
Before:
|
|
DebugType needs to be not be set to embedded at least for facades
|
|
OutputPath setup
|
|
-->
|
|
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(SkipImportArcadeSdkFromRoot)' != 'true'" />
|
|
|
|
<!-- Set these properties early enough for libraries as they import the Arcade SDK not early enough. -->
|
|
<PropertyGroup Condition="'$(SkipImportArcadeSdkFromRoot)' == 'true'">
|
|
<RepoRoot>$([MSBuild]::EnsureTrailingSlash('$(MSBuildThisFileDirectory)'))</RepoRoot>
|
|
<RepositoryEngineeringDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'eng'))</RepositoryEngineeringDir>
|
|
<ArtifactsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</ArtifactsDir>
|
|
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
|
|
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
|
|
</PropertyGroup>
|
|
|
|
<!-- Configuration properties which are needed in both the (isolated) restore and build phases. -->
|
|
<Import Project="$(RepositoryEngineeringDir)Configurations.props" />
|
|
|
|
<!--
|
|
Get '<subset>Project' items. Using the items lets projects handle
|
|
$(Subset) automatically when creating project-to-project dependencies.
|
|
-->
|
|
<Import Project="$(RepositoryEngineeringDir)Subsets.props" />
|
|
|
|
<PropertyGroup>
|
|
<!-- Installer specific, required during restore. -->
|
|
<InstallerTasksOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'installer.tasks'))</InstallerTasksOutputPath>
|
|
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' == 'Core'">$([MSBuild]::NormalizePath('$(InstallerTasksOutputPath)', 'Debug', 'netstandard2.0', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
|
|
<InstallerTasksAssemblyPath Condition="'$(MSBuildRuntimeType)' != 'Core'">$([MSBuild]::NormalizePath('$(InstallerTasksOutputPath)', 'Debug', 'net461', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
|
|
|
|
<DocsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'docs'))</DocsDir>
|
|
<ManPagesDir>$([MSBuild]::NormalizeDirectory('$(DocsDir)', 'manpages'))</ManPagesDir>
|
|
|
|
<!-- System.Private.CoreLib -->
|
|
<CoreLibSharedDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'src'))</CoreLibSharedDir>
|
|
<CoreLibProject Condition="'$(RuntimeFlavor)' == 'CoreCLR'">$([MSBuild]::NormalizePath('$(CoreClrProjectRoot)', 'src', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
|
|
<CoreLibProject Condition="'$(RuntimeFlavor)' == 'Mono'">$([MSBuild]::NormalizePath('$(MonoProjectRoot)', 'netcore', 'System.Private.CoreLib', 'System.Private.CoreLib.csproj'))</CoreLibProject>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(TargetsMobile)' == 'true'">
|
|
<AppleAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AppleAppBuilder', 'Debug', '$(NetCoreAppCurrent)'))</AppleAppBuilderDir>
|
|
<AndroidAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'AndroidAppBuilder', 'Debug', '$(NetCoreAppCurrent)'))</AndroidAppBuilderDir>
|
|
<WasmAppBuilderDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmAppBuilder', 'Debug', '$(NetCoreAppCurrent)', 'publish'))</WasmAppBuilderDir>
|
|
<WasmBuildTasksDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'WasmBuildTasks', 'Debug', '$(NetCoreAppCurrent)', 'publish'))</WasmBuildTasksDir>
|
|
<MonoAOTCompilerDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'MonoAOTCompiler', 'Debug', '$(NetCoreAppCurrent)'))</MonoAOTCompilerDir>
|
|
|
|
<AppleAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AppleAppBuilderDir)', 'AppleAppBuilder.dll'))</AppleAppBuilderTasksAssemblyPath>
|
|
<AndroidAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(AndroidAppBuilderDir)', 'AndroidAppBuilder.dll'))</AndroidAppBuilderTasksAssemblyPath>
|
|
<WasmAppBuilderTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WasmAppBuilderDir)', 'WasmAppBuilder.dll'))</WasmAppBuilderTasksAssemblyPath>
|
|
<WasmBuildTasksAssemblyPath>$([MSBuild]::NormalizePath('$(WasmBuildTasksDir)', 'WasmBuildTasks.dll'))</WasmBuildTasksAssemblyPath>
|
|
<MonoAOTCompilerTasksAssemblyPath>$([MSBuild]::NormalizePath('$(MonoAOTCompilerDir)', 'MonoAOTCompiler.dll'))</MonoAOTCompilerTasksAssemblyPath>
|
|
</PropertyGroup>
|
|
|
|
<!-- Packaging properties -->
|
|
<PropertyGroup>
|
|
<!--
|
|
This name is used to create a GIT repository URL https://github.com/dotnet/$(GitHubRepositoryName) used
|
|
to find source code for debugging. It is also used to name the build output manifest for orchestrated builds.
|
|
-->
|
|
<GitHubRepositoryName>runtime</GitHubRepositoryName>
|
|
<RepositoryUrl>git://github.com/dotnet/runtime</RepositoryUrl>
|
|
<ProjectUrl>https://github.com/dotnet/runtime</ProjectUrl>
|
|
<LicenseUrl>https://github.com/dotnet/runtime/blob/master/LICENSE.TXT</LicenseUrl>
|
|
<RuntimeIdGraphDefinitionFile>$([MSBuild]::NormalizePath('$(LibrariesProjectRoot)', 'pkg', 'Microsoft.NETCore.Platforms', 'runtime.json'))</RuntimeIdGraphDefinitionFile>
|
|
<LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile>
|
|
|
|
<!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
|
|
<!-- Keep it in sync with PRERELEASE in eng/native/configureplatform.cmake -->
|
|
<IsPrerelease>true</IsPrerelease>
|
|
|
|
<IsExperimentalAssembly>$(MSBuildProjectName.Contains('Experimental'))</IsExperimentalAssembly>
|
|
|
|
<!-- Experimental packages should not be stable -->
|
|
<SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(IsExperimentalAssembly)">true</SuppressFinalPackageVersion>
|
|
<IsShippingAssembly Condition="$(IsExperimentalAssembly)">false</IsShippingAssembly>
|
|
|
|
<!-- We don't want Private packages to be shipped to NuGet.org -->
|
|
<IsShippingPackage Condition="($(MSBuildProjectName.Contains('Private')) or $(IsExperimentalAssembly)) and '$(MSBuildProjectExtension)' == '.pkgproj'">false</IsShippingPackage>
|
|
|
|
<!-- By default the SDK produces ref assembly for 5.0 or later -->
|
|
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
|
</PropertyGroup>
|
|
|
|
<!-- Language configuration -->
|
|
<PropertyGroup>
|
|
<!-- default to allowing all language features -->
|
|
<LangVersion>preview</LangVersion>
|
|
<LangVersion Condition="'$(MSBuildProjectExtension)' == '.vbproj'">latest</LangVersion>
|
|
<Deterministic>true</Deterministic>
|
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<!-- Default to portable build if not explicitly set -->
|
|
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
|
|
<!-- Used for launchSettings.json and runtime config files. -->
|
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
<!-- Determine what architecture we are building on. -->
|
|
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
|
|
</PropertyGroup>
|
|
|
|
<Import Project="$(RepositoryEngineeringDir)Analyzers.props" />
|
|
|
|
</Project>
|