From dfb06880d2b87cebd185b15a0919d0a1758bb800 Mon Sep 17 00:00:00 2001 From: "honza.pofider@seznam.cz" Date: Wed, 10 Dec 2014 09:56:29 +0100 Subject: [PATCH] fixing opening .jsrep file when there was different file from another project opened before --- JsReportVSTools/Impl/ReportingServerManagerAdapter.cs | 7 ++++--- JsReportVSTools/source.extension.vsixmanifest | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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/