File tree Expand file tree Collapse file tree 3 files changed +26
-15
lines changed
Expand file tree Collapse file tree 3 files changed +26
-15
lines changed Original file line number Diff line number Diff line change @@ -33,24 +33,33 @@ public static string GetMSysGit()
3333 /// <returns>Path to the base repository/solution dir</returns>
3434 public static async Task < string > GetSolutionDir ( )
3535 {
36- var solution = await VS . Solutions . GetCurrentSolutionAsync ( ) ;
36+ try
37+ {
38+ var solution = await VS . Solutions . GetCurrentSolutionAsync ( ) ;
3739
38- var filePath = solution ? . FullPath ;
40+ var filePath = solution ? . FullPath ;
3941
40- if ( string . IsNullOrEmpty ( filePath ) )
41- {
42- return string . Empty ;
43- }
42+ if ( string . IsNullOrEmpty ( filePath ) )
43+ {
44+ return string . Empty ;
45+ }
4446
45- if ( File . Exists ( filePath ) )
46- {
47- var path = Path . GetDirectoryName ( filePath ) ;
48- return await FindGitdir ( path ) ;
49- }
47+ if ( File . Exists ( filePath ) )
48+ {
49+ var path = Path . GetDirectoryName ( filePath ) ;
50+ return await FindGitdir ( path ) ;
51+ }
52+
53+ if ( Directory . Exists ( filePath ) )
54+ {
55+ return await FindGitdir ( filePath ) ;
56+ }
5057
51- if ( Directory . Exists ( filePath ) )
58+ return string . Empty ;
59+ }
60+ catch ( Exception )
5261 {
53- return await FindGitdir ( filePath ) ;
62+ // No open solution
5463 }
5564
5665 return string . Empty ;
Original file line number Diff line number Diff line change 11using Community . VisualStudio . Toolkit ;
22using System . ComponentModel ;
3+ using System . Runtime . InteropServices ;
34
45namespace SamirBoulema . TGit
56{
67 internal partial class OptionsProvider
78 {
9+ [ ComVisible ( true ) ]
810 public class GeneralOptions : BaseOptionPage < General > { }
911 }
1012
Original file line number Diff line number Diff line change 351351 </ItemGroup >
352352 <ItemGroup >
353353 <PackageReference Include =" Community.VisualStudio.Toolkit.15" >
354- <Version >15.0.339 </Version >
354+ <Version >15.0.445 </Version >
355355 </PackageReference >
356356 <PackageReference Include =" Community.VisualStudio.VSCT" >
357357 <Version >16.0.29.6</Version >
358358 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
359359 <PrivateAssets >all</PrivateAssets >
360360 </PackageReference >
361361 <PackageReference Include =" Microsoft.VSSDK.BuildTools" >
362- <Version >17.0.5232 </Version >
362+ <Version >17.1.4057 </Version >
363363 <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
364364 <PrivateAssets >all</PrivateAssets >
365365 </PackageReference >
You can’t perform that action at this time.
0 commit comments