Skip to content

Commit

Permalink
Add support for Lightweight Solution Load, #26
Browse files Browse the repository at this point in the history
  • Loading branch information
sboulema committed Nov 10, 2017
1 parent 500d23d commit c7718f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions TSVN/Helpers/FileHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ public static void SaveAllFiles()
/// <returns>File path</returns>
public static string GetPath()
{
if (Dte.SelectedItems.Item(1).ProjectItem != null)
if (Dte.ActiveWindow.Type == vsWindowType.vsWindowTypeSolutionExplorer &&
Dte.SelectedItems.Item(1).ProjectItem != null)
{
// Context menu in the Solution Explorer
return Dte.SelectedItems.Item(1).ProjectItem.FileNames[0];
}

// Context menu in the Code Editor
return Path.GetDirectoryName(Dte.SelectedItems.Item(1).Project.FullName);
return Dte.ActiveDocument.FullName;
}
}
}
2 changes: 1 addition & 1 deletion TSVN/source.extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="07fd7462-cd4b-433b-9ab5-8ad3ad87bc65" Version="3.9" Language="en-US" Publisher="Samir L. Boulema" />
<Identity Id="07fd7462-cd4b-433b-9ab5-8ad3ad87bc65" Version="4.0" Language="en-US" Publisher="Samir L. Boulema" />
<DisplayName>TSVN</DisplayName>
<Description>Control TortoiseSVN from within Visual Studio</Description>
<MoreInfo>https://visualstudiogallery.msdn.microsoft.com/64bfec35-0ac1-48bc-b9d0-921ecb803e53</MoreInfo>
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 3.9.{build}
version: 4.0.{build}
skip_tags: true

configuration:
Expand Down

0 comments on commit c7718f7

Please sign in to comment.