Add test assets for testing and tiny bugfix

This commit is contained in:
Krzysztof Wicher 2016-11-16 14:35:48 -08:00
parent 7edcf556d7
commit 8416085b3a
11 changed files with 283 additions and 3 deletions

View file

@ -0,0 +1,21 @@
using System;
namespace NSLib3
{
public class Lib3
{
#if NETCOREAPP1_0
public static void HelloNCA()
{
Console.WriteLine("Hello World from Lib3! (netcoreapp)");
}
#endif
#if NET451
public static void HelloNet451()
{
Console.WriteLine("Hello World from Lib3! (net45)");
}
#endif
}
}

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFrameworks>net451;netcoreapp1.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<EmbeddedResource Include="**\*.resx" />
<PackageReference Include="Microsoft.NET.Sdk">
<Version>1.0.0-alpha-20161104-2</Version>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.0.1</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">
<DefineConstants>$(DefineConstants);NETCOREAPP1_0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net451' ">
<DefineConstants>$(DefineConstants);NET451</DefineConstants>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>