diff --git a/JsReportVSTools/Impl/ReportingServerManagerAdapter.cs b/JsReportVSTools/Impl/ReportingServerManagerAdapter.cs index 3bb05fa..74e5141 100644 --- a/JsReportVSTools/Impl/ReportingServerManagerAdapter.cs +++ b/JsReportVSTools/Impl/ReportingServerManagerAdapter.cs @@ -58,10 +58,10 @@ public string CurrentBinFolder private Project GetActiveProject(string fileName = null) { - if (_dte.ActiveDocument != null) - return _dte.ActiveDocument.ProjectItem.ContainingProject; + if (fileName != null) + return _dte.Solution.FindProjectItem(fileName).ContainingProject; - return _dte.Solution.FindProjectItem(fileName).ContainingProject; + return _dte.ActiveDocument.ProjectItem.ContainingProject; } public async Task EnsureStartedAsync(string fileName = null) @@ -88,6 +88,7 @@ public async Task EnsureStartedAsync(string fileName = null) } catch (Exception e) { + CurrentProject = null; _serverManager = null; Trace.TraceError("Failed to start jsreport server " + e); throw; diff --git a/JsReportVSTools/source.extension.vsixmanifest b/JsReportVSTools/source.extension.vsixmanifest index 781c12b..2ea13a9 100644 --- a/JsReportVSTools/source.extension.vsixmanifest +++ b/JsReportVSTools/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + jsreport visual studio tools beta Extension allowing to use jsreport open source reporting platform inside visual studio. It allows to create any pdf report you can think of without lame designers just using html and javascript. http://jsreport.net/