Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
Add support for net40 target (issue #877)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Apr 10, 2017
1 parent 56eaf4a commit 057f462
Show file tree
Hide file tree
Showing 60 changed files with 210 additions and 341 deletions.
21 changes: 21 additions & 0 deletions Build/SharpDX.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<Project>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net40' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP;BEFORE_NET45</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
<SharpDXAppType>STORE_APP</SharpDXAppType>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' OR '$(TargetFramework)' == 'netstandard1.3'">
<SharpDXAppType>REFERENCE</SharpDXAppType>
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
</PropertyGroup>

<Target Name="PatchAssembly" AfterTargets="AfterBuild">
<Exec Command="&quot;$(SolutionDir)\Source\Bin\SharpCLI.exe&quot; &quot;$(TargetPath)&quot;" />

Expand Down
10 changes: 1 addition & 9 deletions Source/SharpDX.Animation/SharpDX.Animation.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1</TargetFrameworks>
<PackageId>SharpDX.Animation</PackageId>
<Product>SharpDX.Animation</Product>
<AssemblyTitle>SharpDX.Animation</AssemblyTitle>
<Title>SharpDX.Animation</Title>
<Description>Assembly providing DirectX - Animation managed API.</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
14 changes: 1 addition & 13 deletions Source/SharpDX.D3DCompiler/SharpDX.D3DCompiler.csproj
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<PackageId>SharpDX.D3DCompiler</PackageId>
<Product>SharpDX.D3DCompiler</Product>
<AssemblyTitle>SharpDX.D3DCompiler</AssemblyTitle>
<Title>SharpDX.D3DCompiler</Title>
<Description>Assembly providing DirectX - D3DCompiler managed API.</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
<SharpDXAppType>STORE_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
14 changes: 1 addition & 13 deletions Source/SharpDX.DXGI/SharpDX.DXGI.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<PackageId>SharpDX.DXGI</PackageId>
<Product>SharpDX.DXGI</Product>
<AssemblyTitle>SharpDX.DXGI</AssemblyTitle>
<Title>SharpDX.DXGI</Title>
<Description>Assembly providing DirectX - DXGI managed API.</Description>
<PackageTags>$(PackageTags) DXGI</PackageTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
<SharpDXAppType>STORE_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
6 changes: 1 addition & 5 deletions Source/SharpDX.Desktop/SharpDX.Desktop.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45</TargetFrameworks>
<TargetFrameworks>net40;net45</TargetFrameworks>
<PackageId>SharpDX.Desktop</PackageId>
<Product>SharpDX.Desktop</Product>
<AssemblyTitle>SharpDX.Desktop</AssemblyTitle>
<Title>SharpDX.Desktop</Title>
<Description>Assembly providing APIs related to Desktop platform.</Description>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<Compile Include="..\SharedAssemblyInfo.cs">
Expand Down
4 changes: 4 additions & 0 deletions Source/SharpDX.Direct2D1/CustomEffectFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ public string ToXml()
private void InitializeBindings()
{
var bindings = new List<PropertyBinding>();
#if BEFORE_NET45
foreach (var propertyInfo in customEffectType.GetTypeInfo().GetProperties(BindingFlags.Public|BindingFlags.Instance))
#else
foreach (var propertyInfo in customEffectType.GetTypeInfo().DeclaredProperties)
#endif
{
var binding = PropertyBinding.Get(customEffectType, propertyInfo);
if (binding != null)
Expand Down
14 changes: 1 addition & 13 deletions Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<PackageId>SharpDX.Direct2D1</PackageId>
<Product>SharpDX.Direct2D1</Product>
<AssemblyTitle>SharpDX.Direct2D1</AssemblyTitle>
<Title>SharpDX.Direct2D1</Title>
<Description>Assembly providing DirectX - Direct2D, DirectWrite and WIC managed API.</Description>
<PackageTags>$(PackageTags) 3D Direct2D D2D DirectWrite DWrite WIC</PackageTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
<SharpDXAppType>STORE_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
14 changes: 1 addition & 13 deletions Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<PackageId>SharpDX.Direct3D10</PackageId>
<Product>SharpDX.Direct3D10</Product>
<AssemblyTitle>SharpDX.Direct3D10</AssemblyTitle>
<Title>SharpDX.Direct3D10</Title>
<Description>Assembly providing DirectX - Direct3D10 and Direct3D10.1 managed API.</Description>
<PackageTags>$(PackageTags) Direct3D10 D3D10</PackageTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
<SharpDXAppType>STORE_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<PackageId>SharpDX.Direct3D11.Effects</PackageId>
<Product>SharpDX.Direct3D11.Effects</Product>
<AssemblyTitle>SharpDX.Direct3D11.Effects</AssemblyTitle>
Expand All @@ -10,18 +10,6 @@
<PackageTags>$(PackageTags) 3D Direct3D11 D3D11 Effects11</PackageTags>
<RuntimeIdentifiers>win-x86;win-x64;win8-arm</RuntimeIdentifiers>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
<SharpDXAppType>STORE_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
14 changes: 1 addition & 13 deletions Source/SharpDX.Direct3D11/SharpDX.Direct3D11.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<PackageId>SharpDX.Direct3D11</PackageId>
<Product>SharpDX.Direct3D11</Product>
<AssemblyTitle>SharpDX.Direct3D11</AssemblyTitle>
<Title>SharpDX.Direct3D11</Title>
<Description>Assembly providing DirectX - Direct3D11, Direct3D11.1 and Effects11 managed API.</Description>
<PackageTags>$(PackageTags) 3D Direct3D11 D3D11 Effects11</PackageTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
<SharpDXAppType>STORE_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
14 changes: 1 addition & 13 deletions Source/SharpDX.Direct3D12/SharpDX.Direct3D12.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
<PackageId>SharpDX.Direct3D12</PackageId>
<Product>SharpDX.Direct3D12</Product>
<AssemblyTitle>SharpDX.Direct3D12</AssemblyTitle>
<Title>SharpDX.Direct3D12</Title>
<Description>Assembly providing DirectX - Direct3D12 managed API.</Description>
<PackageTags>$(PackageTags) Direct3D12 D3D12</PackageTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
<SharpDXAppType>STORE_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
1 change: 0 additions & 1 deletion Source/SharpDX.Direct3D9/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
using System.Globalization;
using System.Reflection;
using SharpDX.Mathematics.Interop;
using System.Reflection;

namespace SharpDX.Direct3D9
{
Expand Down
6 changes: 3 additions & 3 deletions Source/SharpDX.Direct3D9/Fill3DCallback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ namespace SharpDX.Direct3D9
/// </summary>
internal static class FillCallbackHelper
{
private static unsafe Delegate native2DCallback = new Fill2DCallbackDelegate(Fill2DCallbackImpl);
private static unsafe Delegate native3DCallback = new Fill3DCallbackDelegate(Fill3DCallbackImpl);
private static unsafe Fill2DCallbackDelegate native2DCallback = new Fill2DCallbackDelegate(Fill2DCallbackImpl);
private static unsafe Fill3DCallbackDelegate native3DCallback = new Fill3DCallbackDelegate(Fill3DCallbackImpl);

/// <summary>
/// Pointer to the native callback for 2D function
Expand All @@ -60,7 +60,7 @@ internal static class FillCallbackHelper
/// </summary>
public static IntPtr Native3DCallbackPtr;

static FillCallbackHelper()
static unsafe FillCallbackHelper()
{
Native2DCallbackPtr = Marshal.GetFunctionPointerForDelegate(native2DCallback);
Native3DCallbackPtr = Marshal.GetFunctionPointerForDelegate(native3DCallback);
Expand Down
10 changes: 1 addition & 9 deletions Source/SharpDX.Direct3D9/SharpDX.Direct3D9.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.3</TargetFrameworks>
<PackageId>SharpDX.Direct3D9</PackageId>
<Product>SharpDX.Direct3D9</Product>
<AssemblyTitle>SharpDX.Direct3D9</AssemblyTitle>
<Title>SharpDX.Direct3D9</Title>
<Description>Assembly providing DirectX - Direct3D9 managed API.</Description>
<PackageTags>$(PackageTags) Direct3D9 D3D9</PackageTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.3</TargetFrameworks>
<PackageId>SharpDX.DirectComposition</PackageId>
<Product>SharpDX.DirectComposition</Product>
<AssemblyTitle>SharpDX.DirectComposition</AssemblyTitle>
<Title>SharpDX.DirectComposition</Title>
<Description>Assembly providing DirectX - DirectComposition managed API.</Description>
<PackageTags>$(PackageTags) DirectComposition DComposition</PackageTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
2 changes: 1 addition & 1 deletion Source/SharpDX.DirectInput/CustomDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private DataFormat GetDataFormat()
var dataObjects = new List<DataObjectFormat>();

IEnumerable<FieldInfo> fields;
#if NET45
#if NET45 || BEFORE_NET45
fields = typeof(TRaw).GetFields(BindingFlags.Public|BindingFlags.NonPublic|BindingFlags.Instance);
#elif NETCOREAPP1_0
fields = typeof(TRaw).GetTypeInfo().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
Expand Down
2 changes: 1 addition & 1 deletion Source/SharpDX.DirectInput/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void RunControlPanel(IntPtr parentHwnd)
public void SetNotification(WaitHandle eventHandle)
{
Microsoft.Win32.SafeHandles.SafeWaitHandle safeHandle;
#if NET45
#if NET45 || BEFORE_NET45
safeHandle = eventHandle?.SafeWaitHandle;
#else
safeHandle = eventHandle?.GetSafeWaitHandle();
Expand Down
10 changes: 1 addition & 9 deletions Source/SharpDX.DirectInput/SharpDX.DirectInput.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\SharpDX.props" />
<PropertyGroup>
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.3</TargetFrameworks>
<PackageId>SharpDX.DirectInput</PackageId>
<Product>SharpDX.DirectInput</Product>
<AssemblyTitle>SharpDX.DirectInput</AssemblyTitle>
<Title>SharpDX.DirectInput</Title>
<Description>Assembly providing DirectX - DirectInput managed API.</Description>
<PackageTags>$(PackageTags) DirectInput DInput</PackageTags>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
<SharpDXAppType>REFERENCE</SharpDXAppType>
</PropertyGroup>
<ItemGroup>
<None Include="Documentation\CodeComments.xml" />
<None Include="Mapping.xml" />
Expand Down
Loading

0 comments on commit 057f462

Please sign in to comment.