summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Directory.Build.props5
-rw-r--r--build.cmd29
-rw-r--r--build.proj45
-rwxr-xr-xbuild.sh20
-rw-r--r--clr.coreclr.props39
-rw-r--r--clr.featuredefines.props (renamed from clr.defines.targets)41
-rw-r--r--dir.common.props5
-rw-r--r--dir.props13
-rw-r--r--global.json4
-rw-r--r--pgosupport.cmake6
-rw-r--r--src/.nuget/optdata/ibcmerge.csproj2
-rw-r--r--src/.nuget/optdata/optdata.csproj2
-rw-r--r--src/Directory.Build.props9
-rw-r--r--src/Directory.Build.targets20
-rw-r--r--src/System.Private.CoreLib/Common/System/SR.cs12
-rw-r--r--src/System.Private.CoreLib/GenerateCompilerResponseFile.targets12
-rw-r--r--src/System.Private.CoreLib/ILLink.targets2
-rw-r--r--src/System.Private.CoreLib/System.Private.CoreLib.csproj141
-rw-r--r--src/System.Private.CoreLib/shared/System/Threading/Tasks/TplEventSource.cs2
-rw-r--r--src/System.Private.CoreLib/src/System/Internal.cs14
-rw-r--r--src/ToolBox/SOS/NETCore/SOS.NETCore.csproj76
-rw-r--r--src/build.proj62
-rw-r--r--src/scripts/check-definitions.py18
-rw-r--r--src/tools/r2rdump/R2RDump.csproj7
-rw-r--r--tests/scripts/optdata/optdata.csproj2
-rw-r--r--tests/src/dir.targets3
26 files changed, 271 insertions, 320 deletions
diff --git a/Directory.Build.props b/Directory.Build.props
index 5c40264f65..1b43fd479a 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,4 +1,7 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
+
+ <!-- Ensure our properties are set before Arcade defines defaults -->
+ <Import Project="dir.common.props" Condition="'$(ArcadeBuild)' == 'True'" />
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" Condition="'$(ArcadeBuild)' == 'True'"/>
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''">
diff --git a/build.cmd b/build.cmd
index e9669ca36a..916b5602ea 100644
--- a/build.cmd
+++ b/build.cmd
@@ -100,7 +100,7 @@ set __BuildManagedTools=1
set __RestoreOptData=1
set __GenerateLayout=0
set __CrossgenAltJit=
-set __SkipRestoreArg=
+set __SkipRestoreArg=/p:RestoreDuringBuild=true
set __OfficialBuildIdArg=
set __CrossArch=
set __SkipNugetPackage=0
@@ -510,7 +510,7 @@ if %__BuildCrossArchNative% EQU 1 (
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
%__CrossCompIntermediatesDir%\install.vcxproj^
- !__Logging! /p:Configuration=%__BuildType% /p:Platform=%__CrossArch% %__CommonMSBuildArgs% /m:2 %__UnprocessedBuildArgs%
+ !__Logging! /p:Configuration=%__BuildType% /p:Platform=%__CrossArch% %__CommonMSBuildArgs% %__UnprocessedBuildArgs%
if not !errorlevel! == 0 (
echo %__MsgPrefix%Error: cross-arch components build failed. Refer to the build log files for details:
@@ -597,7 +597,7 @@ if %__BuildNative% EQU 1 (
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount %__IntermediatesDir%\install.vcxproj^
- !__Logging! /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__CommonMSBuildArgs% /m:2 %__UnprocessedBuildArgs%
+ !__Logging! /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__CommonMSBuildArgs% %__UnprocessedBuildArgs%
if not !errorlevel! == 0 (
echo %__MsgPrefix%Error: native component build failed. Refer to the build log files for details:
@@ -652,15 +652,28 @@ if %__BuildCoreLib% EQU 1 (
set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!
- call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
+ call %__ProjectDir%\dotnet.cmd restore /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
/l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
- /p:UsePartialNGENOptimization=false /maxcpucount^
- %__ProjectDir%\build.proj^
+ /p:UsePartialNGENOptimization=false /maxcpucount /p:IncludeRestoreOnlyProjects=true /p:ArcadeBuild=true^
+ %__ProjectDir%\src\build.proj^
!__Logging! %__CommonMSBuildArgs% !__ExtraBuildArgs! %__UnprocessedBuildArgs%
+ if not !errorlevel! == 0 (
+ echo %__MsgPrefix%Error: Managed Product assemblies restore failed. Refer to the build log files for details:
+ echo !__BuildLog!
+ echo !__BuildWrn!
+ echo !__BuildErr!
+ exit /b 1
+ )
+ call %__ProjectDir%\dotnet.cmd msbuild /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
+ /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
+ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
+ /p:UsePartialNGENOptimization=false /maxcpucount /p:DotNetUseShippingVersions=true /p:ArcadeBuild=true^
+ %__ProjectDir%\src\build.proj^
+ !__Logging! %__CommonMSBuildArgs% !__ExtraBuildArgs! %__UnprocessedBuildArgs%
if not !errorlevel! == 0 (
- echo %__MsgPrefix%Error: System.Private.CoreLib build failed. Refer to the build log files for details:
+ echo %__MsgPrefix%Error: Managed Product assemblies build failed. Refer to the build log files for details:
echo !__BuildLog!
echo !__BuildWrn!
echo !__BuildErr!
@@ -816,7 +829,7 @@ if %__BuildNativeCoreLib% EQU 1 (
set COMPlus_ContinueOnAssert=0
)
- set NEXTCMD="%__CrossgenExe%" %__IbcTuning% /Platform_Assemblies_Paths "%__BinDir%"\IL /out "%__BinDir%\System.Private.CoreLib.dll" "%__BinDir%\IL\System.Private.CoreLib.dll"
+ set NEXTCMD="%__CrossgenExe%" %__IbcTuning% /Platform_Assemblies_Paths "%__BinDir%\IL" /out "%__BinDir%\System.Private.CoreLib.dll" "%__BinDir%\IL\System.Private.CoreLib.dll"
echo %__MsgPrefix%!NEXTCMD!
echo %__MsgPrefix%!NEXTCMD! >> "%__CrossGenCoreLibLog%"
!NEXTCMD! >> "%__CrossGenCoreLibLog%" 2>&1
diff --git a/build.proj b/build.proj
index 429b1520fe..3ccf06db2e 100644
--- a/build.proj
+++ b/build.proj
@@ -1,51 +1,14 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build"
- xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project Sdk="Microsoft.Build.NoTargets">
+ <!-- [ARCADE_REMOVE] The entire file can be removed -->
<Import Project="dir.props" />
- <ItemGroup>
- <!-- We use build.proj instead of dirs.proj so we don't conflict with the TFS build-->
- <Project Include="src\build.proj" />
- </ItemGroup>
-
<Import Project="dir.targets" />
<Import Project="dir.traversal.targets" />
- <Import Project="$(ToolsDir)clean.targets" />
-
- <!-- The following properties are in place to keep the behavior of build.cmd while we work on the dev workflow steps. -->
- <PropertyGroup>
- <!-- To disable the restoration of packages, set RestoreDuringBuild=false or pass /p:RestoreDuringBuild=false.-->
- <RestoreDuringBuild Condition="'$(RestoreDuringBuild)'==''">true</RestoreDuringBuild>
- </PropertyGroup>
-
- <!-- Override clean from dir.traversal.targets and just remove the full BinDir -->
- <Target Name="Clean">
- <Delete Files="$(BinDir)SOS.NETCore.*" />
- <Delete Files="$(BinDir)mscorlib.*" />
- <Delete Files="$(BinDir)System.Private.CoreLib.*" />
- <Delete Files="$(BinDir)netcoreapp2.0/R2RDump.*" />
- </Target>
-
- <!--
- BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
- target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
- the tools are fetched before "Build".
- -->
- <Target Name="Sync" BeforeTargets="Build" DependsOnTargets="RestoreOptData;RestoreNETCorePlatforms" />
-
<Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'">
<Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj" StandardOutputImportance="Low" />
</Target>
- <Target Name="RestoreNETCorePlatforms" Condition="'$(RestoreDuringBuild)'=='true'">
- <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj" StandardOutputImportance="Low" />
- </Target>
-
- <Target Name="CleanAllProjects">
- <Message Condition="Exists($(RootBinDir))" Importance="High" Text="Removing $(RootBinDir)"/>
- <RemoveDir Directories="$(RootBinDir)" />
- </Target>
-
-</Project>
+ <Import Project="$(ToolsDir)clean.targets" />
+</Project> \ No newline at end of file
diff --git a/build.sh b/build.sh
index a24bd89070..3324524d49 100755
--- a/build.sh
+++ b/build.sh
@@ -439,11 +439,25 @@ build_CoreLib()
__ExtraBuildArgs="$__ExtraBuildArgs /p:BuildManagedTools=true"
fi
+ $__ProjectRoot/dotnet.sh restore /nologo /verbosity:minimal /clp:Summary \
+ /l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \
+ /p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \
+ /p:UsePartialNGENOptimization=false /maxcpucount /p:IncludeRestoreOnlyProjects=true /p:ArcadeBuild=true\
+ $__ProjectDir/src/build.proj \
+ /flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \
+ /p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackage=false \
+ $__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs
+
+ if [ $? -ne 0 ]; then
+ echo "Failed to restore managed components."
+ exit 1
+ fi
+
$__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \
/l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true \
- /p:UsePartialNGENOptimization=false /maxcpucount \
- $__ProjectDir/build.proj \
+ /p:UsePartialNGENOptimization=false /maxcpucount /p:DotNetUseShippingVersions=true /p:ArcadeBuild=true\
+ $__ProjectDir/src/build.proj \
/flp:Verbosity=normal\;LogFile=$__LogsDir/System.Private.CoreLib_$__BuildOS__$__BuildArch__$__BuildType.log \
/p:__IntermediatesDir=$__IntermediatesDir /p:__RootBinDir=$__RootBinDir /p:BuildNugetPackage=false \
$__CommonMSBuildArgs $__ExtraBuildArgs $__UnprocessedBuildArgs
@@ -656,7 +670,7 @@ __msbuildonunsupportedplatform=0
__PgoOptDataVersion=""
__IbcOptDataVersion=""
__BuildManagedTools=1
-__SkipRestoreArg=""
+__SkipRestoreArg="/p:RestoreDuringBuild=true"
__SignTypeArg=""
__OfficialBuildIdArg=""
__StaticAnalyzer=0
diff --git a/clr.coreclr.props b/clr.coreclr.props
deleted file mode 100644
index a3a3c00fcf..0000000000
--- a/clr.coreclr.props
+++ /dev/null
@@ -1,39 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <FeatureCollectibleALC>true</FeatureCollectibleALC>
- <FeatureEventTrace>true</FeatureEventTrace>
- <FeatureHardwareIntrinsics>true</FeatureHardwareIntrinsics>
- <FeatureICastable>true</FeatureICastable>
- <FeatureManagedEtwChannels>true</FeatureManagedEtwChannels>
- <FeatureManagedEtw>true</FeatureManagedEtw>
- <FeaturePerfTracing>true</FeaturePerfTracing>
- <FeatureTypeEquivalence>true</FeatureTypeEquivalence>
- <FeatureBasicFreeze>true</FeatureBasicFreeze>
- <FeatureDefaultInterfaces>true</FeatureDefaultInterfaces>
- <ProfilingSupportedBuild>true</ProfilingSupportedBuild>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetsUnix)' == 'true'">
- <FeaturePal>true</FeaturePal>
- <FeatureXplatEventSource>true</FeatureXplatEventSource>
-
- <FeatureArrayStubAsIL>true</FeatureArrayStubAsIL>
- <FeatureMulticastStubAsIL>true</FeatureMulticastStubAsIL>
- <FeatureStubsAsIL>true</FeatureStubsAsIL>
- </PropertyGroup>
-
- <PropertyGroup Condition="'$(TargetsWindows)' == 'true'">
- <FeatureArrayStubAsIL Condition="'$(TargetArch)' != 'i386'">true</FeatureArrayStubAsIL>
- <FeatureMulticastStubAsIL Condition="'$(TargetArch)' != 'i386'">true</FeatureMulticastStubAsIL>
- <FeatureStubsAsIL Condition="'$(TargetArch)' == 'arm64'">true</FeatureStubsAsIL>
- <FeatureUseLcid>true</FeatureUseLcid>
- <FeatureCominterop>true</FeatureCominterop>
- <FeatureClassicCominterop>true</FeatureClassicCominterop>
- <FeatureCominteropUnmanagedActivation>true</FeatureCominteropUnmanagedActivation>
- <FeatureCominteropWinRTManagedActivation>true</FeatureCominteropWinRTManagedActivation>
- <FeatureCominteropApartmentSupport>true</FeatureCominteropApartmentSupport>
- <FeatureAppX>true</FeatureAppX>
- <FeatureWin32Registry>true</FeatureWin32Registry>
- <FeatureProfAttach>true</FeatureProfAttach>
- </PropertyGroup>
-</Project>
diff --git a/clr.defines.targets b/clr.featuredefines.props
index e2f10586f1..d96297eb0c 100644
--- a/clr.defines.targets
+++ b/clr.featuredefines.props
@@ -1,4 +1,42 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
+ <PropertyGroup>
+ <FeatureCollectibleALC>true</FeatureCollectibleALC>
+ <FeatureEventTrace>true</FeatureEventTrace>
+ <FeatureHardwareIntrinsics>true</FeatureHardwareIntrinsics>
+ <FeatureICastable>true</FeatureICastable>
+ <FeatureManagedEtwChannels>true</FeatureManagedEtwChannels>
+ <FeatureManagedEtw>true</FeatureManagedEtw>
+ <FeaturePerfTracing>true</FeaturePerfTracing>
+ <FeatureTypeEquivalence>true</FeatureTypeEquivalence>
+ <FeatureBasicFreeze>true</FeatureBasicFreeze>
+ <FeatureDefaultInterfaces>true</FeatureDefaultInterfaces>
+ <ProfilingSupportedBuild>true</ProfilingSupportedBuild>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetsUnix)' == 'true'">
+ <FeaturePal>true</FeaturePal>
+ <FeatureXplatEventSource>true</FeatureXplatEventSource>
+
+ <FeatureArrayStubAsIL>true</FeatureArrayStubAsIL>
+ <FeatureMulticastStubAsIL>true</FeatureMulticastStubAsIL>
+ <FeatureStubsAsIL>true</FeatureStubsAsIL>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(TargetsWindows)' == 'true'">
+ <FeatureArrayStubAsIL Condition="'$(Platform)' != 'x86'">true</FeatureArrayStubAsIL>
+ <FeatureMulticastStubAsIL Condition="'$(Platform)' != 'x86'">true</FeatureMulticastStubAsIL>
+ <FeatureStubsAsIL Condition="'$(Platform)' == 'arm64'">true</FeatureStubsAsIL>
+ <FeatureUseLcid>true</FeatureUseLcid>
+ <FeatureCominterop>true</FeatureCominterop>
+ <FeatureClassicCominterop>true</FeatureClassicCominterop>
+ <FeatureCominteropUnmanagedActivation>true</FeatureCominteropUnmanagedActivation>
+ <FeatureCominteropWinRTManagedActivation>true</FeatureCominteropWinRTManagedActivation>
+ <FeatureCominteropApartmentSupport>true</FeatureCominteropApartmentSupport>
+ <FeatureAppX>true</FeatureAppX>
+ <FeatureWin32Registry>true</FeatureWin32Registry>
+ <FeatureProfAttach>true</FeatureProfAttach>
+ </PropertyGroup>
+
<!-- Features we're currently flighting, but don't intend to ship in officially supported releases -->
<PropertyGroup Condition="'$(IsPrerelease)' == 'true'">
<FeatureUtf8String>true</FeatureUtf8String>
@@ -26,6 +64,7 @@
<DefineConstants Condition="'$(FeatureDefaultInterfaces)' == 'true'">$(DefineConstants);FEATURE_DEFAULT_INTERFACES</DefineConstants>
<DefineConstants Condition="'$(FeatureTypeEquivalence)' == 'true'">$(DefineConstants);FEATURE_TYPEEQUIVALENCE</DefineConstants>
<DefineConstants Condition="'$(FeatureBasicFreeze)' == 'true'">$(DefineConstants);FEATURE_BASICFREEZE</DefineConstants>
+ <DefineConstants Condition="'$(FeatureUtf8String)' == 'true'">$(DefineConstants);FEATURE_UTF8STRING</DefineConstants>
<DefineConstants Condition="'$(ProfilingSupportedBuild)' == 'true'">$(DefineConstants);PROFILING_SUPPORTED</DefineConstants>
<DefineConstants Condition="'$(FeatureProfAttach)' == 'true'">$(DefineConstants);FEATURE_PROFAPI_ATTACH_DETACH</DefineConstants>
diff --git a/dir.common.props b/dir.common.props
index dc9d8f1394..acd84e7bae 100644
--- a/dir.common.props
+++ b/dir.common.props
@@ -1,4 +1,4 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
<!-- This file contains build properties that apply to product
projects and test projects. It's imported by
@@ -30,11 +30,12 @@
<Configuration Condition="'$(Configuration)' == ''">$(BuildType)</Configuration>
<Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
+
+ <PlatformConfigPathPart>$(BuildOS).$(BuildArch).$(BuildType)</PlatformConfigPathPart>
</PropertyGroup>
<PropertyGroup>
<RestorePackagesPath>$(PackagesDir)</RestorePackagesPath>
</PropertyGroup>
-
</Project>
diff --git a/dir.props b/dir.props
index 7737e6b317..2792ac731b 100644
--- a/dir.props
+++ b/dir.props
@@ -61,10 +61,7 @@
<RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
<BinDir>$(__BinDir)\</BinDir>
- <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
-
- <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
- <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
+ <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(PlatformConfigPathPart)\</BinDir>
<!-- We don't append back slash because this path is used by nuget.exe as output directory and it
fails to write packages to it if the path contains the forward slash.
@@ -78,7 +75,7 @@
<BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
<TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
- <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
+ <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(PlatformConfigPathPart)\</TestWorkingDir>
<Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
<Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
@@ -92,7 +89,11 @@
<!-- Output paths -->
<PropertyGroup>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
- <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
+
+ <AppendTargetFrameworkToOutputPath Condition="'$(ArcadeBuild)' == 'true'">false</AppendTargetFrameworkToOutputPath>
+ <IntermediateOutputPath>$(__IntermediatesDir)\$(MSBuildProjectName)\</IntermediateOutputPath>
+ <IntermediateOutputPath Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj/$(PlatformConfigPathPart)/$(MSBuildProjectName)/</IntermediateOutputPath>
+
<OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
</PropertyGroup>
diff --git a/global.json b/global.json
index 5ff89906cd..f8166b051e 100644
--- a/global.json
+++ b/global.json
@@ -8,6 +8,8 @@
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19229.8",
- "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8"
+ "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19229.8",
+ "Microsoft.Build.NoTargets": "1.0.53",
+ "Microsoft.Build.Traversal": "1.0.52"
}
}
diff --git a/pgosupport.cmake b/pgosupport.cmake
index bc331be6a5..dec050033e 100644
--- a/pgosupport.cmake
+++ b/pgosupport.cmake
@@ -28,7 +28,9 @@ function(add_pgo TargetName)
endif(WIN32)
elseif(CLR_CMAKE_PGO_OPTIMIZE)
# If we don't have profile data availble, gracefully fall back to a non-PGO opt build
- if(EXISTS ${ProfilePath})
+ if(NOT EXISTS ${ProfilePath})
+ message("PGO data file NOT found: ${ProfilePath}")
+ else(NOT EXISTS ${ProfilePath})
if(WIN32)
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /LTCG /USEPROFILE:PGD=${ProfilePath}")
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /LTCG /USEPROFILE:PGD=${ProfilePath}")
@@ -46,6 +48,6 @@ function(add_pgo TargetName)
endif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6)
endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO)
endif(WIN32)
- endif(EXISTS ${ProfilePath})
+ endif(NOT EXISTS ${ProfilePath})
endif(CLR_CMAKE_PGO_INSTRUMENT)
endfunction(add_pgo)
diff --git a/src/.nuget/optdata/ibcmerge.csproj b/src/.nuget/optdata/ibcmerge.csproj
index 3ec0272a7a..e00d3d1d54 100644
--- a/src/.nuget/optdata/ibcmerge.csproj
+++ b/src/.nuget/optdata/ibcmerge.csproj
@@ -3,7 +3,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
- <TargetFramework>netstandard</TargetFramework>
+ <TargetFramework>netstandard2.0</TargetFramework>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<RuntimeIdentifiers>win7-x64;win7-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
diff --git a/src/.nuget/optdata/optdata.csproj b/src/.nuget/optdata/optdata.csproj
index 408e5363ed..8ab2f5bf1d 100644
--- a/src/.nuget/optdata/optdata.csproj
+++ b/src/.nuget/optdata/optdata.csproj
@@ -3,7 +3,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
- <TargetFramework>netstandard</TargetFramework>
+ <TargetFramework>netstandard2.0</TargetFramework>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<RuntimeIdentifiers>win7-x64;win7-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
new file mode 100644
index 0000000000..afe45ab396
--- /dev/null
+++ b/src/Directory.Build.props
@@ -0,0 +1,9 @@
+<Project>
+ <Import Project="../Directory.Build.props" />
+
+ <!-- Properties that should be defined for all managed product assemblies -->
+ <PropertyGroup>
+ <Company>Microsoft Corporation</Company>
+ <Product>Microsoft%AE .NET Core</Product>
+ </PropertyGroup>
+</Project> \ No newline at end of file
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
new file mode 100644
index 0000000000..9758453686
--- /dev/null
+++ b/src/Directory.Build.targets
@@ -0,0 +1,20 @@
+<Project>
+ <Import Project="../Directory.Build.targets" />
+
+ <ItemGroup>
+ <BuiltBinary Include="$(TargetPath)" />
+ </ItemGroup>
+
+ <!-- Target used to consolidate all PDBs into a single location -->
+ <Target Name="MoveSymbolFiles"
+ AfterTargets="Build"
+ Condition="Exists(@(BuiltBinary -> '%(RootDir)%(Directory)%(Filename).pdb'))"
+ Inputs="@(BuiltBinary -> '%(RootDir)%(Directory)%(Filename).pdb')"
+ Outputs="@(BuiltBinary -> '$(BinDir)PDB/%(Filename).pdb')">
+
+ <Move SourceFiles="@(BuiltBinary -> '%(RootDir)%(Directory)%(Filename).pdb')"
+ DestinationFolder="$(BinDir)PDB" />
+
+ </Target>
+
+</Project> \ No newline at end of file
diff --git a/src/System.Private.CoreLib/Common/System/SR.cs b/src/System.Private.CoreLib/Common/System/SR.cs
index da03e59c17..4c04be45c5 100644
--- a/src/System.Private.CoreLib/Common/System/SR.cs
+++ b/src/System.Private.CoreLib/Common/System/SR.cs
@@ -14,12 +14,6 @@ namespace System
{
internal static partial class SR
{
- private static ResourceManager? ResourceManager
- {
- get;
- set;
- }
-
// This method is used to decide if we need to append the exception message parameters to the message when calling SR.Format.
// by default it returns false.
[MethodImpl(MethodImplOptions.NoInlining)]
@@ -121,10 +115,6 @@ namespace System
_currentlyLoading.Add(key); // Push
- if (ResourceManager == null)
- {
- ResourceManager = new ResourceManager(SR.ResourceType);
- }
string? s = ResourceManager.GetString(key, null);
_currentlyLoading.RemoveAt(_currentlyLoading.Count - 1); // Pop
@@ -136,7 +126,7 @@ namespace System
if (lockTaken)
{
// Backout code - throw away potentially corrupt state
- ResourceManager = null;
+ s_resourceManager = null;
_currentlyLoading = null;
}
throw;
diff --git a/src/System.Private.CoreLib/GenerateCompilerResponseFile.targets b/src/System.Private.CoreLib/GenerateCompilerResponseFile.targets
index ed9136ffc6..3801c76c0d 100644
--- a/src/System.Private.CoreLib/GenerateCompilerResponseFile.targets
+++ b/src/System.Private.CoreLib/GenerateCompilerResponseFile.targets
@@ -5,18 +5,22 @@
</PropertyGroup>
<Target Name="GenerateCompilerResponseFile">
- <Message Text="Generating module name response file: $(IntermediateOutputPath)\moduleName.$(AssemblyName).rsp" />
+ <PropertyGroup>
+ <GeneratedCompilerResponseFile>$(IntermediateOutputPath)/moduleName.$(AssemblyName).rsp</GeneratedCompilerResponseFile>
+ </PropertyGroup>
+
+ <Message Text="Generating module name response file: $(GeneratedCompilerResponseFile)" />
<!-- We need to set the runtimemetadataversion -->
- <WriteLinesToFile File="$(IntermediateOutputPath)\moduleName.$(AssemblyName).rsp"
+ <WriteLinesToFile File="$(GeneratedCompilerResponseFile)"
Lines="/runtimemetadataversion:v4.0.30319"
Overwrite="true" />
<ItemGroup>
- <Clean Include="$(IntermediateOutputPath)\moduleName.$(AssemblyName).rsp" />
+ <Clean Include="$(GeneratedCompilerResponseFile)" />
</ItemGroup>
<PropertyGroup>
- <CompilerResponseFile>$(IntermediateOutputPath)\moduleName.$(AssemblyName).rsp;$(CompilerResponseFile)</CompilerResponseFile>
+ <CompilerResponseFile>$(GeneratedCompilerResponseFile);$(CompilerResponseFile)</CompilerResponseFile>
</PropertyGroup>
</Target>
</Project> \ No newline at end of file
diff --git a/src/System.Private.CoreLib/ILLink.targets b/src/System.Private.CoreLib/ILLink.targets
index f33e2203ea..e5ede35f04 100644
--- a/src/System.Private.CoreLib/ILLink.targets
+++ b/src/System.Private.CoreLib/ILLink.targets
@@ -48,7 +48,7 @@
rewriting the assembly to an "output assembly"
-->
<UsingTask TaskName="ILLink" AssemblyFile="$(ILLinkTasksPath)" />
- <Target Name="ILLinkTrimAssembly" Condition="'$(ILLinkTrimAssembly)' == 'true'" DependsOnTargets="EnsureBuildToolsRuntime">
+ <Target Name="ILLinkTrimAssembly" Condition="'$(ILLinkTrimAssembly)' == 'true'">
<PropertyGroup>
<ILLinkArgs>$(ILLinkArgs)-r $(TargetName)</ILLinkArgs>
<!-- default action for core assemblies -->
diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
index f1b8b6f24c..9bc07880fa 100644
--- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj
+++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj
@@ -1,16 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <!-- Include common build properties -->
+<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <!-- Compilation options -->
+
+ <!-- Generate rsp -->
+ <Import Project="GenerateCompilerResponseFile.targets" />
+
+ <Target Name="GenerateTheRSPFile" BeforeTargets="CoreCompile" DependsOnTargets="GenerateCompilerResponseFile">
+ </Target>
+
+ <PropertyGroup>
+ <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
+ <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
+ <GenerateResxSourceOmitGetResourceString>true</GenerateResxSourceOmitGetResourceString>
+ <GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
+ <EnsureRuntimePackageDependencies>false</EnsureRuntimePackageDependencies>
+
+ <OutputType>Library</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+
+ <!-- Ensure a portable PDB is emitted for the project. A PDB is needed for crossgen. -->
+ <DebugType>Portable</DebugType>
+ <DebugSymbols>true</DebugSymbols>
+
+ <!-- Force System.Private.CoreLib.dll into a special IL output directory -->
+ <OutputPath>$(BinDir)IL/</OutputPath>
+ </PropertyGroup>
+
+ <!-- Note that various places in SPCL depend on this resource name i.e. TplEventSource -->
+ <ItemGroup Label="Embedded Resources">
+ <EmbeddedResource Update="$(MSBuildThisFileDirectory)Resources\Strings.resx">
+ <GenerateSource>true</GenerateSource>
+ <ClassName>System.SR</ClassName>
+ </EmbeddedResource>
+ </ItemGroup>
+
<PropertyGroup>
<AvailablePlatforms>x64,x86,arm,armel,arm64</AvailablePlatforms>
<Configuration Condition=" '$(Configuration)' == '' ">$(BuildType)</Configuration>
<Platform Condition=" '$(Platform)' == '' ">$(BuildArch)</Platform>
<Platform Condition=" '$(Platform)' == 'armel' ">arm</Platform>
<ProjectGuid>{3DA06C3A-2E7B-4CB7-80ED-9B12916013F9}</ProjectGuid>
- <OutputType>Library</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- This prevents the default MsBuild targets from referencing System.Core.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
@@ -19,19 +48,18 @@
<NoStdLib>true</NoStdLib>
<NoCompilerStandardLib>true</NoCompilerStandardLib>
<SubsystemVersion>6.00</SubsystemVersion>
- <UTF8OutPut>true</UTF8OutPut>
+ <Utf8Output>true</Utf8Output>
<HighEntropyVA>true</HighEntropyVA>
<ErrorReport>prompt</ErrorReport>
- <CLSCompliant>true</CLSCompliant>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- <!-- Remove BCL0020 once https://github.com/dotnet/arcade/pull/2158 is available
- Remove CS8608 once https://github.com/dotnet/roslyn/issues/23268 is resolved -->
- <NoWarn>649,1573,1591,0419,BCL0020,CS8609</NoWarn>
- <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
- <SignAssembly>true</SignAssembly>
- <DelaySign>true</DelaySign>
- <DefineConstants>$(DefineConstants);CORECLR;netcoreapp</DefineConstants>
+ <!-- Remove CS8608 once https://github.com/dotnet/roslyn/issues/23268 is resolved -->
+ <NoWarn>649,1573,1591,0419,3021,CS8609</NoWarn>
+
+ <!-- Ignore all previous constants since SPCL is sensitive to what is defined and the Sdk adds some by default -->
+ <DefineConstants>CORECLR;netcoreapp</DefineConstants>
+ <DisableImplicitConfigurationDefines>true</DisableImplicitConfigurationDefines>
+
<!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
<_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
@@ -40,25 +68,6 @@
<DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
</PropertyGroup>
- <!-- Approximate Arcade version string https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Versioning.md -->
- <!-- This workaround should be removed once CoreCLR repo is updated to use Arcade -->
- <PropertyGroup>
- <InformationalVersion>$(VersionPrefix)</InformationalVersion>
- </PropertyGroup>
- <PropertyGroup Condition="'$(PreReleaseLabel)' != ''">
- <InformationalVersion>$(InformationalVersion)-$(PreReleaseLabel).$(BuildNumberMajor).$(BuildNumberMinor)</InformationalVersion>
- </PropertyGroup>
- <PropertyGroup Condition="'$(LatestCommit)' != ''">
- <InformationalVersion>$(InformationalVersion)+$(LatestCommit)</InformationalVersion>
- </PropertyGroup>
-
- <!-- Add Serviceable attribute to the project's metadata -->
- <ItemGroup>
- <AssemblyMetadata Include="Serviceable">
- <Value>True</Value>
- <Visible>false</Visible>
- </AssemblyMetadata>
- </ItemGroup>
<!-- Platform specific properties -->
<PropertyGroup Condition="'$(Platform)' == 'x64'">
<PlatformTarget>x64</PlatformTarget>
@@ -77,27 +86,32 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DefineConstants>BIT64;ARM64;$(DefineConstants)</DefineConstants>
</PropertyGroup>
+
<!-- Configuration specific properties -->
<PropertyGroup Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'">
- <DebugSymbols>true</DebugSymbols>
<Optimize Condition="'$(Optimize)' == '' and '$(Configuration)' == 'Debug'">false</Optimize>
<Optimize Condition="'$(Optimize)' == '' and '$(Configuration)' == 'Checked'">true</Optimize>
- <DebugType Condition="'$(DebugType)' == ''">full</DebugType>
<DefineConstants>_LOGGING;DEBUG;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(Platform)' == 'x86' or '$(Platform)' == 'x64'">CODE_ANALYSIS;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
- <DebugSymbols>true</DebugSymbols>
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
</PropertyGroup>
+
<!-- Assembly attributes -->
<PropertyGroup>
<AssemblyName>System.Private.CoreLib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
- <MajorVersion>4</MajorVersion>
- <MinorVersion>6</MinorVersion>
<ExcludeAssemblyInfoPartialFile>true</ExcludeAssemblyInfoPartialFile>
+ <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
+ </PropertyGroup>
+
+ <!-- Signing -->
+ <PropertyGroup>
+ <SignAssembly>true</SignAssembly>
+ <StrongNameKeyId>SilverlightPlatform</StrongNameKeyId>
</PropertyGroup>
+
<!--
Helper Paths
-->
@@ -105,19 +119,17 @@
<CommonPath>$(MSBuildThisFileDirectory)Common</CommonPath>
<BclSourcesRoot>$(MSBuildThisFileDirectory)src</BclSourcesRoot>
</PropertyGroup>
+
<!-- Msbuild variables needed to get CoreCLR features to be set properly. -->
<PropertyGroup>
<!-- These are needed to make sure we have the right set of defines -->
<TargetArch Condition="'$(Platform)'=='x86'">i386</TargetArch>
<TargetArch Condition="'$(Platform)'!='x86'">$(Platform)</TargetArch>
</PropertyGroup>
- <!-- CLR Features -->
- <Import Project="$(MSBuildThisFileDirectory)..\..\clr.coreclr.props" />
- <Import Project="$(MSBuildThisFileDirectory)..\..\clr.defines.targets" />
- <!-- Experimental features -->
- <PropertyGroup Condition="'$(FeatureUtf8String)' == 'true'">
- <DefineConstants>$(DefineConstants);FEATURE_UTF8STRING</DefineConstants>
- </PropertyGroup>
+
+ <!-- Compilation options -->
+ <Import Project="../../clr.featuredefines.props" />
+
<!-- Sources -->
<ItemGroup>
<Compile Include="$(BclSourcesRoot)\Internal\Console.cs" />
@@ -287,7 +299,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\XplatEventLogger.cs" Condition="'$(FeatureXplatEventSource)' == 'true'" />
- <Compile Include="$(IntermediateOutputPath)..\Eventing\NativeRuntimeEventSource.cs" Condition="'$(FeaturePerfTracing)' == 'true'"/>
+ <Compile Include="$(IntermediateOutputPath)../Eventing/NativeRuntimeEventSource.cs" Condition="'$(FeaturePerfTracing)' == 'true'"/>
</ItemGroup>
<ItemGroup Condition="'$(FeatureCominterop)' == 'true'">
<Compile Include="$(BclSourcesRoot)\Internal\Runtime\InteropServices\WindowsRuntime\ExceptionSupport.cs" />
@@ -413,9 +425,9 @@
<Target Name="CDefineChecker" BeforeTargets="Build" Condition="'$(CheckCDefines)'=='true'">
<!-- Compiler Definition Verification -->
<PropertyGroup>
- <CMakeDefinitionSaveFile>$(IntermediateOutputPath)..\cmake.definitions</CMakeDefinitionSaveFile>
+ <CMakeDefinitionSaveFile>$(IntermediateOutputPath)\cmake.definitions</CMakeDefinitionSaveFile>
</PropertyGroup>
- <Exec Command="&quot;$(PYTHON)&quot; $(MSBuildThisFileDirectory)..\scripts\check-definitions.py &quot;$(CMakeDefinitionSaveFile)&quot; &quot;$(DefineConstants)&quot; &quot;$(IgnoreDefineConstants)&quot; " />
+ <Exec Command="&quot;$(PYTHON)&quot; $(MSBuildThisFileDirectory)..\scripts\check-definitions.py &quot;$(ProjectDir.TrimEnd('\'))&quot; &quot;$(CMakeDefinitionSaveFile)&quot; &quot;$(DefineConstants)&quot; &quot;$(IgnoreDefineConstants)&quot; " />
</Target>
<PropertyGroup Condition="'$(BuildOS)' == 'Windows_NT'">
<EnableDotnetAnalyzers Condition="'$(EnableDotnetAnalyzers)'==''">true</EnableDotnetAnalyzers>
@@ -425,28 +437,29 @@
<PropertyGroup>
<FeatureAsyncCausalityTracer Condition="'$(FeatureCominterop)' == 'true'">true</FeatureAsyncCausalityTracer>
</PropertyGroup>
+
+ <!-- Globals used by ILLink.targets -->
<PropertyGroup>
- <StrongNameSig>Silverlight</StrongNameSig>
+ <TargetName>$(MSBuildProjectName)</TargetName>
+ <TargetExt>.dll</TargetExt>
</PropertyGroup>
+
+ <!-- Setup ILLink.targets -->
<ItemGroup>
- <AssemblyInfoLines Include="[assembly:System.Runtime.InteropServices.ComVisible(false)]" />
- <AssemblyInfoLines Include="[assembly:System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute(System.Runtime.InteropServices.DllImportSearchPath.AssemblyDirectory | System.Runtime.InteropServices.DllImportSearchPath.System32)]" />
+ <PackageReference Include="$(ILLinkTasksPackage)">
+ <Version>$(ILLinkTasksPackageVersion)</Version>
+ </PackageReference>
</ItemGroup>
- <!--
- Import common targets: codeAnalysis, Microsoft.CSharp, sign, versioning, codeOptimizations, etc.
- In doing so, override versioning targets.
- -->
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
- <PropertyGroup>
- <!-- Overwrite the key that we are going to use for signing -->
- <AssemblyOriginatorKeyFile>$(ToolsDir)SilverlightPlatformPublicKey.snk</AssemblyOriginatorKeyFile>
- <!-- Don't need a strong name signature because we only ship the native image -->
- <StrongNameSig>None</StrongNameSig>
- </PropertyGroup>
+
<Import Project="CreateRuntimeRootILLinkDescriptorFile.targets" />
+
+ <Target Name="CreateRuntimeRootIlLinkDescFile" BeforeTargets="CoreCompile" DependsOnTargets="_CreateILLinkRuntimeRootDescriptorFile">
+ </Target>
+
<ItemGroup>
- <EmbeddedResource Include="$(_ILLinkRuntimeRootDescriptorFilePath)" />
+ <EmbeddedResource Include="$(_ILLinkRuntimeRootDescriptorFilePath)">
+ <LogicalName>$(MSBuildProjectName).xml</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<Import Project="ILLink.targets" />
- <Import Project="GenerateCompilerResponseFile.targets" />
</Project>
diff --git a/src/System.Private.CoreLib/shared/System/Threading/Tasks/TplEventSource.cs b/src/System.Private.CoreLib/shared/System/Threading/Tasks/TplEventSource.cs
index 184cc32890..44e5d0ad11 100644
--- a/src/System.Private.CoreLib/shared/System/Threading/Tasks/TplEventSource.cs
+++ b/src/System.Private.CoreLib/shared/System/Threading/Tasks/TplEventSource.cs
@@ -14,7 +14,7 @@ namespace System.Threading.Tasks
Name = "System.Threading.Tasks.TplEventSource",
Guid = "2e5dba47-a3d2-4d16-8ee0-6671ffdcd7b5"
#if CORECLR
- ,LocalizationResources = "FxResources.System.Private.CoreLib.SR"
+ ,LocalizationResources = "System.Private.CoreLib.Resources.Strings"
#endif
)]
internal sealed class TplEventSource : EventSource
diff --git a/src/System.Private.CoreLib/src/System/Internal.cs b/src/System.Private.CoreLib/src/System/Internal.cs
index 534969a3c8..b6181b8d30 100644
--- a/src/System.Private.CoreLib/src/System/Internal.cs
+++ b/src/System.Private.CoreLib/src/System/Internal.cs
@@ -13,10 +13,11 @@
===========================================================*/
#nullable disable // Code in this file isn't actually executed
-using System.Runtime.InteropServices;
-using System.Runtime.CompilerServices;
+using System;
using System.Collections.Generic;
using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
using System.Security;
using System.StubHelpers;
using System.Threading.Tasks;
@@ -25,9 +26,12 @@ using System.Threading.Tasks;
using System.Runtime.InteropServices.WindowsRuntime;
#endif // FEATURE_COMINTEROP
-[assembly: DefaultDependencyAttribute(LoadHint.Always)]
-// mscorlib would like to have its literal strings frozen if possible
-[assembly: System.Runtime.CompilerServices.StringFreezingAttribute()]
+[assembly: CLSCompliant(true)]
+[assembly: ComVisible(false)]
+[assembly: DefaultDllImportSearchPathsAttribute(DllImportSearchPath.AssemblyDirectory | DllImportSearchPath.System32)]
+
+// Add Serviceable attribute to the assembly metadata
+[assembly: AssemblyMetadata("Serviceable", "True")]
namespace System
{
diff --git a/src/ToolBox/SOS/NETCore/SOS.NETCore.csproj b/src/ToolBox/SOS/NETCore/SOS.NETCore.csproj
index 7cff9d7b6f..5e888a2c9f 100644
--- a/src/ToolBox/SOS/NETCore/SOS.NETCore.csproj
+++ b/src/ToolBox/SOS/NETCore/SOS.NETCore.csproj
@@ -1,80 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project Sdk="Microsoft.NET.Sdk">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>SOS.NETCore</AssemblyName>
- <AssemblyVersion>1.0.0.0</AssemblyVersion>
- <ProjectGuid>{20513BA2-A156-4A17-4C70-5AC2DBD4F833}</ProjectGuid>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <OutputType>Library</OutputType>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <NoStdLib>true</NoStdLib>
- <NoCompilerStandardLib>true</NoCompilerStandardLib>
- <IsDotNetFrameworkProductAssembly>true</IsDotNetFrameworkProductAssembly>
- <AssemblyKey>Open</AssemblyKey>
- <ExcludeMscorlibFacade>true</ExcludeMscorlibFacade>
- <ContainsPackageReferences>true</ContainsPackageReferences>
-
- <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two properties to any folder that exists to skip
- the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
- <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
- <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
- </PropertyGroup>
-
- <!-- Default configurations to help VS understand the options -->
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
-
- <!-- Configuration specific properties -->
- <PropertyGroup Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'">
- <DebugSymbols>true</DebugSymbols>
- <DefineConstants>_DEBUG;DEBUG;TRACE;$(DefineConstants)</DefineConstants>
- </PropertyGroup>
-
- <PropertyGroup>
- <DebugType>portable</DebugType>
- </PropertyGroup>
-
- <ItemGroup>
- <Compile Include="SymbolReader.cs" />
- </ItemGroup>
-
- <PropertyGroup>
- <TargetFramework>netcoreapp1.0</TargetFramework>
- <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
- <PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8</PackageTargetFallback>
+ <NoWarn>;1591;1701</NoWarn>
+ <Description>.NET Core SOS</Description>
+ <OutputPath>$(BinDir)</OutputPath>
+ <EnsureRuntimePackageDependencies>false</EnsureRuntimePackageDependencies>
</PropertyGroup>
<ItemGroup>
- <PackageReference Include="System.IO.FileSystem">
- <Version>4.3.0</Version>
- </PackageReference>
- <PackageReference Include="System.Runtime.InteropServices">
- <Version>4.3.0</Version>
- </PackageReference>
- <PackageReference Include="System.Reflection.Metadata">
- <Version>1.4.1</Version>
- </PackageReference>
+ <PackageReference Include="System.Reflection.Metadata" Version="$(SystemReflectionMetadataVersion)" />
</ItemGroup>
-
- <Target Name="CopyItemsToDirectory" AfterTargets="Build">
- <Copy
- SourceFiles="$(OutputPath)$(AssemblyName).dll"
- DestinationFolder="$(BinDir)"
- SkipUnchangedFiles="false"
- OverwriteReadOnlyFiles="false"
- UseHardlinksIfPossible="false">
- </Copy>
-
- <Copy
- SourceFiles="$(OutputPath)$(AssemblyName).pdb"
- DestinationFolder="$(BinDir)\PDB"
- SkipUnchangedFiles="false"
- OverwriteReadOnlyFiles="false"
- UseHardlinksIfPossible="false">
- </Copy>
- </Target>
-
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
diff --git a/src/build.proj b/src/build.proj
index b7d0e8b797..c4e9d4d011 100644
--- a/src/build.proj
+++ b/src/build.proj
@@ -1,54 +1,30 @@
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\dir.props"/>
+<Project Sdk="Microsoft.Build.Traversal">
+
+ <!-- List the projects that need to be restored only -->
+ <ItemGroup Condition="'$(IncludeRestoreOnlyProjects)' == 'true'">
+ <ProjectReference Condition="'$(BuildType)'=='Release'" Include="$(SourceDir).nuget/optdata/optdata.csproj" />
+ <ProjectReference Include="$(SourceDir).nuget/init/init.csproj" />
+ </ItemGroup>
<!-- List the projects that need to be built -->
<ItemGroup>
- <Project Condition="$(SkipSOS) != 'true'" Include="ToolBox\SOS\NETCore\SOS.NETCore.csproj" />
- <Project Include="System.Private.CoreLib\System.Private.CoreLib.csproj" />
+ <ProjectReference Condition="'$(SkipSOS)' != 'true'" Include="ToolBox\SOS\NETCore\SOS.NETCore.csproj" />
+ <ProjectReference Condition="'$(BuildManagedTools)' == 'true'" Include="tools/r2rdump/R2RDump.csproj" />
+ <ProjectReference Include="System.Private.CoreLib\System.Private.CoreLib.csproj" />
</ItemGroup>
- <Import Project="..\dir.targets" />
-
- <Import Project="..\dir.traversal.targets" />
-
- <Target Name="MovePostBuildBinaries" AfterTargets="Build">
- <Move SourceFiles="@(BinariesToMove)"
- DestinationFolder="$(BinDir)" />
- </Target>
+ <!-- [ARCADE_REMOVE] The below targets should be removed entirely when all projects become SDK
+ projects. These should not be in this project file, but in a separate targets file for post-build.
+ -->
+ <Import Project="../dir.props" />
- <ItemGroup>
- <ILToCopy Include="$(BinDir)System.Private.CoreLib.dll"/>
- <PDBSToMove Include="$(BinDir)System.Private.CoreLib.pdb"/>
- </ItemGroup>
-
- <PropertyGroup>
- <CoreLibPath>$(BinDir)System.Private.CoreLib.dll</CoreLibPath>
- <CoreLibPDBPath>$(BinDir)System.Private.CoreLib.pdb</CoreLibPDBPath>
- </PropertyGroup>
-
- <Target Name="BuildR2RDumpPackages" Condition="'$(DotNetBuildFromSource)' != 'true' AND '$(BuildManagedTools)' == 'true'" BeforeTargets="Build">
- <Exec Command="$(DotnetToolCommand) build /p:__BuildArch=$(BuildArch) /p:__BuildOS=$(BuildOS) /p:__BuildType=$(BuildType) tools/r2rdump/R2RDump.csproj"
- StandardOutputImportance="Low" />
- </Target>
-
- <Target Name="CopyCoreLib" AfterTargets="Build">
- <Copy Condition="Exists($(CoreLibPath))"
- SourceFiles="@(ILToCopy)"
- DestinationFolder="$(BinDir)IL" />
- </Target>
-
- <Target Name="MovePDB" AfterTargets="Build">
- <Move Condition="Exists($(CoreLibPDBPath))"
- SourceFiles="@(PDBSToMove)"
- DestinationFolder="$(BinDir)PDB" />
- </Target>
-
- <ItemGroup>
- <UcrtFilesToCopy Include="$(UniversalCRTSDKDir)Redist\ucrt\DLLs\$(BuildArch)\*.dll" />
- </ItemGroup>
<!-- Copy the UCRT files from the windows kit directory to the local directory.
The api-*xstate.dll binary needs to be signed. -->
<Target Name="CopyUcrtFiles" AfterTargets="Build">
+ <ItemGroup>
+ <UcrtFilesToCopy Include="$(UniversalCRTSDKDir)Redist\ucrt\DLLs\$(BuildArch)\*.dll" />
+ </ItemGroup>
+
<Copy Condition="'$(BuildType)'=='Release' AND '$(BuildArch)' != 'arm64'"
SourceFiles="@(UcrtFilesToCopy)"
DestinationFolder="$(BinDir)Redist\ucrt\DLLs\$(BuildArch)" />
@@ -66,6 +42,6 @@
</ItemGroup>
<Message Text="Checking if the following DLLs are properly compiled with PGO" Importance="High" />
- <Exec Command="python $(MSBuildThisFileDirectory)scripts\pgocheck.py @(PGOEnforcedFiles)" />
+ <Exec Command="&quot;$(PYTHON)&quot; $(MSBuildThisFileDirectory)scripts\pgocheck.py @(PGOEnforcedFiles)" />
</Target>
</Project>
diff --git a/src/scripts/check-definitions.py b/src/scripts/check-definitions.py
index 4f1026d4ef..24e75b4ddb 100644
--- a/src/scripts/check-definitions.py
+++ b/src/scripts/check-definitions.py
@@ -27,6 +27,7 @@ from __future__ import print_function
import sys
import re
+import os
debug = 0
@@ -130,32 +131,33 @@ def printPotentiallyCritical(arrDefinitions, referencedFilename, arrIgnore):
# MAIN SCRIPT
if len(sys.argv) < 3:
print("\nUsage:")
- print("$ check-definitions.py [Definition file] [String of definitions]")
+ print("$ check-definitions.py [ProjectDir] [Definition file] [String of definitions]")
print(" Definition file contains the list of cmake (native) compiler definitions")
print(" seperated by line.")
print(" String of definitions contains the list of csproj (managed) definitions")
print(" seperated by semicolons.")
sys.exit(-1)
-filename = sys.argv[1]
-string = sys.argv[2]
+projectDir = sys.argv[1]
+filename = sys.argv[2]
+string = sys.argv[3]
arrayNative = loadDefinitionFile(filename)
arrayManaged = loadDefinitionString(string)
arrayIgnore = []
-if len(sys.argv) > 3:
- arrayIgnore = loadDefinitionString(sys.argv[3])
+if len(sys.argv) > 4:
+ arrayIgnore = loadDefinitionString(sys.argv[4])
arrays = getDiff(arrayNative, arrayManaged)
# arrays[0] = array of added in managed
# arrays[1] = array of omitted in managed (added in native)
print("Potentially Dangerous Compiler Definitions in clrdefinitions.cmake (omitted in native build):")
-printPotentiallyCritical(arrays[0], "../../clrdefinitions.cmake", arrayIgnore)
+printPotentiallyCritical(arrays[0], os.path.join(projectDir, "clrdefinitions.cmake"), arrayIgnore)
-print("Potentially Dangerous Compiler Definitions in clr.defines.targets (omitted in managed build):")
-printPotentiallyCritical(arrays[1], "../../clr.defines.targets", arrayIgnore)
+print("Potentially Dangerous Compiler Definitions in clr.featuredefines.props (omitted in managed build):")
+printPotentiallyCritical(arrays[1], os.path.join(projectDir, "clr.featuredefines.props"), arrayIgnore)
print("Definition Check Completed.")
diff --git a/src/tools/r2rdump/R2RDump.csproj b/src/tools/r2rdump/R2RDump.csproj
index 026e4a5ee9..18c2cadb8d 100644
--- a/src/tools/r2rdump/R2RDump.csproj
+++ b/src/tools/r2rdump/R2RDump.csproj
@@ -1,5 +1,5 @@
-<Project Sdk="Microsoft.NET.Sdk" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+<Project Sdk="Microsoft.NET.Sdk">
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<AssemblyName>R2RDump</AssemblyName>
@@ -17,7 +17,6 @@
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
</PropertyGroup>
-
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.CoreDisTools">
<Version>1.0.1-prerelease-00005</Version>
@@ -29,6 +28,4 @@
<Version>1.6.0</Version>
</PackageReference>
</ItemGroup>
-
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
diff --git a/tests/scripts/optdata/optdata.csproj b/tests/scripts/optdata/optdata.csproj
index 2a9626e899..ce332bcbad 100644
--- a/tests/scripts/optdata/optdata.csproj
+++ b/tests/scripts/optdata/optdata.csproj
@@ -3,7 +3,7 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
- <TargetFramework>netstandard</TargetFramework>
+ <TargetFramework>netstandard2.0</TargetFramework>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<RuntimeIdentifiers>win7-x64;win7-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
diff --git a/tests/src/dir.targets b/tests/src/dir.targets
index ac803eee68..2dfd91436b 100644
--- a/tests/src/dir.targets
+++ b/tests/src/dir.targets
@@ -236,7 +236,6 @@
<ProjectAssetsFile></ProjectAssetsFile>
</PropertyGroup>
- <Import Project="../../clr.coreclr.props" />
- <Import Project="../../clr.defines.targets" />
+ <Import Project="../../clr.featuredefines.props" />
</Project>