Skip to content

Commit bc45605

Browse files
simonjefferiesarturcic
authored andcommitted
Added support for project type Microsoft.NET.Sdk.WindowsDesktop.
1 parent 507686e commit bc45605

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

src/GitVersionCore.Tests/VersionConverters/ProjectFileUpdaterTests.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,25 @@ public void CanUpdateProjectFileWithStandardWebProjectFileXml(string xml)
7171
canUpdate.ShouldBe(true);
7272
}
7373

74+
[TestCase(@"
75+
<Project Sdk=""Microsoft.NET.Sdk.WindowsDesktop"">
76+
<PropertyGroup>
77+
<OutputType>Exe</OutputType>
78+
<TargetFramework>net461</TargetFramework>
79+
</PropertyGroup>
80+
</Project>
81+
")]
82+
[Category(NoMono)]
83+
[Description(NoMonoDescription)]
84+
public void CanUpdateProjectFileWithStandardDesktopProjectFileXml(string xml)
85+
{
86+
using var projectFileUpdater = new ProjectFileUpdater(log, fileSystem);
87+
88+
var canUpdate = projectFileUpdater.CanUpdateProjectFile(XElement.Parse(xml));
89+
90+
canUpdate.ShouldBe(true);
91+
}
92+
7493
[TestCase(@"
7594
<Project Sdk=""SomeOtherProject.Sdk"">
7695
<PropertyGroup>

src/GitVersionCore/VersionConverters/AssemblyInfo/ProjectFileUpdater.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ internal bool CanUpdateProjectFile(XElement xmlRoot)
111111
return false;
112112
}
113113

114-
var supportedSdks = new[] { "Microsoft.NET.Sdk", "Microsoft.NET.Sdk.Web" };
114+
var supportedSdks = new[] { "Microsoft.NET.Sdk", "Microsoft.NET.Sdk.Web", "Microsoft.NET.Sdk.WindowsDesktop" };
115115
var sdkAttribute = xmlRoot.Attribute("Sdk");
116116
if (sdkAttribute == null || !supportedSdks.Contains(sdkAttribute.Value))
117117
{

0 commit comments

Comments
 (0)