@@ -95,7 +95,7 @@ public static string GetRootFolder(this Project project)
95
95
96
96
public static void AddFileToProject ( this Project project , string file , string itemType = null )
97
97
{
98
- if ( project . IsKind ( ProjectTypes . ASPNET_5 ) )
98
+ if ( project . IsKind ( ProjectTypes . ASPNET_5 , ProjectTypes . DOTNET_Core ) )
99
99
return ;
100
100
101
101
if ( _dte . Solution . FindProjectItem ( file ) == null )
@@ -154,9 +154,15 @@ public static void AddNestedFile(string parentFile, string newFile, string itemT
154
154
}
155
155
}
156
156
157
- public static bool IsKind ( this Project project , string kindGuid )
157
+ public static bool IsKind ( this Project project , params string [ ] kindGuids )
158
158
{
159
- return project . Kind . Equals ( kindGuid , StringComparison . OrdinalIgnoreCase ) ;
159
+ foreach ( var guid in kindGuids )
160
+ {
161
+ if ( project . Kind . Equals ( guid , StringComparison . OrdinalIgnoreCase ) )
162
+ return true ;
163
+ }
164
+
165
+ return false ;
160
166
}
161
167
162
168
public static void DeleteFileFromProject ( string file )
@@ -266,6 +272,7 @@ public static bool IsConfigFile(this ProjectItem item)
266
272
public static class ProjectTypes
267
273
{
268
274
public const string ASPNET_5 = "{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}" ;
275
+ public const string DOTNET_Core = "{9A19103F-16F7-4668-BE54-9A1E7A4F7556}" ;
269
276
public const string WEBSITE_PROJECT = "{E24C65DC-7377-472B-9ABA-BC803B73C61A}" ;
270
277
public const string UNIVERSAL_APP = "{262852C6-CD72-467D-83FE-5EEB1973A190}" ;
271
278
public const string NODE_JS = "{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}" ;
0 commit comments