Cleanup CoreLib makefiles (#22706)
authorJan Kotas <jkotas@microsoft.com>
Wed, 20 Feb 2019 04:36:46 +0000 (20:36 -0800)
committerGitHub <noreply@github.com>
Wed, 20 Feb 2019 04:36:46 +0000 (20:36 -0800)
src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/System.Private.CoreLib/Tools/Versioning/GenerateVersionInfo.targets [deleted file]
src/System.Private.CoreLib/Tools/Versioning/NativeVersion.rc [deleted file]

index 3719202..faa24c1 100644 (file)
@@ -29,7 +29,7 @@
     <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
     <SignAssembly>true</SignAssembly>
     <DelaySign>true</DelaySign>
-    <DefineConstants>$(DefineConstants);CORECLR;_USE_NLS_PLUS_TABLE;CODE_ANALYSIS_BASELINE;netcoreapp</DefineConstants>
+    <DefineConstants>$(DefineConstants);CORECLR;netcoreapp</DefineConstants>
     <!-- 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>
   <PropertyGroup Condition="'$(Platform)' == 'x64'">
     <PlatformTarget>x64</PlatformTarget>
     <Prefer32Bit>false</Prefer32Bit>
-    <BaseAddress>0x180000000</BaseAddress>
     <DefineConstants>BIT64;AMD64;$(DefineConstants)</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Platform)' == 'x86'">
     <PlatformTarget>x86</PlatformTarget>
-    <BaseAddress>0x10000000</BaseAddress>
     <DefineConstants>BIT32;$(DefineConstants)</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Platform)' == 'arm'">
     <Optimize Condition="'$(Optimize)' == '' and '$(Configuration)' == 'Debug'">false</Optimize>
     <Optimize Condition="'$(Optimize)' == '' and '$(Configuration)' == 'Checked'">true</Optimize>
     <DebugType Condition="'$(DebugType)' == ''">full</DebugType>
-    <DefineConstants>_LOGGING;DEBUG;TRACE;$(DefineConstants)</DefineConstants>
+    <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>
-    <DebugType Condition="'$(DebugType)' == ''">pdbOnly</DebugType>
-    <DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
-  </PropertyGroup>
-  <!-- Make portable PDBs on Unix -->
-  <PropertyGroup Condition="'$(OsEnvironment)' == 'Unix'">
-    <DebugType>portable</DebugType>
   </PropertyGroup>
   <!-- Assembly attributes -->
   <PropertyGroup>
@@ -97,8 +89,6 @@
   <PropertyGroup>
     <CommonPath>$(MSBuildThisFileDirectory)Common</CommonPath>
     <BclSourcesRoot>$(MSBuildThisFileDirectory)src</BclSourcesRoot>
-    <MscorlibDir>$(MSBuildThisFileDirectory)</MscorlibDir>
-    <NlpObjDir>$(BclSourcesRoot)\System\Globalization\Tables</NlpObjDir>
   </PropertyGroup>
   <!-- Msbuild variables needed to get CoreCLR features to be set properly. -->
   <PropertyGroup>
   <PropertyGroup>
     <StrongNameSig>Silverlight</StrongNameSig>
   </PropertyGroup>
-  <Import Project="$(MSBuildThisFileDirectory)Tools\Versioning\GenerateVersionInfo.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)]" />
+  </ItemGroup>
   <!--
     Import common targets: codeAnalysis, Microsoft.CSharp, sign, versioning, codeOptimizations, etc.
     In doing so, override versioning targets.
     <AssemblyOriginatorKeyFile>$(ToolsDir)SilverlightPlatformPublicKey.snk</AssemblyOriginatorKeyFile>
     <!-- Don't need a strong name signature because we only ship the native image -->
     <StrongNameSig>None</StrongNameSig>
-    <!-- Use a different nativeresource file to avoid conflicts with mscorlib-->
-    <Win32Resource Condition="'$(GenerateNativeVersionInfo)'=='true'">$(IntermediateOutputPath)\System.Private.CoreLib.res</Win32Resource>
   </PropertyGroup>
   <Import Project="CreateRuntimeRootILLinkDescriptorFile.targets" />
   <ItemGroup>
diff --git a/src/System.Private.CoreLib/Tools/Versioning/GenerateVersionInfo.targets b/src/System.Private.CoreLib/Tools/Versioning/GenerateVersionInfo.targets
deleted file mode 100644 (file)
index 0e9a226..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <!-- Setup the default file version information -->
-  <PropertyGroup>
-    <MajorVersion Condition="'$(MajorVersion)' == ''">1</MajorVersion>
-    <MinorVersion Condition="'$(MinorVersion)' == ''">0</MinorVersion>
-    <BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">0</BuildNumberMajor>
-    <BuildNumberMinor Condition="'$(BuildNumberMinor)' == ''">0</BuildNumberMinor>
-  </PropertyGroup>
-  
-  <!-- #################################### -->
-  <!-- Generate Assembly Info -->
-  <!-- #################################### -->
-  <PropertyGroup>
-    <AssemblyVersion Condition="'$(AssemblyVersion)'==''">999.999.999.0</AssemblyVersion>
-    <CLSCompliant Condition="'$(CLSCompliant)'==''">false</CLSCompliant>
-    <AssemblyFileVersion Condition="'$(AssemblyFileVersionOverride)'==''">$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)</AssemblyFileVersion>
-  </PropertyGroup>
-
-  <PropertyGroup>
-    <GenerateAssemblyInfo Condition="'$(GenerateAssemblyInfo)'==''">true</GenerateAssemblyInfo>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(GenerateAssemblyInfo)'=='true'">
-    <AssemblyInfoFile>$(IntermediateOutputPath)GeneratedAssemblyInfo.cs</AssemblyInfoFile>
-    <CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateAssemblyInfo</CoreCompileDependsOn>
-  </PropertyGroup>
-
-  <ItemGroup>
-      <AssemblyInfoLines Include="[assembly:System.Resources.SatelliteContractVersion(&quot;$(AssemblyVersion)&quot;)]" />
-      <AssemblyInfoLines Include="[assembly:System.Security.AllowPartiallyTrustedCallers]" />
-      <AssemblyInfoLines Include="[assembly:System.Runtime.InteropServices.ComVisible(false)]" />
-      <AssemblyInfoLines Include="[assembly:System.Resources.NeutralResourcesLanguage(&quot;en-US&quot;)]" />
-      <AssemblyInfoLines Include="[assembly:System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute(System.Runtime.InteropServices.DllImportSearchPath.AssemblyDirectory | System.Runtime.InteropServices.DllImportSearchPath.System32)]" />
-  </ItemGroup>
-
-  <!-- #################################### -->
-  <!-- Generate Native Version Info -->
-  <!-- #################################### -->
-  <PropertyGroup Condition="'$(GenerateNativeVersionInfo)'=='true'">
-    <NativeVersionHeaderFile>$(IntermediateOutputPath)GeneratedVersion.h</NativeVersionHeaderFile>
-    <BeforeResourceCompileTargets>$(BeforeResourceCompileTargets);GenerateVersionHeader</BeforeResourceCompileTargets>
-    <Win32Resource>$(IntermediateOutputPath)\NativeVersion.res</Win32Resource>
-    <CoreCompileDependsOn>$(CoreCompileDependsOn);NativeResourceCompile</CoreCompileDependsOn>
-  </PropertyGroup>
-
-  <Target Name="GenerateVersionHeader"
-          Condition="'$(GenerateNativeVersionInfo)'=='true'"
-          Inputs="$(MSBuildProjectFile)"
-          Outputs="$(NativeVersionHeaderFile)">
-
-    <ItemGroup>
-      <NativeVersionLines Include="#define VER_COMPANYNAME_STR         &quot;Microsoft Corporation&quot;" />
-      <NativeVersionLines Include="#define VER_FILEDESCRIPTION_STR     &quot;$(AssemblyName)&quot;" />
-      <NativeVersionLines Include="#define VER_INTERNALNAME_STR        VER_FILEDESCRIPTION_STR" />
-      <NativeVersionLines Include="#define VER_ORIGINALFILENAME_STR    VER_FILEDESCRIPTION_STR" />
-      <NativeVersionLines Include="#define VER_PRODUCTNAME_STR         &quot;Microsoft\xae .NET Framework&quot;" />
-      <NativeVersionLines Include="#define VER_PRODUCTVERSION          $(MajorVersion),$(MinorVersion),$(BuildNumberMajor),$(BuildNumberMinor)" />
-      <NativeVersionLines Include="#define VER_PRODUCTVERSION_STR      &quot;$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)&quot;" />
-      <NativeVersionLines Include="#define VER_FILEVERSION             $(MajorVersion),$(MinorVersion),$(BuildNumberMajor),$(BuildNumberMinor)" />
-      <NativeVersionLines Include="#define VER_FILEVERSION_STR         &quot;$(MajorVersion).$(MinorVersion).$(BuildNumberMajor).$(BuildNumberMinor)&quot;" />
-      <NativeVersionLines Include="#define VER_LEGALCOPYRIGHT_STR      &quot;\xa9 Microsoft Corporation.  All rights reserved.&quot;" />
-      <NativeVersionLines Condition="'$(Configuration)'=='Debug'" Include="#define VER_DEBUG                   VS_FF_DEBUG" />
-      <NativeVersionLines Condition="'$(Configuration)'!='Debug'" Include="#define VER_DEBUG                   0" />
-    </ItemGroup>
-
-    <WriteLinesToFile File="$(NativeVersionHeaderFile)"
-                      Lines="@(NativeVersionLines)"
-                      Overwrite="true" />
-
-    <ItemGroup>
-      <FileWrites Include="$(NativeVersionHeaderFile)" />
-    </ItemGroup>
-  </Target>
-
-  
-  <PropertyGroup Condition="'$(GenerateNativeVersionInfo)'=='true'">
-    <WindowsSdkDir Condition="'$(WindowsSdkDir)'==''">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1@InstallationFolder)</WindowsSdkDir>
-    <RCPath Condition="'$(RCPath)' == ''">$(WindowsSdkDir)bin\x86\rc.exe</RCPath>
-  </PropertyGroup>
-  
-  <Target Name="NativeResourceCompile"
-          Condition="'$(GenerateNativeVersionInfo)'=='true'"
-          DependsOnTargets="GenerateVersionHeader"
-          Inputs="$(MsBuildThisFileDirectory)NativeVersion.rc"
-          Outputs="$(Win32Resource)">
-
-    <Exec Command="&quot;$(RCPath)&quot; /nologo /x /i &quot;$(IntermediateOutputPath.TrimEnd('\'))&quot; /i &quot;$(WindowsSdkDir)Include\$(WindowsSDKVersion)um&quot; /i &quot;$(WindowsSdkDir)Include\$(WindowsSDKVersion)\shared&quot; /D _UNICODE /D UNICODE /l&quot;0x0409&quot; /r /fo &quot;$(Win32Resource)&quot; &quot;$(MsBuildThisFileDirectory)NativeVersion.rc&quot;" />
-
-  </Target>
-</Project>
diff --git a/src/System.Private.CoreLib/Tools/Versioning/NativeVersion.rc b/src/System.Private.CoreLib/Tools/Versioning/NativeVersion.rc
deleted file mode 100644 (file)
index 6a26d16..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#include "GeneratedVersion.h"
-
-#include <windows.h>
-
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION     VER_FILEVERSION
-PRODUCTVERSION  VER_PRODUCTVERSION
-FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
-FILEFLAGS       VER_DEBUG
-FILEOS          VOS__WINDOWS32
-FILETYPE        VFT_DLL
-FILESUBTYPE     VFT2_UNKNOWN
-BEGIN
-    BLOCK "StringFileInfo"
-    BEGIN
-        BLOCK "040904E4"
-        BEGIN
-            VALUE "CompanyName",      VER_COMPANYNAME_STR
-            VALUE "FileDescription",  VER_FILEDESCRIPTION_STR
-            VALUE "FileVersion",      VER_FILEVERSION_STR
-            VALUE "InternalName",     VER_INTERNALNAME_STR
-            VALUE "LegalCopyright",   VER_LEGALCOPYRIGHT_STR
-            VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
-            VALUE "ProductName",      VER_PRODUCTNAME_STR
-            VALUE "ProductVersion",   VER_PRODUCTVERSION_STR
-        END
-    END
-
-    BLOCK "VarFileInfo"
-    BEGIN
-        /* The following line should only be modified for localized versions.     */
-        /* It consists of any number of WORD,WORD pairs, with each pair           */
-        /* describing a language,codepage combination supported by the file.      */
-        /*                                                                        */
-        /* For example, a file might have values "0x409,1252" indicating that it  */
-        /* supports English language (0x409) in the Windows ANSI codepage (1252). */
-
-        VALUE "Translation", 0x409, 1252
-
-    END
-END