Skip to content

Commit

Permalink
Merge pull request #6 from Ravigneaux1/issue/1102
Browse files Browse the repository at this point in the history
Repro for issue #1102
  • Loading branch information
OsirisTerje authored Jul 4, 2023
2 parents 3a5669e + f29a060 commit e8f4bcc
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Issue1102/Issue1102.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33414.496
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp", "MyApp\MyApp.csproj", "{E57DC260-DF0C-48FF-9F1E-D3783F7A6819}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyApp.Tests.NUnit", "MyApp.Tests.NUnit\MyApp.Tests.NUnit.csproj", "{FABB63DB-A96F-46EB-8E59-8716F7C45D9A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyApp.Tests.MSTest", "MyApp.Tests.MSTest\MyApp.Tests.MSTest.csproj", "{38BF43CB-5E95-4FB5-93E0-0BD6E4C6C681}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E57DC260-DF0C-48FF-9F1E-D3783F7A6819}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E57DC260-DF0C-48FF-9F1E-D3783F7A6819}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E57DC260-DF0C-48FF-9F1E-D3783F7A6819}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E57DC260-DF0C-48FF-9F1E-D3783F7A6819}.Release|Any CPU.Build.0 = Release|Any CPU
{FABB63DB-A96F-46EB-8E59-8716F7C45D9A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FABB63DB-A96F-46EB-8E59-8716F7C45D9A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FABB63DB-A96F-46EB-8E59-8716F7C45D9A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FABB63DB-A96F-46EB-8E59-8716F7C45D9A}.Release|Any CPU.Build.0 = Release|Any CPU
{38BF43CB-5E95-4FB5-93E0-0BD6E4C6C681}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38BF43CB-5E95-4FB5-93E0-0BD6E4C6C681}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38BF43CB-5E95-4FB5-93E0-0BD6E4C6C681}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38BF43CB-5E95-4FB5-93E0-0BD6E4C6C681}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9D16BE44-66D5-4D92-A8F8-0B13F904DD40}
EndGlobalSection
EndGlobal
22 changes: 22 additions & 0 deletions Issue1102/MyApp.Tests.MSTest/MyApp.Tests.MSTest.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MyApp\MyApp.csproj" />
</ItemGroup>

</Project>
13 changes: 13 additions & 0 deletions Issue1102/MyApp.Tests.MSTest/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace MyApp.Tests.MSTest
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Program.Main(new string[] { });
Assert.IsTrue(true);
}
}
}
1 change: 1 addition & 0 deletions Issue1102/MyApp.Tests.MSTest/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using Microsoft.VisualStudio.TestTools.UnitTesting;
23 changes: 23 additions & 0 deletions Issue1102/MyApp.Tests.NUnit/MyApp.Tests.NUnit.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MyApp\MyApp.csproj" />
</ItemGroup>

</Project>
17 changes: 17 additions & 0 deletions Issue1102/MyApp.Tests.NUnit/UnitTest1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace MyApp.Tests.NUnit
{
public class Tests
{
[SetUp]
public void Setup()
{
}

[Test]
public void Test1()
{
Program.Main(new string[] { });
Assert.Pass();
}
}
}
1 change: 1 addition & 0 deletions Issue1102/MyApp.Tests.NUnit/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using NUnit.Framework;
18 changes: 18 additions & 0 deletions Issue1102/MyApp/MyApp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="MyApp.Tests.NUnit"/>
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="MyApp.Tests.MSTest"/>
</ItemGroup>

</Project>
11 changes: 11 additions & 0 deletions Issue1102/MyApp/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace MyApp
{
internal class Program
{
internal static void Main(string[] args)
{
Console.WriteLine("Hello, world!");
Console.Error.WriteLine("Hello, error stream!");
}
}
}

0 comments on commit e8f4bcc

Please sign in to comment.