Skip to content

Commit

Permalink
Fixing use of empty RootNamespace tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwhitfield committed Sep 6, 2024
1 parent 314c1e7 commit 5c47ad0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Unitverse/Helper/VsProjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,14 @@ public static string GetProjectRootNamespace(Project project)

var defaultNamespaceProperty = project.Properties.Item("DefaultNamespace");

if (defaultNamespaceProperty?.Value == null)
var defaultNamespace = defaultNamespaceProperty?.Value?.ToString();

if (string.IsNullOrWhiteSpace(defaultNamespace))
{
return "Testing";
defaultNamespace = project.Name;
}

return defaultNamespaceProperty.Value.ToString();
return defaultNamespace;
}

private static IVsHierarchy GetVsHierarchyFromFilepath(string filepath, out uint itemId)
Expand Down

0 comments on commit 5c47ad0

Please sign in to comment.