Skip to content

Commit

Permalink
Refresh.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe Gyllebring committed May 7, 2019
1 parent 0f5dcd3 commit c3182ea
Show file tree
Hide file tree
Showing 11 changed files with 2,644 additions and 21 deletions.
4 changes: 3 additions & 1 deletion Cone.nuspec
Expand Up @@ -18,11 +18,13 @@ Say no to FluentCobol, say hello to Check.That(() => actual == expected);
<releaseNotes>Let's get this NuGet party started.</releaseNotes>
<projectUrl>https://github.com/drunkcod/Cone</projectUrl>
<tags></tags>
<dependencies>
<dependency id="Newtonsoft.Json" version="11.*" />
</dependencies>
</metadata>
<files>
<file src="Build\Cone\$Configuration$\**" target="lib\" />
<file src="dotnet-conesole.targets" target="build\Cone.targets" />
<file src="dotnet-conesole.targets" target="buildMultiTargeting\Cone.targets" />

</files>
</package>
5 changes: 3 additions & 2 deletions Source/Cone.TestAdapter/Cone.TestAdapter.csproj
Expand Up @@ -7,9 +7,10 @@
<Compile Include="..\Version.cs" Link="Version.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="15.7.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="16.0.1" PrivateAssets="All" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
<ProjectReference Include="..\Cone\Cone.csproj" PrivateAssets="All" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
2 changes: 1 addition & 1 deletion Source/Cone.Worker/Cone.Worker.csproj
Expand Up @@ -2,7 +2,7 @@
<Import Project="$(SolutionDir)\Cone.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net45;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net45;net462;netcoreapp2.0;netcoreapp2.1;netcoreapp2.2</TargetFrameworks>
<ApplicationIcon />
<StartupObject />
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions Source/Cone.Worker/Program.cs
Expand Up @@ -28,7 +28,7 @@ static int Main(string[] args)
static string GetConePath(string workingDir) => Path.Combine(workingDir, "Cone.dll");

static bool RanInTestDomain(string target, string workingDir, string[] args, out int result) {
#if NET45
#if NET45 || NET462
var targetConfig = target + ".config";
if(!File.Exists(targetConfig) || !AppDomain.CurrentDomain.IsDefaultAppDomain()) {
result = 0;
Expand All @@ -46,7 +46,7 @@ static int Main(string[] args)
new System.Security.PermissionSet(System.Security.Permissions.PermissionState.Unrestricted));
result = testDomain.ExecuteAssembly(new Uri(typeof(Program).Assembly.CodeBase).LocalPath, args);
return true;
#elif NETCOREAPP2_0 || NETCOREAPP2_1
#elif NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2
result = 0;
return false;
#endif
Expand Down
5 changes: 4 additions & 1 deletion Source/Cone/Cone.csproj
Expand Up @@ -2,10 +2,13 @@
<Import Project="$(SolutionDir)\Cone.props" />
<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<TargetFrameworkFamily Condition="$(TargetFramework.StartsWith('netstandard'))">NETSTANDARD</TargetFrameworkFamily>
<TargetFrameworkFamily Condition="$(TargetFramework.StartsWith('net4'))">NETFX</TargetFrameworkFamily>
<DefineConstants>$(DefineConstants);$(TargetFrameworkFamily)</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Version.cs" Link="Version.cs" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<ProjectReference Include="..\Cone.Expectations\Cone.Expectations.csproj" />
</ItemGroup>

Expand Down
13 changes: 6 additions & 7 deletions Source/Cone/Core/AssemblyLoader.cs
Expand Up @@ -7,16 +7,15 @@
namespace Cone.Core
{
using System.IO;
#if NET45
#if NETFX
static class AssemblyLoader
{
public static Assembly LoadFrom(string path) {
Console.WriteLine($"Loading {path}");
return Assembly.LoadFrom(path);
}
public static Assembly LoadFrom(string path) =>
Assembly.LoadFrom(path);

public static void InitDeps(string mainAssembly) { }
}

#else
using System.Runtime.Loader;
using Microsoft.DotNet.PlatformAbstractions;
Expand All @@ -39,12 +38,12 @@ public void Load(DependencyItem dep)
try {
var loaded = Default.LoadFromAssemblyPath(dep.Path);
knownAssemblies.Add(loaded.GetName(), loaded);
} catch(Exception ex) {
} catch {
LoadingLog?.WriteLine($"Ooops when loading {dep.Path}");
}
} else try {
LoadUnmanagedDllFromPath(dep.Path);
}catch(Exception ex) {
}catch {
LoadingLog?.WriteLine($"Ooops when loading {dep.Path}");
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Conesole/Conesole.csproj
Expand Up @@ -24,7 +24,7 @@
<EmbeddedResource Include="Usage.txt" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.Net.Http" Version="4.3.3" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cone\Cone.csproj" />
Expand Down
4 changes: 2 additions & 2 deletions Source/Version.cs
Expand Up @@ -2,5 +2,5 @@
using System.Runtime.InteropServices;

[assembly: ComVisible(false)]
[assembly: AssemblyVersion("2018.08.02")]
[assembly: AssemblyInformationalVersion("2018.08.02")]
[assembly: AssemblyVersion("2019.05.07")]
[assembly: AssemblyInformationalVersion("2019.05.07")]
6 changes: 4 additions & 2 deletions Source/dotnet-conesole/Program.cs
Expand Up @@ -112,15 +112,17 @@ static int RunConesole(string fxVersion, IEnumerable<string> args)
case "net452":
case "net46":
case "net461":
return (Path.Combine(probePath, "net45", "Cone.Worker.exe"), false);
case "net462":
case "net47":
case "net471":
case "net472":
return (Path.Combine(probePath, "net45", "Cone.Worker.exe"), false);
return (Path.Combine(probePath, "net462", "Cone.Worker.exe"), false);
case "netcoreapp2.0":
case "netcoreapp2.1":
return (Path.Combine(probePath, fxVersion, "Cone.Worker.dll"), true);
}
return (Path.Combine(probePath, "netcoreapp2.1", "Cone.Worker.dll"), true);
return (Path.Combine(probePath, "netcoreapp2.2", "Cone.Worker.dll"), true);
}

static TargetCollection GetTargetInfo(CommandSettings settings) {
Expand Down
4 changes: 2 additions & 2 deletions Specs/Cone.Specs/Cone.Specs.csproj
Expand Up @@ -13,8 +13,8 @@
<Compile Remove="NetFramework\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
<PackageReference Include="Moq" Version="4.8.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Moq" Version="4.10.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Source\Cone\Cone.csproj" />
Expand Down

0 comments on commit c3182ea

Please sign in to comment.