diff --git a/src/Traversal.UnitTests/TraversalTests.cs b/src/Traversal.UnitTests/TraversalTests.cs index c5f4d50f..16bb16ec 100644 --- a/src/Traversal.UnitTests/TraversalTests.cs +++ b/src/Traversal.UnitTests/TraversalTests.cs @@ -208,10 +208,12 @@ public void PropertiesAreSet(string target) [InlineData("TraversalProjectNames", "custom.proj", "custom.proj")] [InlineData("TraversalProjectNames", null, "dirs.proj")] [InlineData("UsingMicrosoftTraversalSdk", null, "true")] + [InlineData("SlnGenProjectName", null, "ProjectA")] + [InlineData("SlnGenProjectName", "custom", "custom")] public void PropertiesHaveExpectedValues(string propertyName, string value, string expectedValue) { ProjectCreator.Templates.TraversalProject( - path: GetTempFile("dirs.proj")) + path: Path.Combine(TestRootPath, "ProjectA", "dirs.proj")) .Property(propertyName, value) .Save() .TryGetPropertyValue(propertyName, out string actualValue); diff --git a/src/Traversal/Sdk/Traversal.targets b/src/Traversal/Sdk/Traversal.targets index 30582484..bfa5dcc6 100644 --- a/src/Traversal/Sdk/Traversal.targets +++ b/src/Traversal/Sdk/Traversal.targets @@ -31,6 +31,17 @@ net45 + + + $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($(MSBuildProjectFullPath))))) + $(MSBuildProjectName) + +