Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add net core test (skipping for now) #238

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Confuser2.sln
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IncorrectRedirectToGac", "T
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IncorrectRedirectToGac.Test", "Tests\IncorrectRedirectToGac.Test\IncorrectRedirectToGac.Test.csproj", "{B7FF0EE8-6C68-46C6-AADB-58C0E3309FB2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetCore.Test", "Tests\NetCore.Test\NetCore.Test.csproj", "{148B6251-FF1F-491F-A1C2-6F1D39AEA361}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetCore", "Tests\NetCore\NetCore.csproj", "{89E07BFD-D11F-44DA-9CC3-AFA08184D651}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -258,6 +262,14 @@ Global
{B7FF0EE8-6C68-46C6-AADB-58C0E3309FB2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7FF0EE8-6C68-46C6-AADB-58C0E3309FB2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7FF0EE8-6C68-46C6-AADB-58C0E3309FB2}.Release|Any CPU.Build.0 = Release|Any CPU
{148B6251-FF1F-491F-A1C2-6F1D39AEA361}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{148B6251-FF1F-491F-A1C2-6F1D39AEA361}.Debug|Any CPU.Build.0 = Debug|Any CPU
{148B6251-FF1F-491F-A1C2-6F1D39AEA361}.Release|Any CPU.ActiveCfg = Release|Any CPU
{148B6251-FF1F-491F-A1C2-6F1D39AEA361}.Release|Any CPU.Build.0 = Release|Any CPU
{89E07BFD-D11F-44DA-9CC3-AFA08184D651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89E07BFD-D11F-44DA-9CC3-AFA08184D651}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89E07BFD-D11F-44DA-9CC3-AFA08184D651}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89E07BFD-D11F-44DA-9CC3-AFA08184D651}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -294,6 +306,8 @@ Global
{87BEF4D7-813E-48BA-96FE-E3A24BF2DC34} = {356BDB31-853E-43BB-8F9A-D8AC08F69EBB}
{9B823D93-BF1B-407B-A4CD-231347F656AD} = {356BDB31-853E-43BB-8F9A-D8AC08F69EBB}
{B7FF0EE8-6C68-46C6-AADB-58C0E3309FB2} = {356BDB31-853E-43BB-8F9A-D8AC08F69EBB}
{148B6251-FF1F-491F-A1C2-6F1D39AEA361} = {356BDB31-853E-43BB-8F9A-D8AC08F69EBB}
{89E07BFD-D11F-44DA-9CC3-AFA08184D651} = {356BDB31-853E-43BB-8F9A-D8AC08F69EBB}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0D937D9E-E04B-4A68-B639-D4260473A388}
Expand Down
2 changes: 1 addition & 1 deletion Tests/Confuser.UnitTest/Confuser.UnitTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Import Project="..\ConfuserEx.Common.props" Condition="Exists('..\ConfuserEx.Common.props')" />

<PropertyGroup Label="Assembly Settings">
<TargetFramework>net461</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup Label="Nuget Dependencies">
Expand Down
15 changes: 15 additions & 0 deletions Tests/NetCore.Test/NetCore.Test.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup Label="Nuget Dependencies">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Confuser.UnitTest\Confuser.UnitTest.csproj" />
<ProjectReference Include="..\NetCore\NetCore.csproj" />
</ItemGroup>
</Project>
14 changes: 14 additions & 0 deletions Tests/NetCore.Test/NetCoreTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Threading.Tasks;
using Confuser.UnitTest;
using Xunit;
using Xunit.Abstractions;

namespace NetCore.Test {
public class NetCoreTest : TestBase {
public NetCoreTest(ITestOutputHelper outputHelper) : base(outputHelper) { }

[Fact(Skip = "TODO: fix https://github.com/mkaring/ConfuserEx/issues/106 and other related")]
public async Task NetCore() =>
await Run("NetCore.dll", new string[0], null);
}
}
11 changes: 11 additions & 0 deletions Tests/NetCore/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace NetCore {
public class Class1 {
public int GetARandomInt() {
object o = null;
var test = o?.GetType()?.Name;
return new Random().Next();
}
}
}
7 changes: 7 additions & 0 deletions Tests/NetCore/NetCore.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

</Project>
11 changes: 11 additions & 0 deletions Tests/NetCore/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace NetCore {
public class Program {
static int Main(string[] args) {
Console.WriteLine("START");
Console.WriteLine("END");
return 42;
}
}
}
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: '{build}'
image: Visual Studio 2017
image: Visual Studio 2019
configuration: Release
platform: Any CPU
skip_commits:
Expand Down