Browse Source

Generate refs based on TargetFrameworks in ref projects

Oren Novotny 7 years ago
parent
commit
fa0715e7c4

+ 21 - 11
Ix.NET/Source/Directory.build.targets

@@ -6,29 +6,39 @@
   
   <!-- This props all need to be set in targets as they depend on the values set earlier -->
   <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.0'">
-    <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_CODE_COVERAGE_ATTRIBUTE;CRIPPLED_REFLECTION;PLIB;SIGNED</DefineConstants>
+    <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_CODE_COVERAGE_ATTRIBUTE;CRIPPLED_REFLECTION;PLIB;</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
-    <DefineConstants>$(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE;CRIPPLED_REFLECTION;PLIB;SIGNED</DefineConstants>
+    <DefineConstants>$(DefineConstants);NO_CODE_COVERAGE_ATTRIBUTE;CRIPPLED_REFLECTION;PLIB;</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
-    <DefineConstants>$(DefineConstants);PLIB;SIGNED</DefineConstants>
+    <DefineConstants>$(DefineConstants);PLIB;</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
-    <DefineConstants>$(DefineConstants);HAS_APTCA;NO_ARRAY_EMPTY;DESKTOPCLR;DESKTOPCLR45;SIGNED</DefineConstants>
+    <DefineConstants>$(DefineConstants);HAS_APTCA;NO_ARRAY_EMPTY</DefineConstants>
   </PropertyGroup>
   <PropertyGroup Condition="'$(TargetFramework)' == 'net46'">
-    <DefineConstants>$(DefineConstants);HAS_APTCA;DESKTOPCLR;DESKTOPCLR46;SIGNED</DefineConstants>
+    <DefineConstants>$(DefineConstants);HAS_APTCA;</DefineConstants>
   </PropertyGroup>
 
 
-  <Target Name="GetRefsWithoutLib" BeforeTargets="_GetPackageFiles" Condition="'$(RefTargetFrameworks)' != '' and Exists('$(MSBuildThisFileDirectory)refs\$(MSBuildProjectName)\$(MSBuildProjectName).csproj') ">
-    <ItemGroup>
-      <_RefTargetFrameworks Include="$(RefTargetFrameworks.Split(';'))" />
-    </ItemGroup>
-    <MSBuild Projects="$(MSBuildThisFileDirectory)refs\$(MSBuildProjectName)\$(MSBuildProjectName).csproj" Targets="_GetReferenceAssemblies" Properties="TargetFramework=%(_RefTargetFrameworks.Identity)">
+  <Target Name="GetRefsWithoutLib" 
+          BeforeTargets="_GetPackageFiles" 
+          Condition=" Exists('$(MSBuildThisFileDirectory)refs\$(MSBuildProjectName)\$(MSBuildProjectName).csproj') ">
+    
+    <MSBuild Projects="$(MSBuildThisFileDirectory)refs\$(MSBuildProjectName)\$(MSBuildProjectName).csproj" 
+             Targets="_GetTargetFrameworksOutput">
+
+      <Output TaskParameter="TargetOutputs" 
+              ItemName="_RefTargetFrameworks" />
+    </MSBuild>
+
+    <MSBuild Projects="$(MSBuildThisFileDirectory)refs\$(MSBuildProjectName)\$(MSBuildProjectName).csproj" 
+             Targets="_GetReferenceAssemblies" 
+             Properties="TargetFramework=%(_RefTargetFrameworks.Identity)">
 
-      <Output TaskParameter="TargetOutputs" ItemName="_refAssms" />
+      <Output TaskParameter="TargetOutputs" 
+              ItemName="_refAssms" />
     </MSBuild>
 
     <ItemGroup>

+ 0 - 1
Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj

@@ -4,7 +4,6 @@
     <Description>Interactive Extensions Providers Library used to build query providers and express queries over enumerable sequences.</Description>
     <AssemblyTitle>Interactive Extensions - Providers Library</AssemblyTitle>
     <TargetFrameworks>net45;netstandard1.0;netstandard2.0</TargetFrameworks>
-    <RefTargetFrameworks>netstandard1.0;netcoreapp2.0;netstandard2.1</RefTargetFrameworks>
     <PackageTags>Ix;Interactive;Extensions;Enumerable</PackageTags>
   </PropertyGroup>
 

+ 0 - 1
Ix.NET/Source/System.Interactive/System.Interactive.csproj

@@ -5,7 +5,6 @@
     <AssemblyTitle>Interactive Extensions - Main Library</AssemblyTitle>
     <Authors>Microsoft</Authors>
     <TargetFrameworks>net45;netstandard1.0;netstandard2.0</TargetFrameworks>
-    <RefTargetFrameworks>netstandard1.0;netcoreapp2.0;netstandard2.1</RefTargetFrameworks>
     <PackageTags>Ix;Interactive;Extensions;Enumerable</PackageTags>
   </PropertyGroup>
 

+ 1 - 1
Ix.NET/Source/refs/System.Interactive.Providers/System.Interactive.Providers.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Interactive Extensions Providers Library used to build query providers and express queries over enumerable sequences.</Description>
     <AssemblyTitle>Interactive Extensions - Providers Library</AssemblyTitle>
-    <TargetFrameworks>net45;netstandard1.0;netstandard2.0;netcoreapp2.0;netstandard2.1</TargetFrameworks>
+    <TargetFrameworks>netstandard1.0;netcoreapp2.0;netstandard2.1</TargetFrameworks>
     <PackageTags>Ix;Interactive;Extensions;Enumerable</PackageTags>
   </PropertyGroup>
 

+ 1 - 1
Ix.NET/Source/refs/System.Interactive/System.Interactive.csproj

@@ -4,7 +4,7 @@
     <Description>Interactive Extensions Main Library used to express queries over enumerable sequences.</Description>
     <AssemblyTitle>Interactive Extensions - Main Library</AssemblyTitle>
     <Authors>Microsoft</Authors>
-    <TargetFrameworks>net45;netstandard1.0;netstandard2.0;netcoreapp2.0;netstandard2.1</TargetFrameworks>
+    <TargetFrameworks>netstandard1.0;netcoreapp2.0;netstandard2.1</TargetFrameworks>
     <PackageTags>Ix;Interactive;Extensions;Enumerable</PackageTags>
   </PropertyGroup>