Skip to content

Commit

Permalink
Merge pull request #282 from OmniSharp/Alxandr-master
Browse files Browse the repository at this point in the history
Alxandr master
  • Loading branch information
nosami committed Jul 31, 2015
2 parents 442b15e + 1ed7dc8 commit 579a068
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/OmniSharp/Dnx/DesignTimeHostManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,20 @@ public void Start(string hostId, Action<int> onConnected)
}

int port = GetFreePort();

var dthPath = Path.Combine(_paths.RuntimePath.Value, "bin", "lib", "Microsoft.Dnx.DesignTimeHost", "Microsoft.Dnx.DesignTimeHost.dll");
// TODO: This is for backcompat. Once the dust settles, and MS.Framework.DTH goes away, remove this.
if (!File.Exists(dthPath))
dthPath = Path.Combine(_paths.RuntimePath.Value, "bin", "lib", "Microsoft.Framework.DesignTimeHost", "Microsoft.Framework.DesignTimeHost.dll");

var psi = new ProcessStartInfo
{
FileName = _paths.Dnx ?? _paths.Klr,
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardError = true,
Arguments = string.Format(@"""{0}"" {1} {2} {3}",
Path.Combine(_paths.RuntimePath.Value, "bin", "lib", "Microsoft.Framework.DesignTimeHost", "Microsoft.Framework.DesignTimeHost.dll"),
dthPath,
port,
Process.GetCurrentProcess().Id,
hostId),
Expand Down
4 changes: 2 additions & 2 deletions tests/OmniSharp.Tests/DiagnosticsFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task CodeCheckSpecifiedFileOnly()
{ "a.cs", "class C { int n = true; }" }
});

var controller = new OmnisharpController(workspace, null);
var controller = new OmnisharpController(workspace, new FakeOmniSharpOptions());
var quickFixes = await controller.CodeCheck(new Request() { FileName = "a.cs" });

Assert.Equal(1, quickFixes.QuickFixes.Count());
Expand All @@ -32,7 +32,7 @@ public async Task CheckAllFiles()
{ "b.cs", "class C2 { int n = true; }" },
});

var controller = new OmnisharpController(workspace, null);
var controller = new OmnisharpController(workspace, new FakeOmniSharpOptions());
var quickFixes = await controller.CodeCheck(new Request());

Assert.Equal(2, quickFixes.QuickFixes.Count());
Expand Down

0 comments on commit 579a068

Please sign in to comment.