Skip to content

Commit

Permalink
Fixing assembly root dir resolution for non windows
Browse files Browse the repository at this point in the history
  • Loading branch information
neilcampbell committed Aug 20, 2017
1 parent 4a853f3 commit bd082cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions PactNet/Core/PactCoreHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ internal class PactCoreHost<T> : IPactCoreHost where T : IPactCoreHostConfig
public PactCoreHost(T config)
{
_config = config;

var currentDir = Directory.GetCurrentDirectory();
var pactCoreDir = $"{currentDir}{Path.DirectorySeparatorChar}"; //OS specific version will be appended

var expectedPackage = String.Empty;

#if USE_NET4X
var pactCoreDir = $"{Directory.GetCurrentDirectory()}{Path.DirectorySeparatorChar}"; //OS specific version will be appended
pactCoreDir += "pact-win32";
expectedPackage = "PactNet-Windows";
#else
var pactCoreDir = $"{AppContext.BaseDirectory}{Path.DirectorySeparatorChar}"; //OS specific version will be appended

if (System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows))
{
pactCoreDir += "pact-win32";
Expand Down

0 comments on commit bd082cd

Please sign in to comment.