Commit 2d97bfb Samir Boulema
committed
1 parent bea5957 commit 2d97bfb Copy full SHA for 2d97bfb
File tree 3 files changed +26
-15
lines changed
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()
33
33
/// <returns>Path to the base repository/solution dir</returns>
34
34
public static async Task < string > GetSolutionDir ( )
35
35
{
36
- var solution = await VS . Solutions . GetCurrentSolutionAsync ( ) ;
36
+ try
37
+ {
38
+ var solution = await VS . Solutions . GetCurrentSolutionAsync ( ) ;
37
39
38
- var filePath = solution ? . FullPath ;
40
+ var filePath = solution ? . FullPath ;
39
41
40
- if ( string . IsNullOrEmpty ( filePath ) )
41
- {
42
- return string . Empty ;
43
- }
42
+ if ( string . IsNullOrEmpty ( filePath ) )
43
+ {
44
+ return string . Empty ;
45
+ }
44
46
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
+ }
50
57
51
- if ( Directory . Exists ( filePath ) )
58
+ return string . Empty ;
59
+ }
60
+ catch ( Exception )
52
61
{
53
- return await FindGitdir ( filePath ) ;
62
+ // No open solution
54
63
}
55
64
56
65
return string . Empty ;
Original file line number Diff line number Diff line change 1
1
using Community . VisualStudio . Toolkit ;
2
2
using System . ComponentModel ;
3
+ using System . Runtime . InteropServices ;
3
4
4
5
namespace SamirBoulema . TGit
5
6
{
6
7
internal partial class OptionsProvider
7
8
{
9
+ [ ComVisible ( true ) ]
8
10
public class GeneralOptions : BaseOptionPage < General > { }
9
11
}
10
12
Original file line number Diff line number Diff line change 351
351
</ItemGroup >
352
352
<ItemGroup >
353
353
<PackageReference Include =" Community.VisualStudio.Toolkit.15" >
354
- <Version >15.0.339 </Version >
354
+ <Version >15.0.445 </Version >
355
355
</PackageReference >
356
356
<PackageReference Include =" Community.VisualStudio.VSCT" >
357
357
<Version >16.0.29.6</Version >
358
358
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
359
359
<PrivateAssets >all</PrivateAssets >
360
360
</PackageReference >
361
361
<PackageReference Include =" Microsoft.VSSDK.BuildTools" >
362
- <Version >17.0.5232 </Version >
362
+ <Version >17.1.4057 </Version >
363
363
<IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
364
364
<PrivateAssets >all</PrivateAssets >
365
365
</PackageReference >
You can’t perform that action at this time.
0 commit comments