diff --git a/Directory.Build.props b/Directory.Build.props index 1be78d8e4ea4df..0b999b18d37dbe 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -88,9 +88,6 @@ false - - - diff --git a/docs/coding-guidelines/project-guidelines.md b/docs/coding-guidelines/project-guidelines.md index 5ab9a76c1573fd..e1ede65ea60b97 100644 --- a/docs/coding-guidelines/project-guidelines.md +++ b/docs/coding-guidelines/project-guidelines.md @@ -10,9 +10,9 @@ once before you can iterate and work on a given library project. - Netstandard Library - Copy to `bin\ref\netstandard2.0` - NetFx targeting pack - Copy to `bin\ref\net472` - Build targeting pack - - Build src\libraries\ref.proj which builds all references assembly projects. For reference assembly project information see [ref](#ref) + - Build src\ref.builds which builds all references assembly projects. For reference assembly project information see [ref](#ref) - Build product - - Build src\libraries\src.proj which builds all the source library projects. For source library project information see [src](#src). + - Build src\src.builds which builds all the source library projects. For source library project information see [src](#src). - Sign product - Build src\sign.proj diff --git a/eng/Analyzers.props b/eng/Analyzers.props index 034bb1b8e49c6c..534d38a5546ca3 100644 --- a/eng/Analyzers.props +++ b/eng/Analyzers.props @@ -1,8 +1,6 @@ $(MSBuildThisFileDirectory)CodeAnalysis.ruleset - - false diff --git a/eng/Build.props b/eng/Build.props index 8827b98cd3642c..95f52b37593d49 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -15,7 +15,6 @@ https://github.com/dotnet/arcade/issues/388 --> - @@ -77,12 +76,8 @@ - - + Properties="Configuration=Debug;Platform=AnyCPU" + Targets="Restore;Build"/> - - - - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'libraries')) - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'coreclr')) - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono')) - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'installer')) - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'tools-local')) - $([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc')) - $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs')) - - - - true - - $(Configuration) diff --git a/eng/Subsets.props b/eng/Subsets.props index 90346437faa14a..6939ee71af00b9 100644 --- a/eng/Subsets.props +++ b/eng/Subsets.props @@ -47,6 +47,15 @@ artifacts to the test layout, then running the test subset. --> + + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'libraries')) + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'coreclr')) + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono')) + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'installer')) + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'tools-local')) + $([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks')) + + libraries-installer-coreclr-mono corehost-managed-depproj-pkgproj-bundle-installers-test diff --git a/eng/Tools.props b/eng/Tools.props index 999758d5f8f94a..4c399288ad250f 100644 --- a/eng/Tools.props +++ b/eng/Tools.props @@ -1,13 +1,39 @@ - - + + false + true + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 6174024211e1dd..e2b20bc565a85c 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -38,13 +38,13 @@ https://github.com/dotnet/arcade 421b20fb860907c45673de791177e3fd61402197 - + https://github.com/dotnet/arcade 421b20fb860907c45673de791177e3fd61402197 - + https://github.com/dotnet/arcade - bc4fa8e7149769db4efd466f160417a32b11f0bf + 421b20fb860907c45673de791177e3fd61402197 https://github.com/dotnet/arcade diff --git a/eng/Versions.props b/eng/Versions.props index eadba345483640..e7bd40414e24d9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -19,6 +19,10 @@ true true false + + true + $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs')) dotnet $(ContainerName) @@ -56,7 +60,7 @@ 5.0.0-beta.20153.1 5.0.0-beta.20153.1 - 5.0.0-beta.20156.4 + 5.0.0-beta.20153.1 5.0.0-beta.20153.1 5.0.0-beta.20153.1 5.0.0-beta.20153.1 diff --git a/eng/codeAnalysis.targets b/eng/codeAnalysis.targets new file mode 100644 index 00000000000000..de4eb79cd35db1 --- /dev/null +++ b/eng/codeAnalysis.targets @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + <_AnalyzersToFileName Include="@(Analyzer -> '%(FileName)')"> + %(Identity) + + + + + <_AnalyzersToRemove Include="@(_AnalyzersToFileName)" Condition="'@(AnalyzersToExclude)' == '@(_AnalyzersToFileName)' and '%(Identity)' != ''" /> + + + + + <_AnalyzersToRemove Include="@(_AnalyzersToFileName)" Exclude="@(AnalyzersToInclude)" /> + <_missingAnalyzersToInclude Include="@(AnalyzersToInclude)" Exclude="@(_AnalyzersToFileName)" /> + + + + + + + + + $(ResolveReferencesDependsOn); + CalculateAnalyzersForBuildTime; + + + \ No newline at end of file diff --git a/eng/docker/build-docker-sdk.ps1 b/eng/docker/build-docker-sdk.ps1 index af1943a0d49dce..76c1ce7b414070 100755 --- a/eng/docker/build-docker-sdk.ps1 +++ b/eng/docker/build-docker-sdk.ps1 @@ -18,7 +18,8 @@ if ($buildWindowsContainers) # Due to size concerns, we don't currently do docker builds on windows. # Build on the host machine, then simply copy artifacts to the target docker image. # This should result in significantly lower build times, for now. - & "$REPO_ROOT_DIR/build.cmd" -ci -subsetcategory coreclr-libraries -runtimeconfiguration release -c $configuration + & "$REPO_ROOT_DIR/coreclr.cmd" -c Release + & "$REPO_ROOT_DIR/libraries.cmd" -ci -c $configuration -runtimeConfiguration release # Dockerize the build artifacts docker build --tag $imageName ` diff --git a/eng/docker/libraries-sdk.linux.Dockerfile b/eng/docker/libraries-sdk.linux.Dockerfile index fce6381e71028a..efba4fb7c309d4 100644 --- a/eng/docker/libraries-sdk.linux.Dockerfile +++ b/eng/docker/libraries-sdk.linux.Dockerfile @@ -8,7 +8,8 @@ WORKDIR /repo COPY . . ARG CONFIGURATION=Release -RUN ./build.sh -ci -subsetcategory coreclr-libraries -runtimeconfiguration release -c $CONFIGURATION +RUN ./src/coreclr/build.sh -release -skiptests -clang9 && \ + ./libraries.sh -c $CONFIGURATION -runtimeconfiguration release FROM $SDK_BASE_IMAGE as target diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index 017ca39dbb0cce..4cf1c7ded3827c 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -26,7 +26,7 @@ variables: - name: enterpriseTestsSetup value: $(sourcesRoot)/Common/tests/System/Net/EnterpriseTests/setup - name: containerRunTestsCommand - value: /repo/.dotnet/dotnet build /t:test + value: /repo/.dotnet/dotnet build /t:test --no-restore - name: containerLibrariesRoot value: /repo/src/libraries @@ -50,7 +50,7 @@ steps: displayName: Test linuxclient connection to web server - bash: | - docker exec linuxclient bash -c '/repo/build.sh -subsetcategory coreclr-libraries -runtimeconfiguration release -ci' + docker exec linuxclient bash -c '/repo/src/coreclr/build.sh -release -skipnuget -clang9 && /repo/libraries.sh /p:CoreCLRConfiguration=Release' displayName: Build product sources - bash: | diff --git a/eng/restore/repoRestore.props b/eng/restore/repoRestore.props index 3d6a393519d7f1..204c23d1de0b95 100644 --- a/eng/restore/repoRestore.props +++ b/eng/restore/repoRestore.props @@ -28,4 +28,4 @@ false false - + \ No newline at end of file diff --git a/eng/restore/repoRestore.targets b/eng/restore/repoRestore.targets index a430b67fee1fff..d99f198e1a5fbd 100644 --- a/eng/restore/repoRestore.targets +++ b/eng/restore/repoRestore.targets @@ -4,6 +4,8 @@ Unknown + + @@ -140,14 +146,6 @@ $(RepositoryEngineeringDir)DefaultGenApiDocIds.txt - - - - - - - - <_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789")) <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex))) @@ -172,7 +170,6 @@ win-x64 osx-x64 linux-x64 - $(ToolRuntimeRID) <_portableOS Condition="'$(TargetOS)' == 'Unix' and '$(_runtimeOSFamily)' != 'osx' and '$(_runtimeOSFamily)' != 'FreeBSD' and '$(_runtimeOS)' != 'linux-musl'">linux @@ -271,10 +268,10 @@ strict;nullablePublicOnly 4 true - + false true - true + true @@ -299,6 +296,7 @@ $([MSBuild]::NormalizeDirectory('$(RefRootPath)', 'netstandard2.0')) $([MSBuild]::NormalizeDirectory('$(RefRootPath)', 'netstandard2.1')) $([MSBuild]::NormalizeDirectory('$(RefRootPath)', '$(NetFrameworkCurrent)')) + $([MSBuild]::NormalizeDirectory('$(ArtifactsToolsetDir)', 'ilasm')) $(TargetOS).$(Platform).$(Configuration) @@ -337,12 +335,6 @@ - - true - - - - false true diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index f019b5bd21a6af..659009ab0dbe2f 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -113,6 +113,7 @@ + diff --git a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj index e8774341649cad..436ecca9fbe2d5 100644 --- a/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj +++ b/src/libraries/Microsoft.VisualBasic.Core/src/Microsoft.VisualBasic.Core.vbproj @@ -18,8 +18,6 @@ - - false $(NetCoreAppCurrent);$(NetCoreAppCurrent)-Windows_NT diff --git a/src/libraries/System.Net.Http/src/PinvokeAnalyzerExceptionList.analyzerdata b/src/libraries/System.Net.Http/src/PInvokeAnalyzerExceptionList.analyzerdata similarity index 100% rename from src/libraries/System.Net.Http/src/PinvokeAnalyzerExceptionList.analyzerdata rename to src/libraries/System.Net.Http/src/PInvokeAnalyzerExceptionList.analyzerdata diff --git a/src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj b/src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj index ee65f5e9eff934..08655bbddfe08f 100644 --- a/src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj +++ b/src/libraries/System.Runtime.WindowsRuntime/ref/System.Runtime.WindowsRuntime.csproj @@ -18,13 +18,13 @@ - + - + diff --git a/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj b/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj index 147afba607288f..60f7f32e4794b7 100644 --- a/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj +++ b/src/libraries/System.Runtime.WindowsRuntime/src/System.Runtime.WindowsRuntime.csproj @@ -15,6 +15,18 @@ SR.PlatformNotSupported_WindowsRuntime true + + + + + + + + + + + + @@ -82,24 +94,12 @@ Common\System\HexConverter.cs - - - - - - - - - - - - - + diff --git a/src/libraries/System.Runtime.WindowsRuntime/tests/System.Runtime.WindowsRuntime.Tests.csproj b/src/libraries/System.Runtime.WindowsRuntime/tests/System.Runtime.WindowsRuntime.Tests.csproj index 8633fffda010c5..dab72ed0560b0e 100644 --- a/src/libraries/System.Runtime.WindowsRuntime/tests/System.Runtime.WindowsRuntime.Tests.csproj +++ b/src/libraries/System.Runtime.WindowsRuntime/tests/System.Runtime.WindowsRuntime.Tests.csproj @@ -18,6 +18,6 @@ - + \ No newline at end of file diff --git a/src/libraries/build.proj b/src/libraries/build.proj index 0e00e66aea4501..8da5cf9b63eb6e 100644 --- a/src/libraries/build.proj +++ b/src/libraries/build.proj @@ -11,32 +11,21 @@ $(BuildDependsOn);BuildManaged $(BuildDependsOn);Pack $(BuildDependsOn);BuildTests - - true - <_RestoreBuildProjects Include="$(MSBuildThisFileDirectory)restore\dirs.proj" /> - <_RestoreProjects Include="@(_RestoreBuildProjects)" /> + <_RestoreProjects Include="$(MSBuildThisFileDirectory)restore\dirs.proj" Build="true" /> - - - <_RestoreProjects Include="$(MSBuildThisFileDirectory)dirs.proj" /> - <_RestoreProjects Include="$(MSBuildThisFileDirectory)tests.proj" Condition="'$(DotNetBuildFromSource)' != 'true'" /> - <_RestoreProjects Include="$(MSBuildThisFileDirectory)packages.proj" /> + + + <_RestoreProjects Include="$(MSBuildThisFileDirectory)tests.proj" Build="false" /> - - - + + @@ -44,7 +33,7 @@ <_BuildNativeProjects Include="$(MSBuildThisFileDirectory)Native\build-native.proj" /> - + @@ -52,15 +41,7 @@ <_BuildMangedProjects Include="$(MSBuildThisFileDirectory)dirs.proj" /> - - - - + @@ -68,15 +49,9 @@ <_TestProjects Include="$(MSBuildThisFileDirectory)tests.proj" /> - - - + Targets="Build" + Properties="$(ProjectProperties)" /> @@ -85,23 +60,16 @@ + Targets="Test" + Properties="$(ProjectProperties)" /> - <_PackProjects Include="$(MSBuildThisFileDirectory)packages.proj" /> + <_PackProjects Include="$(MSBuildThisFileDirectory)packages.builds" /> - - - - + diff --git a/src/libraries/dirs.proj b/src/libraries/dirs.proj index d03d5892fe7920..2b9534d5965a81 100644 --- a/src/libraries/dirs.proj +++ b/src/libraries/dirs.proj @@ -1,35 +1,26 @@ - + + - $(BuildTargetFramework) + true - - - - - - + + + + + + + - - + + - + - - - - - - + \ No newline at end of file diff --git a/src/libraries/packages.proj b/src/libraries/packages.builds similarity index 71% rename from src/libraries/packages.proj rename to src/libraries/packages.builds index 9e62eb26d72bff..ab33fce628208e 100644 --- a/src/libraries/packages.proj +++ b/src/libraries/packages.builds @@ -1,22 +1,23 @@ - - true - - - + - - $(BuildTargetFramework) - $(AdditionalBuildTargetFrameworks);package-$(Configuration) + + $(AdditionalBuildTargetFrameworks);package-$(Configuration) - - + + $(AdditionalProperties) + + + $(AdditionalProperties) + - + + + - - - - diff --git a/src/libraries/pretest.proj b/src/libraries/pretest.proj index 5b5cb13dd2490c..317bf140a39af2 100644 --- a/src/libraries/pretest.proj +++ b/src/libraries/pretest.proj @@ -2,15 +2,16 @@ - $(BuildTargetFramework) GenerateLaunchSettingsFiles $(BuildDependsOnTargets);GenerateTestSharedFrameworkDepsFile $(BuildDependsOnTargets);GenerateFileVersionProps + netcoreapp + 5.0 - + @@ -57,7 +58,6 @@ <_TestProjectRootDir>$(LibrariesProjectRoot) <_TestProjectRootDir Condition="'$(DirectoryToBuild)'!=''">$(DirectoryToBuild) - @@ -65,7 +65,7 @@ + ContinueOnError="ErrorAndContinue" /> @@ -73,9 +73,15 @@ + + + + + diff --git a/src/libraries/ref.builds b/src/libraries/ref.builds new file mode 100644 index 00000000000000..9bef0a6e4edbab --- /dev/null +++ b/src/libraries/ref.builds @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/libraries/ref.proj b/src/libraries/ref.proj deleted file mode 100644 index 99037969eaadb3..00000000000000 --- a/src/libraries/ref.proj +++ /dev/null @@ -1,30 +0,0 @@ - - - - - $(BuildTargetFramework) - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/libraries/restore/analyzers/analyzers.depproj b/src/libraries/restore/analyzers/analyzers.depproj new file mode 100644 index 00000000000000..27fad4d37cff1d --- /dev/null +++ b/src/libraries/restore/analyzers/analyzers.depproj @@ -0,0 +1,27 @@ + + + false + true + C# + netstandard2.0 + + + + + + + + + + + + + + diff --git a/src/libraries/restore/dirs.proj b/src/libraries/restore/dirs.proj index ee2162758d1e64..d54794d38db3ee 100644 --- a/src/libraries/restore/dirs.proj +++ b/src/libraries/restore/dirs.proj @@ -1,14 +1,15 @@ - - $(BuildTargetFramework) - - - + + + + + + diff --git a/eng/restore/harvestPackages.targets b/src/libraries/restore/harvestPackages/harvestPackages.depproj similarity index 54% rename from eng/restore/harvestPackages.targets rename to src/libraries/restore/harvestPackages/harvestPackages.depproj index d6f6f98019f1cc..2ae20ecda6e67c 100644 --- a/eng/restore/harvestPackages.targets +++ b/src/libraries/restore/harvestPackages/harvestPackages.depproj @@ -1,14 +1,15 @@ - + - $(NuGetPackageRoot)microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\tools\ - $(PackagingTaskAssembly)netcoreapp2.1\ - $(PackagingTaskAssembly)net472\ - $(PackagingTaskAssembly)Microsoft.DotNet.Build.Tasks.Packaging.dll + netstandard2.0 - + + + + - <_AllPkgProjs Include="$(LibrariesProjectRoot)*\pkg\**\*.pkgproj" /> @@ -19,10 +20,10 @@ - + LatestPackages="@(_AllPkgProjsToPackageIdentity)" + PackageIndexes="$(PackageIndexFile)" + DoNotAllowVersionsFromSameRelease="true"> + @@ -39,4 +40,5 @@ + \ No newline at end of file diff --git a/src/libraries/restore/tools/tools.depproj b/src/libraries/restore/tools/tools.depproj new file mode 100644 index 00000000000000..f2e32a3773b8b6 --- /dev/null +++ b/src/libraries/restore/tools/tools.depproj @@ -0,0 +1,18 @@ + + + $(ILAsmToolPath) + false + $(ToolRuntimeRID) + $(NoWarn);NU1603;NU1605 + netstandard2.0 + + + + + $(MicrosoftNETCoreILAsmVersion) + + + $(MicrosoftNETCoreILAsmVersion) + + + \ No newline at end of file diff --git a/src/libraries/restore/winrt/winrt.depproj b/src/libraries/restore/winrt/winrt.depproj new file mode 100644 index 00000000000000..fb99977c302e51 --- /dev/null +++ b/src/libraries/restore/winrt/winrt.depproj @@ -0,0 +1,16 @@ + + + Windows + .winmd + + true + Reference + netcoreapp3.0;$(netcoreappCurrent);netstandard1.0 + + + + 1.0.5 + + + \ No newline at end of file diff --git a/src/libraries/shims/ApiCompat.proj b/src/libraries/shims/ApiCompat.proj index db4c9fe1d756ef..a340a3d1a5aecd 100644 --- a/src/libraries/shims/ApiCompat.proj +++ b/src/libraries/shims/ApiCompat.proj @@ -1,12 +1,9 @@ - - + - - $(BuildTargetFramework) - + - $(TargetFramework) + $(BuildTargetFramework) netcoreapp $(IntermediateOutputPath)/apicompat.rsp $(MSBuildThisFileDirectory)ApiCompatBaseline.$(ApiCompatTarget).netfx461.txt @@ -101,12 +98,11 @@ - + + + - - - - + diff --git a/src/libraries/shims/Directory.Build.props b/src/libraries/shims/Directory.Build.props index 768825eb3e775b..790b6126ca80de 100644 --- a/src/libraries/shims/Directory.Build.props +++ b/src/libraries/shims/Directory.Build.props @@ -1,7 +1,4 @@ - - true - diff --git a/src/libraries/src.builds b/src/libraries/src.builds new file mode 100644 index 00000000000000..5903b7fd7a10af --- /dev/null +++ b/src/libraries/src.builds @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/libraries/src.proj b/src/libraries/src.proj deleted file mode 100644 index d2d0ec88d23df0..00000000000000 --- a/src/libraries/src.proj +++ /dev/null @@ -1,34 +0,0 @@ - - - - - $(BuildTargetFramework) - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/libraries/tests.proj b/src/libraries/tests.proj index 1a32a6b477c382..d47a26ac972b8b 100644 --- a/src/libraries/tests.proj +++ b/src/libraries/tests.proj @@ -1,9 +1,9 @@ - + - $(BuildTargetFramework) + $(NetCoreAppCurrent) @@ -14,16 +14,22 @@ - - - - + + + + - + + + + + + + - + + + @@ -50,13 +58,13 @@ +