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

Commit 057f462

Browse files
committed
Add support for net40 target (issue #877)
1 parent 56eaf4a commit 057f462

60 files changed

Lines changed: 210 additions & 341 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Build/SharpDX.targets

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
<Project>
2+
3+
<PropertyGroup Condition=" '$(TargetFramework)' == 'net40' ">
4+
<DefineConstants>$(DefineConstants);DESKTOP_APP;BEFORE_NET45</DefineConstants>
5+
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
6+
</PropertyGroup>
7+
8+
<PropertyGroup Condition="'$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
9+
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
10+
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
11+
</PropertyGroup>
12+
13+
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
14+
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
15+
<SharpDXAppType>STORE_APP</SharpDXAppType>
16+
</PropertyGroup>
17+
18+
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' OR '$(TargetFramework)' == 'netstandard1.3'">
19+
<SharpDXAppType>REFERENCE</SharpDXAppType>
20+
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
21+
</PropertyGroup>
22+
223
<Target Name="PatchAssembly" AfterTargets="AfterBuild">
324
<Exec Command="&quot;$(SolutionDir)\Source\Bin\SharpCLI.exe&quot; &quot;$(TargetPath)&quot;" />
425

Source/SharpDX.Animation/SharpDX.Animation.csproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Build\SharpDX.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1</TargetFrameworks>
4+
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1</TargetFrameworks>
55
<PackageId>SharpDX.Animation</PackageId>
66
<Product>SharpDX.Animation</Product>
77
<AssemblyTitle>SharpDX.Animation</AssemblyTitle>
88
<Title>SharpDX.Animation</Title>
99
<Description>Assembly providing DirectX - Animation managed API.</Description>
1010
</PropertyGroup>
11-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
12-
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
13-
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
14-
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
16-
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
17-
<SharpDXAppType>REFERENCE</SharpDXAppType>
18-
</PropertyGroup>
1911
<ItemGroup>
2012
<None Include="Documentation\CodeComments.xml" />
2113
<None Include="Mapping.xml" />

Source/SharpDX.D3DCompiler/SharpDX.D3DCompiler.csproj

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Build\SharpDX.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
4+
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
55
<PackageId>SharpDX.D3DCompiler</PackageId>
66
<Product>SharpDX.D3DCompiler</Product>
77
<AssemblyTitle>SharpDX.D3DCompiler</AssemblyTitle>
88
<Title>SharpDX.D3DCompiler</Title>
99
<Description>Assembly providing DirectX - D3DCompiler managed API.</Description>
1010
</PropertyGroup>
11-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
12-
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
13-
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
14-
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
16-
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
17-
<SharpDXAppType>STORE_APP</SharpDXAppType>
18-
</PropertyGroup>
19-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
20-
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
21-
<SharpDXAppType>REFERENCE</SharpDXAppType>
22-
</PropertyGroup>
2311
<ItemGroup>
2412
<None Include="Documentation\CodeComments.xml" />
2513
<None Include="Mapping.xml" />

Source/SharpDX.DXGI/SharpDX.DXGI.csproj

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Build\SharpDX.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
4+
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
55
<PackageId>SharpDX.DXGI</PackageId>
66
<Product>SharpDX.DXGI</Product>
77
<AssemblyTitle>SharpDX.DXGI</AssemblyTitle>
88
<Title>SharpDX.DXGI</Title>
99
<Description>Assembly providing DirectX - DXGI managed API.</Description>
1010
<PackageTags>$(PackageTags) DXGI</PackageTags>
1111
</PropertyGroup>
12-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
13-
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
14-
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
17-
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
18-
<SharpDXAppType>STORE_APP</SharpDXAppType>
19-
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
21-
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
22-
<SharpDXAppType>REFERENCE</SharpDXAppType>
23-
</PropertyGroup>
2412
<ItemGroup>
2513
<None Include="Documentation\CodeComments.xml" />
2614
<None Include="Mapping.xml" />

Source/SharpDX.Desktop/SharpDX.Desktop.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Build\SharpDX.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net45</TargetFrameworks>
4+
<TargetFrameworks>net40;net45</TargetFrameworks>
55
<PackageId>SharpDX.Desktop</PackageId>
66
<Product>SharpDX.Desktop</Product>
77
<AssemblyTitle>SharpDX.Desktop</AssemblyTitle>
88
<Title>SharpDX.Desktop</Title>
99
<Description>Assembly providing APIs related to Desktop platform.</Description>
1010
</PropertyGroup>
11-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' ">
12-
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
13-
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
14-
</PropertyGroup>
1511
<ItemGroup>
1612
<None Include="Documentation\CodeComments.xml" />
1713
<Compile Include="..\SharedAssemblyInfo.cs">

Source/SharpDX.Direct2D1/CustomEffectFactory.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ public string ToXml()
8787
private void InitializeBindings()
8888
{
8989
var bindings = new List<PropertyBinding>();
90+
#if BEFORE_NET45
91+
foreach (var propertyInfo in customEffectType.GetTypeInfo().GetProperties(BindingFlags.Public|BindingFlags.Instance))
92+
#else
9093
foreach (var propertyInfo in customEffectType.GetTypeInfo().DeclaredProperties)
94+
#endif
9195
{
9296
var binding = PropertyBinding.Get(customEffectType, propertyInfo);
9397
if (binding != null)

Source/SharpDX.Direct2D1/SharpDX.Direct2D1.csproj

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Build\SharpDX.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
4+
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
55
<PackageId>SharpDX.Direct2D1</PackageId>
66
<Product>SharpDX.Direct2D1</Product>
77
<AssemblyTitle>SharpDX.Direct2D1</AssemblyTitle>
88
<Title>SharpDX.Direct2D1</Title>
99
<Description>Assembly providing DirectX - Direct2D, DirectWrite and WIC managed API.</Description>
1010
<PackageTags>$(PackageTags) 3D Direct2D D2D DirectWrite DWrite WIC</PackageTags>
1111
</PropertyGroup>
12-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
13-
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
14-
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
17-
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
18-
<SharpDXAppType>STORE_APP</SharpDXAppType>
19-
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
21-
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
22-
<SharpDXAppType>REFERENCE</SharpDXAppType>
23-
</PropertyGroup>
2412
<ItemGroup>
2513
<None Include="Documentation\CodeComments.xml" />
2614
<None Include="Mapping.xml" />

Source/SharpDX.Direct3D10/SharpDX.Direct3D10.csproj

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Build\SharpDX.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
4+
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
55
<PackageId>SharpDX.Direct3D10</PackageId>
66
<Product>SharpDX.Direct3D10</Product>
77
<AssemblyTitle>SharpDX.Direct3D10</AssemblyTitle>
88
<Title>SharpDX.Direct3D10</Title>
99
<Description>Assembly providing DirectX - Direct3D10 and Direct3D10.1 managed API.</Description>
1010
<PackageTags>$(PackageTags) Direct3D10 D3D10</PackageTags>
1111
</PropertyGroup>
12-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
13-
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
14-
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
17-
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
18-
<SharpDXAppType>STORE_APP</SharpDXAppType>
19-
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
21-
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
22-
<SharpDXAppType>REFERENCE</SharpDXAppType>
23-
</PropertyGroup>
2412
<ItemGroup>
2513
<None Include="Documentation\CodeComments.xml" />
2614
<None Include="Mapping.xml" />

Source/SharpDX.Direct3D11.Effects/SharpDX.Direct3D11.Effects.csproj

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Build\SharpDX.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
4+
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
55
<PackageId>SharpDX.Direct3D11.Effects</PackageId>
66
<Product>SharpDX.Direct3D11.Effects</Product>
77
<AssemblyTitle>SharpDX.Direct3D11.Effects</AssemblyTitle>
@@ -10,18 +10,6 @@
1010
<PackageTags>$(PackageTags) 3D Direct3D11 D3D11 Effects11</PackageTags>
1111
<RuntimeIdentifiers>win-x86;win-x64;win8-arm</RuntimeIdentifiers>
1212
</PropertyGroup>
13-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
14-
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
15-
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
16-
</PropertyGroup>
17-
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
18-
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
19-
<SharpDXAppType>STORE_APP</SharpDXAppType>
20-
</PropertyGroup>
21-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
22-
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
23-
<SharpDXAppType>REFERENCE</SharpDXAppType>
24-
</PropertyGroup>
2513
<ItemGroup>
2614
<None Include="Documentation\CodeComments.xml" />
2715
<None Include="Mapping.xml" />

Source/SharpDX.Direct3D11/SharpDX.Direct3D11.csproj

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Build\SharpDX.props" />
33
<PropertyGroup>
4-
<TargetFrameworks>net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
4+
<TargetFrameworks>net40;net45;netcoreapp1.0;netstandard1.1;uap10.0</TargetFrameworks>
55
<PackageId>SharpDX.Direct3D11</PackageId>
66
<Product>SharpDX.Direct3D11</Product>
77
<AssemblyTitle>SharpDX.Direct3D11</AssemblyTitle>
88
<Title>SharpDX.Direct3D11</Title>
99
<Description>Assembly providing DirectX - Direct3D11, Direct3D11.1 and Effects11 managed API.</Description>
1010
<PackageTags>$(PackageTags) 3D Direct3D11 D3D11 Effects11</PackageTags>
1111
</PropertyGroup>
12-
<PropertyGroup Condition=" '$(TargetFramework)' == 'net45' OR '$(TargetFramework)' == 'netcoreapp1.0' ">
13-
<DefineConstants>$(DefineConstants);DESKTOP_APP</DefineConstants>
14-
<SharpDXAppType>DESKTOP_APP</SharpDXAppType>
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(TargetFramework)' == 'uap10.0' ">
17-
<DefineConstants>$(DefineConstants);STORE_APP;WINDOWS_API_SET</DefineConstants>
18-
<SharpDXAppType>STORE_APP</SharpDXAppType>
19-
</PropertyGroup>
20-
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' ">
21-
<DefineConstants>$(DefineConstants);REFERENCE</DefineConstants>
22-
<SharpDXAppType>REFERENCE</SharpDXAppType>
23-
</PropertyGroup>
2412
<ItemGroup>
2513
<None Include="Documentation\CodeComments.xml" />
2614
<None Include="Mapping.xml" />

0 commit comments

Comments
 (0)