Skip to content

Commit

Permalink
Add reference based on UseWpf or UseWindowsForms
Browse files Browse the repository at this point in the history
  • Loading branch information
Oren Novotny committed Feb 14, 2019
1 parent d7a3a38 commit d40974b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Rx.NET/Source/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<DebugType>embedded</DebugType>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)ReactiveX.snk</AssemblyOriginatorKeyFile>
<NoWarn>$(NoWarn);1701;1702;CS1591</NoWarn>
<NoWarn>$(NoWarn);1701;1702;CS1591;NU5105</NoWarn>
<DefaultLanguage>en-US</DefaultLanguage>
<IncludeSymbols>false</IncludeSymbols>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
Expand Down
23 changes: 23 additions & 0 deletions Rx.NET/Source/src/System.Reactive/System.Reactive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<IncludeBuildOutput>false</IncludeBuildOutput>
</PropertyGroup>


Expand Down Expand Up @@ -63,5 +64,27 @@
<None Update="Linq\Observable\Zip.Generated.tt" Generator="TextTemplatingFileGenerator" LastGenOutput="Zip.Generated.cs" />
<Compile Update="Linq\Observable\Zip.Generated.cs" DesignTime="True" AutoGen="True" DependentUpon="Zip.Generated.tt" />
</ItemGroup>

<PropertyGroup>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);RemoveNetCoreApp3FromNuGet</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>

<!-- We remove the output from the nuget so it doesn't wind up in the \lib folder -->
<Target Name="RemoveNetCoreApp3FromNuGet" DependsOnTargets="BuiltProjectOutputGroup;DocumentationProjectOutputGroup" Condition="'$(TargetFramework)' == 'netcoreapp3.0'">

<ItemGroup>
<BuiltProjectOutputGroupOutput Remove="@(BuiltProjectOutputGroupOutput)" />
<DocumentationProjectOutputGroupOutput Remove="@(DocumentationProjectOutputGroupOutput)" />
</ItemGroup>

</Target>


<ItemGroup>
<None Include="bin\$(Configuration)\netcoreapp3.0\*.xml" PackagePath="buildTransitive\netcoreapp3.0" Pack="true" />
<None Include="bin\$(Configuration)\netcoreapp3.0\*.dll" PackagePath="buildTransitive\netcoreapp3.0" Pack="true" />
<None Include="build\_._" PackagePath="lib\netcoreapp3.0" Pack="true" />
<None Include="build\System.Reactive.targets" PackagePath="buildTransitive\netcoreapp3.0" Pack="true" />
</ItemGroup>

</Project>
10 changes: 10 additions & 0 deletions Rx.NET/Source/src/System.Reactive/build/System.Reactive.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>
<PropertyGroup>
<UseWindowsRxVersion Condition="'$(UseWpf)' == 'true' OR '$(UseWindowsForms)' == 'true'" >true</UseWindowsRxVersion>
<UseWindowsRxVersion Condition="'$(UseWindowsVersion)' == '' " >false</UseWindowsRxVersion>
</PropertyGroup>
<ItemGroup>
<Reference Condition="'$(UseWindowsRxVersion)' == 'true' " Include="$(MSBuildThisFileDirectory)System.Reactive.dll" />
<Reference Condition="'$(UseWindowsRxVersion)' != 'true' " Include="$(MSBuildThisFileDirectory)..\..\lib\netstandard2.0\System.Reactive.dll" />
</ItemGroup>
</Project>
Empty file.

0 comments on commit d40974b

Please sign in to comment.