|
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 | <FrameworkPathOverride Condition="'$(TargetFramework)'=='net40' AND $(Configuration.Contains('Mono'))">$(NuGetPackageRoot)\microsoft.targetingpack.netframework.v4.5\1.0.1\lib\net45\</FrameworkPathOverride> |
29 | 33 | </PropertyGroup> |
30 | 34 | <PropertyGroup Condition=" '$(Platform)' == 'x86'"> |
|
87 | 91 | <ItemGroup> |
88 | 92 | <PackageReference Include="NUnit" Version="3.7.1" /> |
89 | 93 | <PackageReference Include="NUnit.ConsoleRunner" Version="3.7.0" /> |
| 94 | + <PackageReference Include="NUnit3TestAdapter" Version="3.8.0" /> |
| 95 | + <PackageReference Include="NUnitLite" Version="3.7.2" /> |
| 96 | + </ItemGroup> |
| 97 | + <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'"> |
| 98 | + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> |
90 | 99 | </ItemGroup> |
91 | | - |
92 | 100 | <ItemGroup> |
93 | 101 | <ProjectReference Include="..\runtime\Python.Runtime.15.csproj" /> |
94 | 102 | </ItemGroup> |
|
113 | 121 | </PropertyGroup> |
114 | 122 |
|
115 | 123 | <Target Name="AfterBuild"> |
116 | | - <Copy SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> |
| 124 | + <Copy Condition="'$(TargetFramework)'=='net40'" SourceFiles="$(TargetAssembly)" DestinationFolder="$(PythonBuildDir)" /> |
117 | 125 | <!--Copy SourceFiles="$(TargetAssemblyPdb)" Condition="Exists('$(TargetAssemblyPdb)')" DestinationFolder="$(PythonBuildDir)" /--> |
118 | 126 | </Target> |
119 | 127 |
|
|
0 commit comments