Skip to content

Instantly share code, notes, and snippets.

@MicahZoltu
Last active July 21, 2018 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MicahZoltu/62fa172a4a3e9bfa6083f77de1155111 to your computer and use it in GitHub Desktop.
Save MicahZoltu/62fa172a4a3e9bfa6083f77de1155111 to your computer and use it in GitHub Desktop.
Restore Repro
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootNamespace>App</RootNamespace>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
</PropertyGroup>
<ItemGroup>
<Compile Update="./Program.cs"/>
</ItemGroup>
</Project>
using System;
namespace App
{
class Program
{
static void Main(String[] args)
{
var program = new Program();
Console.WriteLine(program.Greeting());
}
public String Greeting()
{
return "Hello World!";
}
}
}
using Xunit;
using App;
namespace Tests
{
public class ProgramTests
{
[Fact]
public void ReturnsHello()
{
var program = new Program();
var expectedGreeting = "hello";
var actualGreeting = program.Greeting();
Assert.True(expectedGreeting == actualGreeting);
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootNamespace>Tests</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
<PackageReference Include="xunit" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="app.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="./Test.cs" />
</ItemGroup>
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment