System.Private.CoreLib.csproj 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project Sdk="Microsoft.NET.Sdk">
  3. <PropertyGroup>
  4. <EnableDefaultItems>false</EnableDefaultItems>
  5. <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
  6. <GenerateResxSourceOmitGetResourceString>true</GenerateResxSourceOmitGetResourceString>
  7. <GenerateNeutralResourcesLanguageAttribute>false</GenerateNeutralResourcesLanguageAttribute>
  8. <EnsureRuntimePackageDependencies>false</EnsureRuntimePackageDependencies>
  9. <EnableSourceControlManagerQueries>false</EnableSourceControlManagerQueries>
  10. <OutputType>Library</OutputType>
  11. <TargetFramework>netcoreapp2.1</TargetFramework>
  12. <!-- Ensure a portable PDB is emitted for the project. A PDB is needed for crossgen. -->
  13. <DebugType>Portable</DebugType>
  14. <DebugSymbols>true</DebugSymbols>
  15. <Configurations>Debug;Release;Checked</Configurations>
  16. <Configuration>Release</Configuration>
  17. <Platforms>x64;x86;arm;arm64;wasm32</Platforms>
  18. <Features>strict;nullablePublicOnly</Features>
  19. </PropertyGroup>
  20. <PropertyGroup Condition="'$(TargetsUnix)'=='' AND '$(TargetsOSX)'=='' AND '$(TargetsWindows)'==''">
  21. <TargetsUnix>true</TargetsUnix>
  22. <TargetsOSX>true</TargetsOSX>
  23. <TargetsWindows>false</TargetsWindows>
  24. <BuildArch>x64</BuildArch>
  25. <OutputPath>bin/x64</OutputPath>
  26. </PropertyGroup>
  27. <!-- Compilation options -->
  28. <PropertyGroup>
  29. <Configuration Condition=" '$(BuildType)' != '' ">$(BuildType)</Configuration>
  30. <Platform Condition=" '$(BuildArch)' != '' ">$(BuildArch)</Platform>
  31. <Platform Condition=" '$(Platform)' == 'armel' ">arm</Platform>
  32. <ProjectGuid>{DD18B4BA-3B49-437B-9E34-41EF8A640CE0}</ProjectGuid>
  33. <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  34. <!-- This prevents the default MsBuild targets from referencing System.Core.dll -->
  35. <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
  36. <!-- These prevent the default MsBuild targets from referencing System.dll and mscorlib.dll -->
  37. <ExcludeMscorlibFacade>true</ExcludeMscorlibFacade>
  38. <NoStdLib>true</NoStdLib>
  39. <NoCompilerStandardLib>true</NoCompilerStandardLib>
  40. <SubsystemVersion>6.00</SubsystemVersion>
  41. <Utf8Output>true</Utf8Output>
  42. <HighEntropyVA>true</HighEntropyVA>
  43. <ErrorReport>prompt</ErrorReport>
  44. <WarningLevel>4</WarningLevel>
  45. <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
  46. <NoWarn>$(NoWarn),0419,0649,1573,1591,3021,CA2002</NoWarn>
  47. <Nullable>enable</Nullable>
  48. <!-- Ignore all previous constants since SPCL is sensitive to what is defined and the Sdk adds some by default -->
  49. <DefineConstants>$(DefineConstants);netcoreapp</DefineConstants>
  50. <DisableImplicitConfigurationDefines>true</DisableImplicitConfigurationDefines>
  51. <!-- 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
  52. the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
  53. <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
  54. <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
  55. <SkipCommonResourcesIncludes>true</SkipCommonResourcesIncludes>
  56. <DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
  57. </PropertyGroup>
  58. <!-- Platform specific properties -->
  59. <PropertyGroup Condition="'$(Platform)' == 'x64'">
  60. <PlatformTarget>x64</PlatformTarget>
  61. <Prefer32Bit>false</Prefer32Bit>
  62. <DefineConstants>BIT64;AMD64;$(DefineConstants)</DefineConstants>
  63. </PropertyGroup>
  64. <PropertyGroup Condition="'$(Platform)' == 'x86'">
  65. <PlatformTarget>x86</PlatformTarget>
  66. <DefineConstants>BIT32;$(DefineConstants)</DefineConstants>
  67. </PropertyGroup>
  68. <PropertyGroup Condition="'$(Platform)' == 'arm'">
  69. <PlatformTarget>arm</PlatformTarget>
  70. <DefineConstants>BIT32;ARM;$(DefineConstants)</DefineConstants>
  71. </PropertyGroup>
  72. <PropertyGroup Condition="'$(Platform)' == 'arm64'">
  73. <PlatformTarget>AnyCPU</PlatformTarget>
  74. <DefineConstants>BIT64;ARM64;$(DefineConstants)</DefineConstants>
  75. </PropertyGroup>
  76. <PropertyGroup Condition="'$(Platform)' == 'wasm32'">
  77. <PlatformTarget>AnyCPU</PlatformTarget>
  78. <DefineConstants>BIT32;$(DefineConstants)</DefineConstants>
  79. </PropertyGroup>
  80. <!-- Configuration specific properties -->
  81. <PropertyGroup Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'">
  82. <Optimize Condition="'$(Optimize)' == '' and '$(Configuration)' == 'Debug'">false</Optimize>
  83. <Optimize Condition="'$(Optimize)' == '' and '$(Configuration)' == 'Checked'">true</Optimize>
  84. <DefineConstants>_LOGGING;DEBUG;$(DefineConstants)</DefineConstants>
  85. <DefineConstants Condition="'$(Platform)' == 'x86' or '$(Platform)' == 'x64'">CODE_ANALYSIS;$(DefineConstants)</DefineConstants>
  86. </PropertyGroup>
  87. <PropertyGroup Condition="'$(Configuration)' == 'Release'">
  88. <Optimize Condition="'$(Optimize)' == ''">true</Optimize>
  89. </PropertyGroup>
  90. <PropertyGroup Condition="'$(TargetsOSX)' == 'true'">
  91. <DefineConstants>PLATFORM_OSX;$(DefineConstants)</DefineConstants>
  92. </PropertyGroup>
  93. <!-- Assembly attributes -->
  94. <PropertyGroup>
  95. <!-- SDK sets product to assembly but we want it to be our product name -->
  96. <Product>Microsoft%AE .NET Core</Product>
  97. <AssemblyName>System.Private.CoreLib</AssemblyName>
  98. <AssemblyVersion>5.0.0.0</AssemblyVersion>
  99. <ExcludeAssemblyInfoPartialFile>true</ExcludeAssemblyInfoPartialFile>
  100. <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
  101. <Description>$(AssemblyName)</Description>
  102. </PropertyGroup>
  103. <!-- Signing -->
  104. <PropertyGroup>
  105. <SignAssembly>true</SignAssembly>
  106. <StrongNameKeyId>SilverlightPlatform</StrongNameKeyId>
  107. </PropertyGroup>
  108. <!--
  109. Helper Paths
  110. -->
  111. <PropertyGroup>
  112. <CommonPath>$(MSBuildThisFileDirectory)Common</CommonPath>
  113. <BclSourcesRoot>$(MSBuildThisFileDirectory)src</BclSourcesRoot>
  114. <SharedBclSourcesRoot>$(MSBuildThisFileDirectory)shared</SharedBclSourcesRoot>
  115. </PropertyGroup>
  116. <!-- Mono specific build changes -->
  117. <PropertyGroup>
  118. <!-- Disable nullability-related warnings -->
  119. <NoWarn>$(NoWarn),CS8597,CS8600,CS8601,CS8602,CS8603,CS8604,CS8609,CS8611,CS8618,CS8620,CS8625,CS8631,CS8632,CS8634</NoWarn>
  120. <NoWarn>$(NoWarn),618,67</NoWarn>
  121. <DefineConstants>FEATURE_DEFAULT_INTERFACES;FEATURE_MANAGED_ETW_CHANNELS;$(DefineConstants)</DefineConstants>
  122. <DefineConstants>MONO;NETCORE;DISABLE_REMOTING;MONO_FEATURE_SRE;$(DefineConstants)</DefineConstants>
  123. <FeaturePortableTimer>true</FeaturePortableTimer>
  124. <FeaturePortableThreadPool>true</FeaturePortableThreadPool>
  125. <FeaturePerfTracing>true</FeaturePerfTracing>
  126. <RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
  127. </PropertyGroup>
  128. <!-- Sources -->
  129. <ItemGroup>
  130. <Compile Include="AssemblyInfo.cs" />
  131. <Compile Include="resources\SR.common.cs" />
  132. <Compile Include="resources\SR.cs" />
  133. </ItemGroup>
  134. <ItemGroup>
  135. <Compile Include="src\Microsoft\Win32\UnsafeNativeMethods.cs" />
  136. <Compile Include="src\Mono\MonoListItem.cs" />
  137. <Compile Include="src\Mono\MonoDomain.cs" />
  138. <Compile Include="src\Mono\MonoDomainSetup.cs" />
  139. <Compile Include="src\Mono\RuntimeHandles.cs" />
  140. <Compile Include="src\System\ArgIterator.cs" />
  141. <Compile Include="src\System\Array.Mono.cs" />
  142. <Compile Include="src\System\Attribute.Mono.cs" />
  143. <Compile Include="src\System\Buffer.Mono.cs" />
  144. <Compile Include="src\System\Delegate.Mono.cs" />
  145. <Compile Include="src\System\Enum.Mono.cs" />
  146. <Compile Include="src\System\Environment.Mono.cs" />
  147. <Compile Include="src\System\Exception.Mono.cs" />
  148. <Compile Include="src\System\GC.Mono.cs" />
  149. <Compile Include="src\System\Object.Mono.cs" />
  150. <Compile Include="src\System\Math.Mono.cs" />
  151. <Compile Include="src\System\MathF.Mono.cs" />
  152. <Compile Include="src\System\MissingMemberException.Mono.cs" />
  153. <Compile Include="src\System\ModuleHandle.cs" />
  154. <Compile Include="src\System\MulticastDelegate.cs" />
  155. <Compile Include="src\System\NotImplemented.cs" />
  156. <Compile Include="src\System\Nullable.Mono.cs" />
  157. <Compile Include="src\System\RuntimeArgumentHandle.cs" />
  158. <Compile Include="src\System\RuntimeFieldHandle.cs" />
  159. <Compile Include="src\System\RuntimeMethodHandle.cs" />
  160. <Compile Include="src\System\RuntimeType.Mono.cs" />
  161. <Compile Include="src\System\RuntimeTypeHandle.cs" />
  162. <Compile Include="src\System\String.Mono.cs" />
  163. <Compile Include="src\System\Type.Mono.cs" />
  164. <Compile Include="src\System\TypeIdentifier.cs" />
  165. <Compile Include="src\System\TypedReference.cs" />
  166. <Compile Include="src\System\TypeLoadException.Mono.cs" />
  167. <Compile Include="src\System\TypeNameParser.cs" />
  168. <Compile Include="src\System\ValueType.cs" />
  169. <Compile Include="src\System\WeakReference.Mono.cs" />
  170. <Compile Include="src\System\WeakReference.T.Mono.cs" />
  171. <Compile Include="src\System\__ComObject.cs" />
  172. <Compile Include="src\System\Globalization\GlobalizationMode.Mono.cs" />
  173. <Compile Include="src\System\Collections\Generic\ArraySortHelper.Mono.cs" />
  174. <Compile Include="src\System\Collections\Generic\Comparer.Mono.cs" />
  175. <Compile Include="src\System\Collections\Generic\EqualityComparer.Mono.cs" />
  176. <Compile Include="src\System\Diagnostics\Debugger.cs" />
  177. <Compile Include="src\System\Diagnostics\StackFrame.Mono.cs" />
  178. <Compile Include="src\System\Diagnostics\StackTrace.Mono.cs" />
  179. <Compile Include="src\System\IO\Stream.Mono.cs" />
  180. <Compile Include="src\System\IO\FileLoadException.Mono.cs" />
  181. <Compile Include="src\System\Reflection\Assembly.Mono.cs" />
  182. <Compile Include="src\System\Reflection\AssemblyName.Mono.cs" />
  183. <Compile Include="src\System\Reflection\CustomAttribute.cs" />
  184. <Compile Include="src\System\Reflection\CustomAttributeData.cs" />
  185. <Compile Include="src\System\Reflection\CustomAttributeTypedArgument.Mono.cs" />
  186. <Compile Include="src\System\Reflection\FieldInfo.Mono.cs" />
  187. <Compile Include="src\System\Reflection\MemberInfo.Mono.cs" />
  188. <Compile Include="src\System\Reflection\MethodBase.Mono.cs" />
  189. <Compile Include="src\System\Reflection\RuntimeAssembly.cs" />
  190. <Compile Include="src\System\Reflection\RuntimeEventInfo.cs" />
  191. <Compile Include="src\System\Reflection\RuntimeFieldInfo.cs" />
  192. <Compile Include="src\System\Reflection\RuntimeLocalVariableInfo.cs" />
  193. <Compile Include="src\System\Reflection\RuntimeMethodBody.cs" />
  194. <Compile Include="src\System\Reflection\RuntimeMethodInfo.cs" />
  195. <Compile Include="src\System\Reflection\RuntimeModule.cs" />
  196. <Compile Include="src\System\Reflection\RuntimeParameterInfo.cs" />
  197. <Compile Include="src\System\Reflection\RuntimePropertyInfo.cs" />
  198. <Compile Include="src\System\Reflection\RuntimeExceptionHandlingClause.cs" />
  199. <Compile Include="src\System\Reflection\Emit\AssemblyBuilder.Mono.cs" />
  200. <Compile Include="src\System\Reflection\Emit\ConstructorBuilder.Mono.cs" />
  201. <Compile Include="src\System\Reflection\Emit\ConstructorOnTypeBuilderInst.cs" />
  202. <Compile Include="src\System\Reflection\Emit\CustomAttributeBuilder.Mono.cs" />
  203. <Compile Include="src\System\Reflection\Emit\DerivedTypes.Mono.cs" />
  204. <Compile Include="src\System\Reflection\Emit\DynamicILInfo.cs" />
  205. <Compile Include="src\System\Reflection\Emit\DynamicMethod.cs" />
  206. <Compile Include="src\System\Reflection\Emit\DynamicMethod.notsupported.cs" />
  207. <Compile Include="src\System\Reflection\Emit\EnumBuilder.Mono.cs" />
  208. <Compile Include="src\System\Reflection\Emit\EventBuilder.Mono.cs" />
  209. <Compile Include="src\System\Reflection\Emit\EventOnTypeBuilderInst.cs" />
  210. <Compile Include="src\System\Reflection\Emit\FieldBuilder.Mono.cs" />
  211. <Compile Include="src\System\Reflection\Emit\FieldOnTypeBuilderInst.cs" />
  212. <Compile Include="src\System\Reflection\Emit\GenericTypeParameterBuilder.cs" />
  213. <Compile Include="src\System\Reflection\Emit\ILGenerator.Mono.cs" />
  214. <Compile Include="src\System\Reflection\Emit\LocalBuilder.Mono.cs" />
  215. <Compile Include="src\System\Reflection\Emit\MethodBuilder.Mono.cs" />
  216. <Compile Include="src\System\Reflection\Emit\MethodOnTypeBuilderInst.cs" />
  217. <Compile Include="src\System\Reflection\Emit\ModuleBuilder.Mono.cs" />
  218. <Compile Include="src\System\Reflection\Emit\MonoArrayMethod.cs" />
  219. <Compile Include="src\System\Reflection\Emit\ParameterBuilder.Mono.cs" />
  220. <Compile Include="src\System\Reflection\Emit\PropertyBuilder.Mono.cs" />
  221. <Compile Include="src\System\Reflection\Emit\PropertyOnTypeBuilderInst.cs" />
  222. <Compile Include="src\System\Reflection\Emit\SignatureHelper.cs" />
  223. <Compile Include="src\System\Reflection\Emit\TypeBuilder.Mono.cs" />
  224. <Compile Include="src\System\Reflection\Emit\TypeBuilderInstantiation.cs" />
  225. <Compile Include="src\System\Reflection\Emit\UnmanagedMarshal.cs" />
  226. <Compile Include="src\System\Reflection\Metadata\AssemblyExtensions.cs" />
  227. <Compile Include="src\System\Resources\ManifestBasedResourceGroveler.Mono.cs" />
  228. <Compile Include="src\System\Runtime\GCSettings.Mono.cs" />
  229. <Compile Include="src\System\Runtime\CompilerServices\DependentHandle.cs" />
  230. <Compile Include="src\System\Runtime\CompilerServices\JitHelpers.cs" />
  231. <Compile Include="src\System\Runtime\CompilerServices\RuntimeHelpers.Mono.cs" />
  232. <Compile Include="src\System\Runtime\CompilerServices\RuntimeFeature.Mono.cs" />
  233. <Compile Include="src\System\Runtime\InteropServices\CriticalHandle.Mono.cs" />
  234. <Compile Include="src\System\Runtime\InteropServices\GCHandle.Mono.cs" />
  235. <Compile Include="src\System\Runtime\InteropServices\Marshal.Mono.cs" />
  236. <Compile Include="src\System\Runtime\InteropServices\MarshalAsAttribute.Mono.cs" />
  237. <Compile Include="src\System\Runtime\InteropServices\NativeLibrary.Mono.cs" />
  238. <Compile Include="src\System\Runtime\InteropServices\SafeHandle.Mono.cs" />
  239. <Compile Include="src\System\Runtime\Loader\AssemblyLoadContext.Mono.cs" />
  240. <Compile Include="src\System\Runtime\Loader\AssemblyDependencyResolver.cs" />
  241. <Compile Include="src\System\Runtime\Remoting\Contexts\Context.cs" />
  242. <Compile Include="src\System\Security\DynamicSecurityMethodAttribute.cs" />
  243. <Compile Include="src\System\Threading\Interlocked.cs" />
  244. <Compile Include="src\System\Threading\Monitor.cs" />
  245. <Compile Include="src\System\Threading\Overlapped.cs" />
  246. <Compile Include="src\System\Threading\PreAllocatedOverlapped.cs" />
  247. <Compile Include="src\System\Threading\StackCrawlMark.cs" />
  248. <Compile Include="src\System\Threading\Thread.Mono.cs" />
  249. <Compile Include="src\System\Threading\ThreadPool.Mono.cs" />
  250. <Compile Include="src\System\Threading\LowLevelLock.cs" />
  251. <Compile Include="src\System\Threading\LowLevelSpinWaiter.cs" />
  252. <Compile Include="src\System\Threading\WaitHandle.Mono.cs" />
  253. </ItemGroup>
  254. <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
  255. <Compile Include="src\Microsoft\Win32\SafeHandles\SafeWaitHandle.Unix.Mono.cs" />
  256. <Compile Include="src\System\Environment.Unix.Mono.cs" />
  257. <Compile Include="src\System\Globalization\GlobalizationMode.Unix.Mono.cs" />
  258. <Compile Include="src\System\Threading\EventWaitHandle.Unix.Mono.cs" />
  259. <Compile Include="src\System\Threading\Mutex.Unix.Mono.cs" />
  260. <Compile Include="src\System\Threading\Semaphore.Unix.Mono.cs" />
  261. <Compile Include="src\System\Threading\LowLevelLifoSemaphore.Unix.Mono.cs" />
  262. <Compile Include="src\System\IO\MonoIOError.cs" />
  263. </ItemGroup>
  264. <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
  265. <Compile Include="src\System\Globalization\GlobalizationMode.Windows.Mono.cs" />
  266. </ItemGroup>
  267. <ItemGroup>
  268. <Compile Include="src\Mono\RuntimeStructs.cs" />
  269. <Compile Include="src\Mono\RuntimeMarshal.cs" />
  270. <Compile Include="src\Mono\SafeStringMarshal.cs" />
  271. <Compile Include="src\Mono\SafeGPtrArrayHandle.cs" />
  272. <Compile Include="src\System\TypeSpec.cs" />
  273. <Compile Include="src\System\Runtime\CompilerServices\PreserveDependencyAttribute.cs" />
  274. </ItemGroup>
  275. <Import Project="shared\System.Private.CoreLib.Shared.projitems" />
  276. <!-- Use Roslyn Compilers to build -->
  277. <Import Project="../roslyn/packages/microsoft.net.compilers.toolset/$(MicrosoftNetCompilersVersion)/build/Microsoft.Net.Compilers.Toolset.props" />
  278. <ItemGroup>
  279. <EmbeddedResource LogicalName="System.Private.CoreLib.xml" Include="src\LinkerDescriptor\System.Private.CoreLib.xml"/>
  280. </ItemGroup>
  281. </Project>