|
1 | 1 | <Project>
|
2 | 2 | <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
3 | 3 | <PropertyGroup>
|
4 |
| - <TargetFrameworks>net40</TargetFrameworks> |
| 4 | + <TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks> |
5 | 5 | <Platforms>AnyCPU</Platforms>
|
6 | 6 | <Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations>
|
7 | 7 | <AssetTargetFallback Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">net45</AssetTargetFallback>
|
|
16 | 16 | <GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
|
17 | 17 | <GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
|
18 | 18 | <OutputPath>bin\</OutputPath>
|
19 |
| - <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> |
20 |
| - <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile> |
| 19 | + <AppendTargetFrameworkToOutputPath Condition="'$(TargetFramework)'=='net40'">false</AppendTargetFrameworkToOutputPath> |
| 20 | + <DocumentationFile Condition="'$(TargetFramework)'=='net40'">$(OutputPath)\$(AssemblyName).xml</DocumentationFile> |
| 21 | + <DocumentationFile Condition="'$(TargetFramework)'!='net40'">$(OutputPath)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile> |
21 | 22 | <NoWarn>1591;NU1701</NoWarn>
|
22 | 23 | <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
23 |
| - <PythonBuildDir Condition=" '$(PythonBuildDir)' == '' ">$(SolutionDir)\bin\</PythonBuildDir> |
| 24 | + <PythonBuildDir Condition=" '$(PythonBuildDir)' == ''">$(SolutionDir)\bin\</PythonBuildDir> |
| 25 | + <PythonBuildDir Condition="'$(TargetFramework)'!='net40'">$(PythonBuildDir)$(TargetFramework)\</PythonBuildDir> |
| 26 | + <PublishDir Condition="'$(TargetFramework)'!='net40'">$(PythonBuildDir)</PublishDir> |
24 | 27 | <LangVersion>6</LangVersion>
|
25 | 28 | <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
26 | 29 | <AssemblyOriginatorKeyFile>..\pythonnet.snk</AssemblyOriginatorKeyFile>
|
27 | 30 | <CustomDefineConstants Condition="'$(CustomDefineConstants)' == ''">$(PYTHONNET_DEFINE_CONSTANTS)</CustomDefineConstants>
|
28 | 31 | <BaseDefineConstants>XPLAT</BaseDefineConstants>
|
29 | 32 | <DefineConstants>$(DefineConstants);$(CustomDefineConstants);$(BaseDefineConstants);</DefineConstants>
|
| 33 | + <DefineConstants Condition="'$(TargetFramework)'=='netcoreapp2.0'">$(DefineConstants);NETCOREAPP</DefineConstants> |
30 | 34 | <FrameworkPathOverride Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\</FrameworkPathOverride>
|
31 | 35 | </PropertyGroup>
|
32 | 36 |
|
|
98 | 102 | </EmbeddedResource>
|
99 | 103 | </ItemGroup>
|
100 | 104 |
|
| 105 | + <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'"> |
| 106 | + <PackageReference Include="System.Security.Permissions"> |
| 107 | + <Version>4.4.0</Version> |
| 108 | + </PackageReference> |
| 109 | + </ItemGroup> |
| 110 | + |
101 | 111 | <ItemGroup Condition="'$(TargetFramework)' == 'net40'">
|
102 | 112 | <Reference Include="Microsoft.CSharp" />
|
103 | 113 | </ItemGroup>
|
|
118 | 128 | <Exec Command="cp $(NuGetPackageRoot)/microsoft.targetingpack.netframework.v4.5/1.0.1/lib/net45/System.XML.dll $(NuGetPackageRoot)/microsoft.targetingpack.netframework.v4.5/1.0.1/lib/net45/System.Xml.dll" />
|
119 | 129 | </Target>
|
120 | 130 | <Target Name="AfterBuild">
|
121 |
| - <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> |
| 131 | + <Copy Condition="'$(TargetFramework)'=='net40'" SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> |
122 | 132 | <!--Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" /-->
|
123 | 133 | </Target>
|
124 | 134 | </Project>
|
0 commit comments