[System.Private.CoreLib] nullable warnings fixes
[mono-project.git] / mcs / class / System.Private.CoreLib / System.Private.CoreLib.csproj
blob6bf205fc8988a2e030c392249cbda8378b908b5c
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <!-- Include common build properties -->
4 <!-- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> -->
5 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
6 <!-- Default values -->
7 <PropertyGroup Condition="'$(TargetsUnix)'=='' AND '$(TargetsOSX)'=='' AND '$(TargetsWindows)'==''">
8 <TargetsUnix>true</TargetsUnix>
9 <TargetsOSX>true</TargetsOSX>
10 <TargetsWindows>false</TargetsWindows>
11 <BuildArch>x64</BuildArch>
12 <OutputPath>bin/x64</OutputPath>
13 </PropertyGroup>
14 <!-- Compilation options -->
15 <PropertyGroup>
16 <AvailablePlatforms>x64,x86,arm,armel,arm64</AvailablePlatforms>
17 <FeaturePortableTimer>true</FeaturePortableTimer>
18 <Configuration Condition=" '$(Configuration)' == '' ">$(BuildType)</Configuration>
19 <Platform Condition=" '$(Platform)' == '' ">$(BuildArch)</Platform>
20 <Platform Condition=" '$(Platform)' == 'armel' ">arm</Platform>
21 <ProjectGuid>{DD18B4BA-3B49-437B-9E34-41EF8A640CE0}</ProjectGuid>
22 <OutputType>Library</OutputType>
23 <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
24 <!-- This prevents the default MsBuild targets from referencing System.Core.dll -->
25 <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
26 <!-- These prevent the default MsBuild targets from referencing System.dll and mscorlib.dll -->
27 <ExcludeMscorlibFacade>true</ExcludeMscorlibFacade>
28 <NoStdLib>true</NoStdLib>
29 <NoCompilerStandardLib>true</NoCompilerStandardLib>
30 <SubsystemVersion>6.00</SubsystemVersion>
31 <UTF8OutPut>true</UTF8OutPut>
32 <HighEntropyVA>true</HighEntropyVA>
33 <ErrorReport>prompt</ErrorReport>
34 <CLSCompliant>true</CLSCompliant>
35 <WarningLevel>4</WarningLevel>
36 <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
37 <WarningsNotAsErrors>$(WarningsNotAsErrors);618</WarningsNotAsErrors>
38 <!-- Remove CS8608 once https://github.com/dotnet/roslyn/issues/23268 is resolved -->
39 <NoWarn>649,1573,1591,0419,3021,CS8609</NoWarn>
41 <!-- Disable nullability-related warnings -->
42 <NoWarn>$(NoWarn),CS8609,CS8611,CS8631,CS8632</NoWarn>
43 <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
44 <SignAssembly>true</SignAssembly>
45 <DelaySign>true</DelaySign>
46 <DefineConstants>$(DefineConstants);_USE_NLS_PLUS_TABLE;CODE_ANALYSIS_BASELINE;netcoreapp</DefineConstants>
47 <!-- 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
48 the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). -->
49 <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)/Documentation</_TargetFrameworkDirectories>
50 <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)/Documentation</_FullFrameworkReferenceAssemblyPaths>
51 <SkipCommonResourcesIncludes>true</SkipCommonResourcesIncludes>
52 <LangVersion>8.0</LangVersion>
53 <!--
54 <DocumentationFile>$(OutputPath)$(MSBuildProjectName).xml</DocumentationFile>
55 -->
56 </PropertyGroup>
57 <!-- Platform specific properties -->
58 <PropertyGroup Condition="'$(Platform)' == 'x64'">
59 <PlatformTarget>x64</PlatformTarget>
60 <Prefer32Bit>false</Prefer32Bit>
61 <BaseAddress>0x180000000</BaseAddress>
62 <DefineConstants>BIT64;AMD64;$(DefineConstants)</DefineConstants>
63 </PropertyGroup>
64 <PropertyGroup Condition="'$(Platform)' == 'x86'">
65 <PlatformTarget>x86</PlatformTarget>
66 <BaseAddress>0x10000000</BaseAddress>
67 <DefineConstants>BIT32;$(DefineConstants)</DefineConstants>
68 </PropertyGroup>
69 <PropertyGroup Condition="'$(Platform)' == 'arm'">
70 <PlatformTarget>arm</PlatformTarget>
71 <DefineConstants>BIT32;ARM;$(DefineConstants)</DefineConstants>
72 </PropertyGroup>
73 <PropertyGroup Condition="'$(Platform)' == 'arm64'">
74 <PlatformTarget>AnyCPU</PlatformTarget>
75 <DefineConstants>BIT64;ARM64;$(DefineConstants)</DefineConstants>
76 </PropertyGroup>
77 <!-- Configuration specific properties -->
78 <PropertyGroup Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'">
79 <DebugSymbols>true</DebugSymbols>
80 <Optimize Condition="'$(Optimize)' == '' and '$(Configuration)' == 'Debug'">false</Optimize>
81 <Optimize Condition="'$(Optimize)' == '' and '$(Configuration)' == 'Checked'">true</Optimize>
82 <DebugType Condition="'$(DebugType)' == ''">full</DebugType>
83 <DefineConstants>_LOGGING;DEBUG;TRACE;$(DefineConstants)</DefineConstants>
84 <DefineConstants Condition="'$(Platform)' == 'x86' or '$(Platform)' == 'x64'">CODE_ANALYSIS;$(DefineConstants)</DefineConstants>
85 </PropertyGroup>
86 <PropertyGroup Condition="'$(Configuration)' == 'Release'">
87 <DebugSymbols>true</DebugSymbols>
88 <Optimize Condition="'$(Optimize)' == ''">true</Optimize>
89 <DebugType Condition="'$(DebugType)' == ''">pdbOnly</DebugType>
90 <DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
91 </PropertyGroup>
92 <!-- Make portable PDBs on Unix -->
93 <PropertyGroup Condition="'$(OsEnvironment)' == 'Unix'">
94 <DebugType>portable</DebugType>
95 </PropertyGroup>
96 <PropertyGroup Condition="'$(TargetsOSX)' == 'true'">
97 <DefineConstants>PLATFORM_OSX;$(DefineConstants)</DefineConstants>
98 </PropertyGroup>
99 <!-- Assembly attributes -->
100 <PropertyGroup>
101 <AssemblyName>System.Private.CoreLib</AssemblyName>
102 <AssemblyVersion>4.0.0.0</AssemblyVersion>
103 <MajorVersion>4</MajorVersion>
104 <MinorVersion>6</MinorVersion>
105 <ExcludeAssemblyInfoPartialFile>true</ExcludeAssemblyInfoPartialFile>
106 </PropertyGroup>
107 <!--
108 Helper Paths
110 <PropertyGroup>
111 <CommonPath>$(MSBuildThisFileDirectory)Common</CommonPath>
112 <BclSourcesRoot>$(MSBuildThisFileDirectory)src</BclSourcesRoot>
113 <MscorlibDir>$(MSBuildThisFileDirectory)</MscorlibDir>
114 <NlpObjDir>$(BclSourcesRoot)\System\Globalization\Tables</NlpObjDir>
115 </PropertyGroup>
116 <!-- Sources -->
117 <ItemGroup>
118 <Compile Include="AssemblyInfo.cs" />
119 <Compile Include="Resources\SR.cs" />
120 </ItemGroup>
121 <ItemGroup>
122 <Compile Include="Microsoft.Win32\UnsafeNativeMethods.cs" />
123 <Compile Include="Mono\MonoDomain.cs" />
124 <Compile Include="Mono\MonoDomainSetup.cs" />
125 <Compile Include="Mono\MonoListItem.cs" />
126 <Compile Include="System\AppContext.cs" />
127 <Compile Include="System\Array.cs" />
128 <Compile Include="System\Attribute.cs" />
129 <Compile Include="System\Buffer.cs" />
130 <Compile Include="System\Delegate.cs" />
131 <Compile Include="System\Enum.cs" />
132 <Compile Include="System\Environment.cs" />
133 <Compile Include="System\Exception.cs" />
134 <Compile Include="System\GC.cs" />
135 <Compile Include="System\Object.cs" />
136 <Compile Include="System\Math.cs" />
137 <Compile Include="System\MathF.cs" />
138 <Compile Include="System\MissingMemberException.cs" />
139 <Compile Include="System\NotImplemented.cs" />
140 <Compile Include="System\Nullable.cs" />
141 <Compile Include="System\RuntimeType.cs" />
142 <Compile Include="System\String.cs" />
143 <Compile Include="System\Type.cs" />
144 <Compile Include="System\TypedReference.cs" />
145 <Compile Include="System\TypeLoadException.cs" />
146 <Compile Include="System\TypeNameParser.cs" />
147 <Compile Include="System\ValueType.cs" />
148 <Compile Include="System\__ComObject.cs" />
149 <Compile Include="System.Globalization\GlobalizationMode.cs" />
150 <Compile Include="System.Collections.Generic\ArraySortHelper.cs" />
151 <Compile Include="System.Collections.Generic\Comparer.cs" />
152 <Compile Include="System.Collections.Generic\EqualityComparer.cs" />
153 <Compile Include="System.Diagnostics\StackFrame.cs" />
154 <Compile Include="System.Diagnostics\StackTrace.cs" />
155 <Compile Include="System.IO\Stream.cs" />
156 <Compile Include="System.IO\FileLoadException.cs" />
157 <Compile Include="System.Reflection\Assembly.cs" />
158 <Compile Include="System.Reflection\AssemblyName.cs" />
159 <Compile Include="System.Reflection\CustomAttributeExtensions.cs" />
160 <Compile Include="System.Reflection\FieldInfo.cs" />
161 <Compile Include="System.Reflection\MemberInfo.cs" />
162 <Compile Include="System.Reflection\MethodBase.cs" />
163 <Compile Include="System.Reflection\RuntimeAssembly.cs" />
164 <Compile Include="System.Reflection\RuntimeMethodBody.cs" />
165 <Compile Include="System.Reflection\RuntimeLocalVariableInfo.cs" />
166 <Compile Include="System.Reflection\RuntimeExceptionHandlingClause.cs" />
167 <Compile Include="System.Reflection.Emit\AssemblyBuilder.cs" />
168 <Compile Include="System.Reflection.Emit\ConstructorBuilder.cs" />
169 <Compile Include="System.Reflection.Emit\ConstructorOnTypeBuilderInst.cs" />
170 <Compile Include="System.Reflection.Emit\CustomAttributeBuilder.cs" />
171 <Compile Include="System.Reflection.Emit\DerivedTypes.cs" />
172 <Compile Include="System.Reflection.Emit\DynamicILInfo.cs" />
173 <Compile Include="System.Reflection.Emit\DynamicMethod.cs" />
174 <Compile Include="System.Reflection.Emit\DynamicMethod.notsupported.cs" />
175 <Compile Include="System.Reflection.Emit\EnumBuilder.cs" />
176 <Compile Include="System.Reflection.Emit\EventBuilder.cs" />
177 <Compile Include="System.Reflection.Emit\EventOnTypeBuilderInst.cs" />
178 <Compile Include="System.Reflection.Emit\FieldBuilder.cs" />
179 <Compile Include="System.Reflection.Emit\FieldOnTypeBuilderInst.cs" />
180 <Compile Include="System.Reflection.Emit\GenericTypeParameterBuilder.cs" />
181 <Compile Include="System.Reflection.Emit\ILGenerator.cs" />
182 <Compile Include="System.Reflection.Emit\LocalBuilder.cs" />
183 <Compile Include="System.Reflection.Emit\MethodBuilder.cs" />
184 <Compile Include="System.Reflection.Emit\MethodOnTypeBuilderInst.cs" />
185 <Compile Include="System.Reflection.Emit\ModuleBuilder.cs" />
186 <Compile Include="System.Reflection.Emit\MonoArrayMethod.cs" />
187 <Compile Include="System.Reflection.Emit\ParameterBuilder.cs" />
188 <Compile Include="System.Reflection.Emit\PropertyBuilder.cs" />
189 <Compile Include="System.Reflection.Emit\PropertyOnTypeBuilderInst.cs" />
190 <Compile Include="System.Reflection.Emit\SignatureHelper.cs" />
191 <Compile Include="System.Reflection.Emit\TypeBuilder.cs" />
192 <Compile Include="System.Reflection.Emit\TypeBuilderInstantiation.cs" />
193 <Compile Include="System.Reflection.Emit\UnmanagedMarshal.cs" />
194 <Compile Include="System.Reflection.Metadata\AssemblyExtensions.cs" />
195 <Compile Include="System.Resources\ManifestBasedResourceGroveler.cs" />
196 <Compile Include="System.Runtime\GCSettings.cs" />
197 <Compile Include="System.Runtime\RuntimeImports.cs" />
198 <Compile Include="System.Runtime.CompilerServices\DependentHandle.cs" />
199 <Compile Include="System.Runtime.CompilerServices\RuntimeHelpers.cs" />
200 <Compile Include="System.Runtime.CompilerServices\RuntimeFeature.cs" />
201 <Compile Include="System.Runtime.InteropServices\CriticalHandle.cs" />
202 <Compile Include="System.Runtime.InteropServices\GCHandle.cs" />
203 <Compile Include="System.Runtime.InteropServices\InteropExtensions.cs" />
204 <Compile Include="System.Runtime.InteropServices\Marshal.cs" />
205 <Compile Include="System.Runtime.InteropServices\MarshalAsAttribute.cs" />
206 <Compile Include="System.Runtime.Loader\AssemblyLoadContext.cs" />
207 <Compile Include="System.Runtime.Loader\AssemblyDependencyResolver.cs" />
208 <Compile Include="System.Runtime.Remoting.Contexts\Context.cs" />
209 <Compile Include="System.Security\DynamicSecurityMethodAttribute.cs" />
210 <Compile Include="System.Threading\Interlocked.cs" />
211 <Compile Include="System.Threading\Monitor.cs" />
212 <Compile Include="System.Threading\Overlapped.cs" />
213 <Compile Include="System.Threading\PreAllocatedOverlapped.cs" />
214 <Compile Include="System.Threading\StackCrawlMark.cs" />
215 <Compile Include="System.Threading\Thread.cs" />
216 <Compile Include="System.Threading\ThreadPool.cs" />
217 <Compile Include="System.Threading\ThreadPoolBoundHandle.cs" />
218 <Compile Include="System.Threading\WaitHandle.cs" />
219 </ItemGroup>
220 <ItemGroup Condition="'$(TargetsUnix)' == 'true'">
221 <Compile Include="Microsoft.Win32.SafeHandles\SafeWaitHandle.Unix.cs" />
222 <Compile Include="System\Environment.Unix.cs" />
223 <Compile Include="System.Globalization\GlobalizationMode.Unix.cs" />
224 <Compile Include="System.Threading\EventWaitHandle.Unix.cs" />
225 <Compile Include="System.Threading\Mutex.Unix.cs" />
226 <Compile Include="System.Threading\Semaphore.Unix.cs" />
227 <Compile Include="System.Runtime.InteropServices\NativeLibrary.Unix.cs" />
228 </ItemGroup>
229 <ItemGroup Condition="'$(TargetsWindows)' == 'true'">
230 <Compile Include="System.Globalization\GlobalizationMode.Windows.cs" />
231 <Compile Include="System.Runtime.InteropServices\NativeLibrary.Windows.cs" />
232 </ItemGroup>
233 <ItemGroup>
234 <Compile Include="..\..\build\common\Consts.cs" />
235 <Compile Include="..\..\build\common\SR.cs" />
237 <Compile Include="..\corlib\coreclr\Math.CoreCLR.cs" />
239 <Compile Include="..\corlib\ReferenceSources\JitHelpers.cs" />
241 <Compile Include="..\corlib\Mono\RuntimeStructs.cs" />
242 <Compile Include="..\corlib\Mono\RuntimeMarshal.cs" />
243 <Compile Include="..\corlib\Mono\RuntimeHandles.cs" />
244 <Compile Include="..\corlib\Mono\SafeStringMarshal.cs" />
245 <Compile Include="..\corlib\Mono\SafeGPtrArrayHandle.cs" />
247 <Compile Include="..\corlib\System\ArgIterator.cs" />
248 <Compile Include="..\corlib\System\EmptyArray.cs" />
249 <Compile Include="..\corlib\System\MathF.mono.cs" />
250 <Compile Include="..\corlib\System\ModuleHandle.cs" />
251 <Compile Include="..\corlib\System\MonoCustomAttrs.cs" />
252 <Compile Include="..\corlib\System\MulticastDelegate.cs" />
253 <Compile Include="..\corlib\System\RuntimeArgumentHandle.cs" />
254 <Compile Include="..\corlib\System\RuntimeFieldHandle.cs" />
255 <Compile Include="..\corlib\System\RuntimeTypeHandle.cs" />
256 <Compile Include="..\corlib\System\RuntimeMethodHandle.cs" />
257 <Compile Include="..\corlib\System\WeakReference.cs" />
258 <Compile Include="..\corlib\System\WeakReference_T.cs" />
259 <Compile Include="..\corlib\System\TypeIdentifier.cs" />
260 <Compile Include="..\corlib\System\TypeSpec.cs" />
262 <Compile Include="..\corlib\System.Diagnostics\Debugger.cs" />
264 <Compile Include="..\corlib\System.Runtime.CompilerServices\PreserveDependencyAttribute.cs" />
266 <Compile Include="..\corlib\System.IO\MonoIOError.cs" />
267 <Compile Include="..\corlib\System.Threading\Monitor.cs" />
268 <Compile Include="..\corlib\System.Threading\RegisteredWaitHandle.cs" />
270 <Compile Include="..\corlib\System.Reflection\CustomAttributeData.cs" />
271 <Compile Include="..\corlib\System.Reflection\RuntimeMethodInfo.cs" />
272 <Compile Include="..\corlib\System.Reflection\RuntimeFieldInfo.cs" />
273 <Compile Include="..\corlib\System.Reflection\RuntimePropertyInfo.cs" />
274 <Compile Include="..\corlib\System.Reflection\RuntimeEventInfo.cs" />
275 <Compile Include="..\corlib\System.Reflection\RuntimeParameterInfo.cs" />
276 <Compile Include="..\corlib\System.Reflection\RuntimeModule.cs" />
277 </ItemGroup>
278 <ItemGroup>
279 <Compile Include="..\referencesource\mscorlib\system\rttype.cs" />
280 </ItemGroup>
281 <ItemGroup>
282 <Compile Include="System.Reflection\CustomAttributeNamedArgument.cs" />
283 <Compile Include="System.Reflection\CustomAttributeTypedArgument.cs" />
284 <Compile Include="System.Reflection\MissingMetadataException.cs" />
285 <Compile Include="..\corlib\corert\RuntimeAugments.cs" />
286 </ItemGroup>
288 <!-- Mono extensions -->
289 <PropertyGroup>
290 <DefineConstants>FEATURE_DEFAULT_INTERFACES;FEATURE_MANAGED_ETW_CHANNELS;$(DefineConstants)</DefineConstants>
292 <DefineConstants>MONO;NETCORE;DISABLE_REMOTING;MONO_FEATURE_SRE;$(DefineConstants)</DefineConstants>
293 <NoWarn>3021,$(NoWarn)</NoWarn>
294 </PropertyGroup>
296 <Import Project="..\..\..\netcore\System.Private.CoreLib\shared\System.Private.CoreLib.Shared.projitems" />
298 <!-- Use Roslyn Compilers to build -->
299 <Import Condition="'$(RoslynPropsFile)' != ''" Project="$(RoslynPropsFile)" />
301 <!-- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> -->
302 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
304 <PropertyGroup>
305 <!-- Overwrite the key that we are going to use for signing -->
306 <AssemblyOriginatorKeyFile>..\silverlight.pub</AssemblyOriginatorKeyFile>
307 <!-- Don't need a strong name signature because we only ship the native image -->
308 <StrongNameSig>None</StrongNameSig>
309 </PropertyGroup>
311 <ItemGroup>
312 <EmbeddedResource LogicalName="System.Private.CoreLib.xml" Include="LinkerDescriptor/System.Private.CoreLib.xml"/>
313 </ItemGroup>
314 </Project>