Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 45 additions & 7 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<Project>

<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:
Expand All @@ -20,20 +28,19 @@
<ArtifactsBinDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'bin'))</ArtifactsBinDir>
</PropertyGroup>

<PropertyGroup>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks'))</RepoTasksDir>
<!--
Get ProjectToBuild and '<subset>ProjectToBuild' 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', 'net46', 'installer.tasks.dll'))</InstallerTasksAssemblyPath>
<HostMachineInfoProps>$(ArtifactsObjDir)HostMachineInfo.props</HostMachineInfoProps>

<LibrariesProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'libraries'))</LibrariesProjectRoot>
<CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'coreclr'))</CoreClrProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'installer'))</InstallerProjectRoot>

<DocsDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'docs'))</DocsDir>
<ManPagesDir>$([MSBuild]::NormalizeDirectory('$(DocsDir)', 'manpages'))</ManPagesDir>
<CoreLibSharedDir>$([MSBuild]::NormalizeDirectory('$(LibrariesProjectRoot)', 'System.Private.CoreLib', 'src'))</CoreLibSharedDir>
Expand All @@ -49,6 +56,37 @@
<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>
<LicenseFile>$(RepoRoot)LICENSE.TXT</LicenseFile>

<!-- Indicates this is not an officially supported release. Release branches should set this to false. -->
<IsPrerelease>true</IsPrerelease>

<!-- Experimental packages should not be stable -->
<SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(MSBuildProjectName.Contains('Experimental'))">true</SuppressFinalPackageVersion>
<IsShippingAssembly Condition="$(MSBuildProjectName.Contains('Experimental'))">false</IsShippingAssembly>

<!-- We don't want Private packages to be shipped to NuGet.org -->
<IsShippingPackage Condition="$(MSBuildProjectName.Contains('Private')) and '$(MSBuildProjectExtension)' == '.pkgproj'">false</IsShippingPackage>
</PropertyGroup>

<!-- Language configuration -->
<PropertyGroup>
<!-- default to allowing all language features -->
<LangVersion>latest</LangVersion>
<LangVersion Condition="'$(Language)' == 'C#'">preview</LangVersion>
<Deterministic>true</Deterministic>

<!-- Resource naming bug: https://github.com/microsoft/msbuild/issues/4740 -->
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>
</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>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)Analyzers.props" />

</Project>
16 changes: 16 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
<Project>

<PropertyGroup>
<!--
For non-SDK projects that import this file and then import Microsoft.Common.targets,
tell Microsoft.Common.targets not to import Directory.Build.targets again
-->
<ImportDirectoryBuildTargets>false</ImportDirectoryBuildTargets>
</PropertyGroup>

<Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(SkipImportArcadeSdkFromRoot)' != 'true'" />

<PropertyGroup>
<!--
Define this here (not just in Versions.props) because the SDK resets it
unconditionally in Microsoft.NETCoreSdk.BundledVersions.props.
-->
<NETCoreAppMaximumVersion>$(MajorVersion).$(MinorVersion)</NETCoreAppMaximumVersion>
</PropertyGroup>

</Project>
5 changes: 4 additions & 1 deletion eng/analyzers.props → eng/Analyzers.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project>
<ItemGroup>
<PropertyGroup>
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)CodeAnalysis.ruleset</CodeAnalysisRuleset>
</PropertyGroup>
<ItemGroup Condition="'$(EnableAnalyzers)' == 'true'">
<PackageReference Include="Microsoft.DotNet.CodeAnalysis" Version="$(MicrosoftDotNetCodeAnalysisVersion)" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.4.0-beta2-final" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.6" />
Expand Down
4 changes: 0 additions & 4 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
https://github.com/dotnet/arcade/issues/388
-->

<PropertyGroup>
<SkipImportArcadeSdkFromRoot>true</SkipImportArcadeSdkFromRoot>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)Subsets.props" />

<Target Name="CheckSpecifiedSubsetValidity"
Expand Down
File renamed without changes.
9 changes: 7 additions & 2 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@
artifacts to the test layout, then running the test subset.
-->

<!-- Import only when imported by Arcade's Build.proj as we import Directory.Build.props ourselves. -->
<Import Project="$(RepoRoot)Directory.Build.props" Condition="'$(SkipImportArcadeSdkFromRoot)' == 'true'" />
<PropertyGroup>
<LibrariesProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'libraries'))</LibrariesProjectRoot>
<CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'coreclr'))</CoreClrProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'installer'))</InstallerProjectRoot>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks'))</RepoTasksDir>
</PropertyGroup>

<PropertyGroup>
<DefaultSubsetCategories>libraries-installer-coreclr</DefaultSubsetCategories>
Expand Down
11 changes: 7 additions & 4 deletions eng/Tools.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<Project>
<PropertyGroup>
<MSBuildTreatWarningsAsErrors>false</MSBuildTreatWarningsAsErrors>
<EnableAnalyzers>true</EnableAnalyzers>
</PropertyGroup>

<!-- We need to import this props file which contains PackageReferences to analyzers so that
analyzer build assets are imported via the Tools generated props and targets -->
<Import Project="$(RepositoryEngineeringDir)analyzers.props" Condition="Exists('$(RepositoryEngineeringDir)analyzers.props') and '$(DotNetBuildFromSource)' != 'true'" />
<Import Project="$(RepositoryEngineeringDir)Analyzers.props" Condition="Exists('$(RepositoryEngineeringDir)Analyzers.props') and '$(DotNetBuildFromSource)' != 'true'" />

<!-- source-built packages -->
<ItemGroup>
Expand All @@ -22,6 +23,9 @@

<!-- roslyn -->
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="$(MicrosoftNetCompilersToolsetVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />

<!-- mono -->
<PackageReference Include="illink.tasks" Version="$(ILLinkTasksVersion)" PrivateAssets="all" IsImplicitlyDefined="true" ExcludeAssets="build" GeneratePathProperty="true" />
</ItemGroup>

<!-- excluded from offline portion of source build -->
Expand All @@ -41,7 +45,6 @@
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="$(MicrosoftSourceLinkVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>

<Import Project="$(RepositoryEngineeringDir)restore\docs.targets" Condition="Exists('$(RepositoryEngineeringDir)restore\docs.targets') and '$(DotNetBuildFromSource)' != 'true'" />
<Import Project="$(RepositoryEngineeringDir)restore\optimizationData.targets" Condition="Exists('$(RepositoryEngineeringDir)restore\optimizationData.targets') and '$(DotNetBuildFromSource)' != 'true' and '$(EnableNgenOptimization)' == 'true'" />
<Import Project="$(RepositoryEngineeringDir)restore\illink.targets" Condition="Exists('$(RepositoryEngineeringDir)restore\illink.targets') and '$(ILLinkTrimAssembly)' != 'false'" />
<Import Project="$(RepositoryEngineeringDir)restore\docs.targets" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<Import Project="$(RepositoryEngineeringDir)restore\optimizationData.targets" Condition="'$(DotNetBuildFromSource)' != 'true' and '$(EnableNgenOptimization)' == 'true'" />
</Project>
1 change: 0 additions & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<UsingToolXliff>false</UsingToolXliff>
<!-- Paths used during restore -->
<EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and '$(ConfigurationGroup)' == 'Release'">true</EnableNgenOptimization>
<ILLinkDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsToolsetDir)', 'ILLink'))</ILLinkDir>
<IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
<XmlDocDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs'))</XmlDocDir>
<!-- Blob storage container that has the "Latest" channel to publish to. -->
Expand Down
5 changes: 3 additions & 2 deletions eng/illink.targets
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

<!-- Inputs and outputs of ILLinkTrimAssembly -->
<PropertyGroup>
<ILLinkTasksPath Condition="'$(ILLinkTasksPath)' == '' And '$(MSBuildRuntimeType)' == 'core'">$(ILLinkDir)netcoreapp2.0/ILLink.Tasks.dll</ILLinkTasksPath>
<ILLinkTasksPath Condition="'$(ILLinkTasksPath)' == '' And '$(MSBuildRuntimeType)' != 'core'">$(ILLinkDir)net472/ILLink.Tasks.dll</ILLinkTasksPath>
<ILLinkTasksDir>$([MSBuild]::NormalizeDirectory('$(PkgILLink_Tasks)', 'tools'))</ILLinkTasksDir>
<ILLinkTasksPath Condition="'$(ILLinkTasksPath)' == '' and '$(MSBuildRuntimeType)' == 'core'">$(ILLinkTasksDir)netcoreapp2.0/ILLink.Tasks.dll</ILLinkTasksPath>
<ILLinkTasksPath Condition="'$(ILLinkTasksPath)' == '' and '$(MSBuildRuntimeType)' != 'core'">$(ILLinkTasksDir)net472/ILLink.Tasks.dll</ILLinkTasksPath>
<ILLinkTrimAssemblyPath>$(IntermediateOutputPath)$(TargetName)$(TargetExt)</ILLinkTrimAssemblyPath>
<ILLinkTrimAssemblySymbols>$(IntermediateOutputPath)$(TargetName).pdb</ILLinkTrimAssemblySymbols>
<ILLinkTrimInputPath>$(IntermediateOutputPath)PreTrim/</ILLinkTrimInputPath>
Expand Down
20 changes: 0 additions & 20 deletions eng/restore/illink.targets

This file was deleted.

3 changes: 3 additions & 0 deletions src/coreclr/src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@

</Target>

<!-- Import targets here to have TargetPath and other macros defined. Limit to CoreLib. -->
<Import Condition="'$(MSBuildProjectName)' == 'System.Private.CoreLib'" Project="$(RepositoryEngineeringDir)illink.targets" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
</PropertyGroup>

<PropertyGroup>
<_ILLinkRuntimeRootDescriptorFileName Condition=" '$(_ILLinkRuntimeRootDescriptorFileName)' == '' ">System.Private.CoreLib.xml</_ILLinkRuntimeRootDescriptorFileName>
<_ILLinkRuntimeRootDescriptorFilePath Condition=" '$(_ILLinkRuntimeRootDescriptorFilePath)' == '' ">$(IntermediateOutputPath)$(_ILLinkRuntimeRootDescriptorFileName)</_ILLinkRuntimeRootDescriptorFilePath>
<_ILLinkRuntimeRootDescriptorFilePath>$(ILLinkTrimXml)</_ILLinkRuntimeRootDescriptorFilePath>
<_NamespaceFilePath Condition=" '$(_NamespaceFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\namespace.h</_NamespaceFilePath>
<_MscorlibFilePath Condition=" '$(_MscorlibFilePath)' == '' ">$(MSBuildThisFileDirectory)..\vm\mscorlib.h</_MscorlibFilePath>
<_CortypeFilePath Condition=" '$(_CortypeFilePath)' == '' ">$(MSBuildThisFileDirectory)..\inc\cortypeinfo.h</_CortypeFilePath>
Expand Down
Loading