|
2 | 2 | <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
3 | 3 |
|
4 | 4 | <PropertyGroup>
|
5 |
| - <TargetFrameworks>net40</TargetFrameworks> |
| 5 | + <TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks> |
6 | 6 | <Platforms>x64;x86</Platforms>
|
7 | 7 | <Configurations>DebugMono;DebugMonoPY3;ReleaseMono;ReleaseMonoPY3;DebugWin;DebugWinPY3;ReleaseWin;ReleaseWinPY3</Configurations>
|
8 |
| - <AssetTargetFallback Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">net45</AssetTargetFallback> |
| 8 | + <OutputType Condition="'$(TargetFramework)' != 'net40' OR '$(PYTHONNET_VS_ENV)' == 'true'">Exe</OutputType> |
| 9 | + <GenerateProgramFile>false</GenerateProgramFile> |
9 | 10 | <AssemblyName>Python.EmbeddingTest</AssemblyName>
|
10 | 11 | <RootNamespace>Python.EmbeddingTest</RootNamespace>
|
11 | 12 | <PackageId>Python.EmbeddingTest</PackageId>
|
|
15 | 16 | <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
16 | 17 | <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
17 | 18 | <OutputPath>bin\</OutputPath>
|
18 |
| - <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> |
19 |
| - <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> |
20 | 22 | <NoWarn>1591</NoWarn>
|
21 | 23 | <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
|
22 |
| - <PythonBuildDir Condition=" '$(PythonBuildDir)' == '' ">$(SolutionDir)\bin\</PythonBuildDir> |
| 24 | + <PythonBuildDir Condition="'$(TargetFramework)'=='net40' AND '$(PythonBuildDir)' == ''">$(SolutionDir)\bin\</PythonBuildDir> |
| 25 | + <PublishDir Condition="'$(TargetFramework)'!='net40'">$(OutputPath)\$(TargetFramework)_publish</PublishDir> |
23 | 26 | <LangVersion>6</LangVersion>
|
24 | 27 | <ErrorReport>prompt</ErrorReport>
|
25 | 28 | <CustomDefineConstants Condition="'$(CustomDefineConstants)' == ''">$(PYTHONNET_DEFINE_CONSTANTS)</CustomDefineConstants>
|
26 | 29 | <BaseDefineConstants>XPLAT</BaseDefineConstants>
|
27 | 30 | <DefineConstants>$(DefineConstants);$(CustomDefineConstants);$(BaseDefineConstants);</DefineConstants>
|
| 31 | + <DefineConstants Condition="'$(TargetFramework)'=='netcoreapp2.0'">$(DefineConstants);NETCOREAPP</DefineConstants> |
28 | 32 | <DefineConstants Condition="'$(BuildingInsideVisualStudio)' == 'true' AND '$(CustomDefineConstants)' != '' AND $(Configuration.Contains('Debug'))">$(DefineConstants);TRACE;DEBUG</DefineConstants>
|
29 | 33 | <FrameworkPathOverride Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\</FrameworkPathOverride>
|
30 | 34 | </PropertyGroup>
|
|
88 | 92 | <ItemGroup>
|
89 | 93 | <PackageReference Include="NUnit" Version="3.7.1" />
|
90 | 94 | <PackageReference Include="NUnit.ConsoleRunner" Version="3.7.0" />
|
| 95 | + <PackageReference Include="NUnit3TestAdapter" Version="3.8.0" /> |
| 96 | + <PackageReference Include="NUnitLite" Version="3.7.2" /> |
| 97 | + </ItemGroup> |
| 98 | + <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'"> |
| 99 | + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> |
91 | 100 | </ItemGroup>
|
92 | 101 |
|
93 | 102 | <ItemGroup>
|
|
114 | 123 | </PropertyGroup>
|
115 | 124 |
|
116 | 125 | <Target Name="AfterBuild">
|
117 |
| - <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> |
| 126 | + <Copy Condition="'$(TargetFramework)'=='net40'" SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> |
118 | 127 | <!--Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" /-->
|
119 | 128 | </Target>
|
120 | 129 |
|
|
0 commit comments