Addressing Minor Cleanup (#31845)
authorAnirudh Agnihotry <anirudhagnihotry098@gmail.com>
Fri, 7 Feb 2020 03:08:07 +0000 (19:08 -0800)
committerGitHub <noreply@github.com>
Fri, 7 Feb 2020 03:08:07 +0000 (19:08 -0800)
* addressing viktor feedback

* Update System.Reflection.Emit.ILGeneration.csproj

* Update tests.proj

* Update System.Reflection.Emit.Lightweight.csproj

* Update System.Xml.XPath.XDocument.Tests.csproj

* fixing emit projects, making them similar before config change

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
22 files changed:
src/libraries/Common/tests/StaticTestGenerator/StaticTestGenerator.csproj
src/libraries/Microsoft.Win32.Registry/src/Microsoft.Win32.Registry.csproj
src/libraries/Microsoft.Win32.SystemEvents/src/Microsoft.Win32.SystemEvents.csproj
src/libraries/System.Data.OleDb/src/System.Data.OleDb.csproj
src/libraries/System.Diagnostics.FileVersionInfo/tests/NativeConsoleApp/NativeConsoleApp.vcxproj
src/libraries/System.Diagnostics.FileVersionInfo/tests/NativeLibrary/NativeLibrary.vcxproj
src/libraries/System.Diagnostics.FileVersionInfo/tests/SecondNativeLibrary/SecondNativeLibrary.vcxproj
src/libraries/System.IO.Compression.Brotli/tests/System.IO.Compression.Brotli.Tests.csproj
src/libraries/System.IO.Compression/tests/System.IO.Compression.Tests.csproj
src/libraries/System.IO.Ports/src/System.IO.Ports.csproj
src/libraries/System.Net.NameResolution/tests/PalTests/System.Net.NameResolution.Pal.Tests.csproj
src/libraries/System.Numerics.Vectors/tests/System.Numerics.Vectors.Tests.csproj
src/libraries/System.Private.Xml.Linq/tests/XPath/XDocument/System.Xml.XPath.XDocument.Tests.csproj
src/libraries/System.Reflection.Emit.ILGeneration/ref/System.Reflection.Emit.ILGeneration.csproj
src/libraries/System.Reflection.Emit.ILGeneration/src/System.Reflection.Emit.ILGeneration.csproj
src/libraries/System.Reflection.Emit.Lightweight/ref/System.Reflection.Emit.Lightweight.csproj
src/libraries/System.Reflection.Emit.Lightweight/src/System.Reflection.Emit.Lightweight.csproj
src/libraries/System.Reflection.Emit/ref/System.Reflection.Emit.csproj
src/libraries/System.Reflection.Emit/src/System.Reflection.Emit.csproj
src/libraries/build.proj
src/libraries/shims/manual/Directory.Build.props
src/libraries/tests.proj

index b6c0d40..02be551 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <OutputType>Exe</OutputType>
-    <TargetFrameworks>netcoreapp3.0</TargetFrameworks>
+    <TargetFramework>netcoreapp3.0</TargetFramework>
     <EnableDefaultItems>false</EnableDefaultItems>
     <LangVersion>preview</LangVersion>
     <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
index e4c7b59..986241e 100644 (file)
@@ -4,13 +4,13 @@
     <NoWarn>$(NoWarn);CS1573</NoWarn>
     <DefineConstants>$(DefineConstants);REGISTRY_ASSEMBLY</DefineConstants>
     <IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
-    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetFrameworkSuffix)' == '' and '$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_Registry</GeneratePlatformNotSupportedAssemblyMessage>
+    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true' and '$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_Registry</GeneratePlatformNotSupportedAssemblyMessage>
     <NoWarn Condition="'$(TargetsUnix)' == 'true'">$(NoWarn);CA1823</NoWarn> <!-- Avoid unused fields warnings in Unix build -->
     <TargetFrameworks>netstandard2.0-Windows_NT;netstandard2.0-Unix;netstandard2.0;net461-Windows_NT;$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetFrameworkCurrent)-Windows_NT</TargetFrameworks>
     <ExcludeCurrentNetCoreApp>true</ExcludeCurrentNetCoreApp>
     <ExcludeCurrentFullFramework>true</ExcludeCurrentFullFramework>
   </PropertyGroup>
-  <ItemGroup Condition="'$(TargetsNetFx)' != 'true' and '$(TargetFrameworkSuffix)' != ''">
+  <ItemGroup Condition="'$(TargetsNetFx)' != 'true' and '$(TargetsAnyOS)' != 'true'">
     <Compile Include="$(CommonPath)Interop\Windows\Advapi32\Interop.RegistryConstants.cs">
       <Link>Common\Interop\Windows\Advapi32\Interop.RegistryConstants.cs</Link>
     </Compile>
index 4b1f932..55437fa 100644 (file)
@@ -3,7 +3,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
     <Nullable>enable</Nullable>
-    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true' and '$(TargetFrameworkSuffix)' == ''">SR.PlatformNotSupported_SystemEvents</GeneratePlatformNotSupportedAssemblyMessage>
+    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true' and '$(TargetsAnyOS)' == 'true'">SR.PlatformNotSupported_SystemEvents</GeneratePlatformNotSupportedAssemblyMessage>
     <TargetFrameworks>netstandard2.0;netcoreapp2.0-Windows_NT;netcoreapp3.0-Windows_NT;net461;$(NetCoreAppCurrent)-Windows_NT;$(NetFrameworkCurrent)</TargetFrameworks>
     <ExcludeCurrentNetCoreApp>true</ExcludeCurrentNetCoreApp>
     <ExcludeCurrentFullFramework>true</ExcludeCurrentFullFramework>
index 7899a9d..09b19f6 100644 (file)
@@ -3,8 +3,8 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <NoWarn>$(NoWarn);CS1573</NoWarn>
     <IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
-    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetFrameworkSuffix)' == '' and '$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_OleDb</GeneratePlatformNotSupportedAssemblyMessage>
-    <NoWarn Condition="'$(TargetFrameworkSuffix)' == '' and '$(TargetsNetStandard)' == 'true'">$(NoWarn);CS0618</NoWarn>
+    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsAnyOS)' == 'true' and '$(TargetsNetStandard)' == 'true'">SR.PlatformNotSupported_OleDb</GeneratePlatformNotSupportedAssemblyMessage>
+    <NoWarn Condition="'$(TargetsAnyOS)' == 'true' and '$(TargetsNetStandard)' == 'true'">$(NoWarn);CS0618</NoWarn>
     <TargetFrameworks>netstandard2.0-Windows_NT;netstandard2.0;net461-Windows_NT;$(NetFrameworkCurrent)-Windows_NT</TargetFrameworks>
     <ExcludeCurrentFullFramework>true</ExcludeCurrentFullFramework>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
index b1943d2..008c527 100644 (file)
@@ -1,6 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <DefineConstants Condition="'$(TargetsNetCoreApp)' == 'true'">$(DefineConstants);STREAM_MEMORY_OVERLOADS_AVAILABLE</DefineConstants>
     <TargetFrameworks>$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Windows_NT</TargetFrameworks>
   </PropertyGroup>
   <ItemGroup>
index 8c5f4c3..6153c3a 100644 (file)
@@ -1,7 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <!-- This constant is only here for usage in $(CommonTestPath), since not all projects using these tests have been updated yet-->
-    <DefineConstants>$(DefineConstants);STREAM_MEMORY_OVERLOADS_AVAILABLE</DefineConstants>
     <TargetFrameworks>$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Windows_NT</TargetFrameworks>
   </PropertyGroup>
   <ItemGroup>
index 91dee0b..12ddf6d 100644 (file)
@@ -2,15 +2,15 @@
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsPartialFacadeAssembly Condition="'$(TargetsNetFx)' == 'true'">true</IsPartialFacadeAssembly>
-    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true' and '$(TargetFrameworkSuffix)' == ''">SR.PlatformNotSupported_IOPorts</GeneratePlatformNotSupportedAssemblyMessage>
+    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetsNetStandard)' == 'true' and '$(TargetsAnyOS)' == 'true'">SR.PlatformNotSupported_IOPorts</GeneratePlatformNotSupportedAssemblyMessage>
     <DefineConstants>$(DefineConstants);NOSPAN</DefineConstants>
     <IncludeDllSafeSearchPathAttribute>true</IncludeDllSafeSearchPathAttribute>
     <Nullable>annotations</Nullable>
     <TargetFrameworks>netstandard2.0-Windows_NT;netstandard2.0-Linux;netstandard2.0-OSX;netstandard2.0;net461-Windows_NT;netstandard2.0-FreeBSD;$(NetFrameworkCurrent)-Windows_NT</TargetFrameworks>
     <ExcludeCurrentFullFramework>true</ExcludeCurrentFullFramework>
-    <ExcludeFromPackage Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(TargetFrameworkSuffix)' == 'FreeBSD'">true</ExcludeFromPackage>
+    <ExcludeFromPackage Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(TargetsFreeBSD)' == 'true'">true</ExcludeFromPackage>
   </PropertyGroup>
-  <ItemGroup Condition="'$(TargetsNetStandard)' == 'true' and '$(TargetFrameworkSuffix)' != ''">
+  <ItemGroup Condition="'$(TargetsNetStandard)' == 'true' and '$(TargetsAnyOS)' != 'true'">
     <Compile Include="System\IO\Ports\Handshake.cs" />
     <Compile Include="System\IO\Ports\InternalResources.cs" />
     <Compile Include="System\IO\Ports\Parity.cs" />
index 56fd1af..256d41a 100644 (file)
     <Compile Include="$(CommonPath)System\Net\Logging\NetEventSource.Common.cs">
       <Link>Common\System\Net\Logging\NetEventSource.cs</Link>
     </Compile>
-    <Compile Include="$(CommonPath)System\Net\Sockets\ProtocolType.cs" Condition="'$(TargetFrameworkSuffix)' == 'Windows_NT'">
+    <Compile Include="$(CommonPath)System\Net\Sockets\ProtocolType.cs" Condition="'$(TargetsWindows)' == 'true'">
       <Link>Common\System\Net\Sockets\ProtocolType.cs</Link>
     </Compile>
-    <Compile Include="$(CommonPath)System\Net\Sockets\SocketType.cs" Condition="'$(TargetFrameworkSuffix)' == 'Windows_NT'">
+    <Compile Include="$(CommonPath)System\Net\Sockets\SocketType.cs" Condition="'$(TargetsWindows)' == 'true'">
       <Link>Common\System\Net\Sockets\SocketType.cs</Link>
     </Compile>
     <Compile Include="$(CommonPath)System\Net\IPEndPointStatics.cs">
index c75741a..f96a931 100644 (file)
       <LastGenOutput>GenericVectorTests.cs</LastGenOutput>
     </None>
   </ItemGroup>
-  <ItemGroup>
-    <Content Include="GenericVectorTests.netcoreapp.tt">
-      <Generator>TextTemplatingFileGenerator</Generator>
-      <LastGenOutput>GenericVectorTests.netcoreapp.cs</LastGenOutput>
-    </Content>
-  </ItemGroup>
 </Project>
index 8a85850..d7763b8 100644 (file)
@@ -1,7 +1,5 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <RootNamespace>System.Xml.XPath.XDocument.Tests</RootNamespace>
-    <CommonPathXPath>$(CommonPath)System\Xml\XPath</CommonPathXPath>
     <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
     <CommonPathXPath>$(CommonTestPath)System\Xml\XPath</CommonPathXPath>
   </PropertyGroup>
     <EmbeddedResource Include="$(CommonPathXPath)\TestData\xpC001.xml">
       <Link>TestData\xpC001.xml</Link>
     </EmbeddedResource>
-   </ItemGroup>
+  </ItemGroup>
 </Project>
index e8176f7..e117a9b 100644 (file)
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
-    <ExcludeCurrentNetCoreApp>true</ExcludeCurrentNetCoreApp>
     <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
index aeafd37..d73e1cf 100644 (file)
@@ -2,10 +2,7 @@
   <PropertyGroup>
     <AssemblyName>System.Reflection.Emit.ILGeneration</AssemblyName>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
-    <OmitResources>$(IsPartialFacadeAssembly)</OmitResources>
     <TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix</TargetFrameworks>
-    <ExcludeCurrentNetCoreApp>true</ExcludeCurrentNetCoreApp>
-    <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
     <ReferenceFromRuntime Include="System.Private.CoreLib" />
index 773b445..f5ee53a 100644 (file)
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
-    <ExcludeCurrentNetCoreApp>true</ExcludeCurrentNetCoreApp>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <Nullable>enable</Nullable>
   </PropertyGroup>
index 4c8eafd..8f621f0 100644 (file)
@@ -1,14 +1,10 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <AssemblyName>System.Reflection.Emit.Lightweight</AssemblyName>
-    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
-    <OmitResources>$(IsPartialFacadeAssembly)</OmitResources>
-    <TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix</TargetFrameworks>
-    <ExcludeCurrentNetCoreApp>true</ExcludeCurrentNetCoreApp>
-    <Nullable>enable</Nullable>
+    <TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix</TargetFrameworks>  
   </PropertyGroup>
   <ItemGroup>
     <ReferenceFromRuntime Include="System.Private.CoreLib" />
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
index 5fb9ee8..be3da7e 100644 (file)
@@ -1,7 +1,6 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
-    <ExcludeCurrentNetCoreApp>true</ExcludeCurrentNetCoreApp>
     <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
index 04508f1..0fb2dc4 100644 (file)
@@ -1,11 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
-    <OmitResources>$(IsPartialFacadeAssembly)</OmitResources>
     <IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
-    <OmitResources>$(IsPartialFacadeAssembly)</OmitResources>
     <TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix</TargetFrameworks>
-    <ExcludeCurrentNetCoreApp>true</ExcludeCurrentNetCoreApp>
-    <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
     <ReferenceFromRuntime Include="System.Private.CoreLib" />
index d9453fd..8da5cf9 100644 (file)
 
   <Target Name="Rebuild" DependsOnTargets="Clean;Build" />
 
-  <!-- set up inputs for UpdateVSConfigurations in a target to avoid globbing all the time -->
-  <Target Name="_setProjectsToUpdate" BeforeTargets="UpdateVSConfigurations">
-    <ItemGroup>
-      <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)**/*.*csproj" 
-                        Exclude="$(MSBuildThisFileDirectory)shims/**/*.*csproj"/>
-      <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)**/*.*ilproj" />
-      <ProjectsToUpdate Include="$(MSBuildThisFileDirectory)**/*.*vbproj" />
-      <_solutionsToUpdateFiles Include="$(MSBuildThisFileDirectory)*/Directory.Build.props" />
-      <SolutionsToUpdate Include="@(_solutionsToUpdateFiles->'%(RootDir)%(Directory)')" Exclude="@(_solutionsToExcludeFromUpdate)" />
-    </ItemGroup>
-  </Target>
 </Project>
index 1605118..8a812f8 100644 (file)
@@ -17,7 +17,7 @@
     <RefPath>$(ArtifactsBinDir)runtime/$(BuildTargetFramework)-$(OSGroup)-$(Configuration)-$(ArchGroup)/</RefPath>
     <CoreCLROSGroup>$(OSGroup)</CoreCLROSGroup>
     <MonoOSGroup>$(OSGroup)</MonoOSGroup>
-    <TargetFrameworks>netcoreapp5.0</TargetFrameworks>
+    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>
index 34357af..04a2c72 100644 (file)
@@ -16,6 +16,7 @@
     <Project Condition="'$(DirectoryToBuild)' != ''" Include="$(DirectoryToBuild)\**\*.Tests.csproj" />
     <Project Condition="'$(SkipTestRestore)' != 'true' and '$(DirectoryToBuild)' == ''" Include="$(MSBuildThisFileDirectory)*\tests\**\*.Tests.csproj" Exclude="@(ProjectExclusions)" />
     <Project Condition="'$(SkipTestRestore)' == 'true' and '$(DirectoryToBuild)' == ''" Include="$(CommonTestPath)CoreFx.Private.TestUtilities\CoreFx.Private.TestUtilities.csproj" />
+    <Project Remove="$(CommonTestPath)System\Net\Prerequisites\**\*.csproj" />
   </ItemGroup>
 
   <ItemGroup Condition="'$(BuildAllConfigurations)' == 'true'">