Skip to content

Commit 309b739

Browse files
committed
GitTools#2595 - update unit tests
1 parent a552ad8 commit 309b739

File tree

9 files changed

+196
-123
lines changed

9 files changed

+196
-123
lines changed

src/GitVersion.Core/Core/Abstractions/IRepositoryStore.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ public interface IRepositoryStore
4545

4646
IReadOnlyList<SemanticVersionWithTag> GetTaggedSemanticVersions(string? labelPrefix, SemanticVersionFormat format);
4747

48-
IReadOnlyList<SemanticVersionWithTag> GetTaggedSemanticVersionsOnBranch(
49-
IBranch branch, string? labelPrefix, SemanticVersionFormat format
50-
);
48+
IReadOnlyList<SemanticVersionWithTag> GetTaggedSemanticVersionsOnBranch(IBranch branch, string? labelPrefix, SemanticVersionFormat format);
5149

5250
bool IsCommitOnBranch(ICommit? baseVersionSource, IBranch branch, ICommit firstMatchingCommit);
5351

src/GitVersion.Core/VersionCalculation/NextVersionCalculator.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ internal class NextVersionCalculator : INextVersionCalculator
1010
{
1111
private readonly ILog log;
1212
private readonly IMainlineVersionCalculator mainlineVersionCalculator;
13-
private readonly ITrunkBasedVersionCalculator trunkBasedVersionCalculator;
1413
private readonly IContinuousDeploymentVersionCalculator continuousDeploymentVersionCalculator;
1514
private readonly IContinuousDeliveryVersionCalculator continuousDeliveryVersionCalculator;
1615
private readonly IManualDeploymentVersionCalculator manualDeploymentVersionCalculator;
@@ -24,7 +23,6 @@ internal class NextVersionCalculator : INextVersionCalculator
2423
public NextVersionCalculator(ILog log,
2524
Lazy<GitVersionContext> versionContext,
2625
IMainlineVersionCalculator mainlineVersionCalculator,
27-
ITrunkBasedVersionCalculator trunkBasedVersionCalculator,
2826
IContinuousDeploymentVersionCalculator continuousDeploymentVersionCalculator,
2927
IContinuousDeliveryVersionCalculator continuousDeliveryVersionCalculator,
3028
IManualDeploymentVersionCalculator manualDeploymentVersionCalculator,
@@ -35,7 +33,6 @@ public NextVersionCalculator(ILog log,
3533
this.log = log.NotNull();
3634
this.versionContext = versionContext.NotNull();
3735
this.mainlineVersionCalculator = mainlineVersionCalculator.NotNull();
38-
this.trunkBasedVersionCalculator = trunkBasedVersionCalculator.NotNull();
3936
this.continuousDeploymentVersionCalculator = continuousDeploymentVersionCalculator.NotNull();
4037
this.continuousDeliveryVersionCalculator = continuousDeliveryVersionCalculator.NotNull();
4138
this.manualDeploymentVersionCalculator = manualDeploymentVersionCalculator.NotNull();

src/GitVersion.MsBuild.Tests/Helpers/MsBuildExeFixture.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ public class MsBuildExeFixture
2020
private readonly AnalyzerManager manager = new();
2121
private readonly string ProjectPath;
2222

23-
public MsBuildExeFixture(RepositoryFixtureBase fixture, string workingDirectory = "")
23+
public MsBuildExeFixture(RepositoryFixtureBase fixture, string workingDirectory = "", string language = "C#")
2424
{
25+
var projectExtension = FileHelper.GetProjectExtension(language);
2526
this.fixture = fixture;
26-
this.ProjectPath = PathHelper.Combine(workingDirectory, "app.csproj");
27+
this.ProjectPath = PathHelper.Combine(workingDirectory, $"app.{projectExtension}");
2728

2829
var versionFile = PathHelper.Combine(workingDirectory, "gitversion.json");
2930

src/GitVersion.MsBuild.Tests/Tasks/GenerateGitVersionInformationTest.cs

Lines changed: 104 additions & 70 deletions
Large diffs are not rendered by default.

src/GitVersion.MsBuild.Tests/Tasks/GetVersionTaskTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ public void GetVersionTaskShouldReturnVersionOutputVariablesWhenRunWithMsBuildIn
8282
{
8383
const string taskName = nameof(GetVersion);
8484

85-
using var result = ExecuteMsBuildExeInAzurePipeline(project => AddGetVersionTask(project, taskName, taskName, outputProperty));
85+
using var result = ExecuteMsBuildExeInAzurePipeline(project =>
86+
AddGetVersionTask(project, taskName, taskName, outputProperty));
8687

8788
result.ProjectPath.ShouldNotBeNullOrWhiteSpace();
8889
result.MsBuild.Count.ShouldBeGreaterThan(0);

src/GitVersion.MsBuild.Tests/Tasks/TestTaskBase.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ protected static MsBuildTaskFixtureResult<T> ExecuteMsBuildTask<T>(T task) where
2929
return result;
3030
}
3131

32-
protected static MsBuildExeFixtureResult ExecuteMsBuildExe(Action<ProjectCreator> extendProject)
32+
protected static MsBuildExeFixtureResult ExecuteMsBuildExe(Action<ProjectCreator> extendProject, string language = "C#")
3333
{
3434
var fixture = CreateLocalRepositoryFixture();
3535

36-
var msbuildFixture = new MsBuildExeFixture(fixture, fixture.RepositoryPath);
36+
var msbuildFixture = new MsBuildExeFixture(fixture, fixture.RepositoryPath, language);
3737

3838
msbuildFixture.CreateTestProject(extendProject);
3939

@@ -51,7 +51,7 @@ protected static MsBuildTaskFixtureResult<T> ExecuteMsBuildTaskInAzurePipeline<T
5151
var environmentVariables = new List<KeyValuePair<string, string?>>(env.ToArray());
5252
if (buildNumber != null)
5353
{
54-
environmentVariables.Add(new KeyValuePair<string, string?>("BUILD_BUILDNUMBER", buildNumber));
54+
environmentVariables.Add(new("BUILD_BUILDNUMBER", buildNumber));
5555
}
5656
msbuildFixture.WithEnv(environmentVariables.ToArray());
5757
if (configurationText != null)
@@ -81,11 +81,11 @@ protected static MsBuildTaskFixtureResult<T> ExecuteMsBuildTaskInGitHubActions<T
8181
return result;
8282
}
8383

84-
protected static MsBuildExeFixtureResult ExecuteMsBuildExeInAzurePipeline(Action<ProjectCreator> extendProject)
84+
protected static MsBuildExeFixtureResult ExecuteMsBuildExeInAzurePipeline(Action<ProjectCreator> extendProject, string language = "C#")
8585
{
8686
var fixture = CreateRemoteRepositoryFixture();
8787

88-
var msbuildFixture = new MsBuildExeFixture(fixture, fixture.LocalRepositoryFixture.RepositoryPath);
88+
var msbuildFixture = new MsBuildExeFixture(fixture, fixture.LocalRepositoryFixture.RepositoryPath, language);
8989

9090
msbuildFixture.CreateTestProject(extendProject);
9191
msbuildFixture.WithEnv(env.ToArray());
@@ -118,7 +118,7 @@ private static RemoteRepositoryFixture CreateRemoteRepositoryFixture()
118118
fixture.Repository.MakeACommit();
119119
fixture.Repository.CreateBranch("develop");
120120

121-
Commands.Fetch(fixture.LocalRepositoryFixture.Repository, fixture.LocalRepositoryFixture.Repository.Network.Remotes.First().Name, Array.Empty<string>(), new FetchOptions(), null);
121+
Commands.Fetch(fixture.LocalRepositoryFixture.Repository, fixture.LocalRepositoryFixture.Repository.Network.Remotes.First().Name, Array.Empty<string>(), new(), null);
122122
Commands.Checkout(fixture.LocalRepositoryFixture.Repository, fixture.Repository.Head.Tip);
123123
fixture.LocalRepositoryFixture.Repository.Branches.Remove(MainBranch);
124124
fixture.InitializeRepo();

src/GitVersion.MsBuild.Tests/Tasks/UpdateAssemblyInfoTaskTest.cs

Lines changed: 70 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,157 +9,190 @@ namespace GitVersion.MsBuild.Tests.Tasks;
99
[TestFixture]
1010
public class UpdateAssemblyInfoTaskTest : TestTaskBase
1111
{
12-
[Test]
13-
public void UpdateAssemblyInfoTaskShouldCreateFile()
12+
private static readonly object[] Languages =
1413
{
15-
var task = new UpdateAssemblyInfo();
14+
new object[] { "C#" },
15+
new object[] { "F#" },
16+
new object[] { "VB" },
17+
};
18+
19+
[TestCaseSource(nameof(Languages))]
20+
public void UpdateAssemblyInfoTaskShouldCreateFile(string language)
21+
{
22+
var extension = FileHelper.GetFileExtension(language);
23+
var task = new UpdateAssemblyInfo { Language = language };
1624

1725
using var result = ExecuteMsBuildTask(task);
1826

1927
result.Success.ShouldBe(true);
2028
result.Errors.ShouldBe(0);
2129
result.Task.AssemblyInfoTempFilePath.ShouldNotBeNull();
30+
result.Task.AssemblyInfoTempFilePath.ShouldMatch($@"AssemblyInfo.*\.g\.{extension}");
2231

2332
var fileContent = File.ReadAllText(result.Task.AssemblyInfoTempFilePath);
24-
fileContent.ShouldContain(@"[assembly: AssemblyVersion(""1.2.4.0"")]");
33+
fileContent.ShouldContain(@"assembly: AssemblyVersion(""1.2.4.0"")");
2534
}
2635

27-
[Test]
28-
public void UpdateAssemblyInfoTaskShouldCreateFileInBuildServer()
36+
[TestCaseSource(nameof(Languages))]
37+
public void UpdateAssemblyInfoTaskShouldCreateFileInBuildServer(string language)
2938
{
30-
var task = new UpdateAssemblyInfo();
39+
var extension = FileHelper.GetFileExtension(language);
40+
var task = new UpdateAssemblyInfo { Language = language };
3141

3242
using var result = ExecuteMsBuildTaskInAzurePipeline(task);
3343

3444
result.Success.ShouldBe(true);
3545
result.Errors.ShouldBe(0);
3646
result.Task.AssemblyInfoTempFilePath.ShouldNotBeNull();
47+
result.Task.AssemblyInfoTempFilePath.ShouldMatch($@"AssemblyInfo.*\.g\.{extension}");
3748

3849
var fileContent = File.ReadAllText(result.Task.AssemblyInfoTempFilePath);
39-
fileContent.ShouldContain(@"[assembly: AssemblyVersion(""1.0.1.0"")]");
50+
fileContent.ShouldContain(@"assembly: AssemblyVersion(""1.0.1.0"")");
4051
}
4152

42-
[Test]
43-
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuild()
53+
[TestCaseSource(nameof(Languages))]
54+
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuild(string language)
4455
{
4556
const string taskName = nameof(UpdateAssemblyInfo);
4657
const string outputProperty = nameof(UpdateAssemblyInfo.AssemblyInfoTempFilePath);
4758

48-
using var result = ExecuteMsBuildExe(project => AddUpdateAssemblyInfoTask(project, taskName, taskName, outputProperty));
59+
var extension = FileHelper.GetFileExtension(language);
60+
using var result = ExecuteMsBuildExe(project =>
61+
AddUpdateAssemblyInfoTask(project, taskName, taskName, outputProperty, language), language);
4962

5063
result.ProjectPath.ShouldNotBeNullOrWhiteSpace();
5164
result.MsBuild.Count.ShouldBeGreaterThan(0);
5265
result.MsBuild.OverallSuccess.ShouldBe(true);
5366
result.MsBuild.ShouldAllBe(x => x.Succeeded);
5467
result.Output.ShouldNotBeNullOrWhiteSpace();
5568

56-
var generatedFilePath = PathHelper.Combine(Path.GetDirectoryName(result.ProjectPath), "AssemblyInfo.g.cs");
69+
var generatedFilePath = PathHelper.Combine(Path.GetDirectoryName(result.ProjectPath), $"AssemblyInfo.g.{extension}");
5770
result.Output.ShouldContain($"{outputProperty}: {generatedFilePath}");
5871

5972
var fileContent = File.ReadAllText(generatedFilePath);
60-
fileContent.ShouldContain(@"[assembly: AssemblyVersion(""1.2.4.0"")]");
73+
fileContent.ShouldContain(@"assembly: AssemblyVersion(""1.2.4.0"")");
6174
}
6275

63-
[Test]
64-
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuildInBuildServer()
76+
[TestCaseSource(nameof(Languages))]
77+
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuildInBuildServer(string language)
6578
{
6679
const string taskName = nameof(UpdateAssemblyInfo);
6780
const string outputProperty = nameof(UpdateAssemblyInfo.AssemblyInfoTempFilePath);
6881

69-
using var result = ExecuteMsBuildExeInAzurePipeline(project => AddUpdateAssemblyInfoTask(project, taskName, taskName, outputProperty));
82+
var extension = FileHelper.GetFileExtension(language);
83+
using var result = ExecuteMsBuildExeInAzurePipeline(project =>
84+
AddUpdateAssemblyInfoTask(project, taskName, taskName, outputProperty, language), language);
7085

7186
result.ProjectPath.ShouldNotBeNullOrWhiteSpace();
7287
result.MsBuild.Count.ShouldBeGreaterThan(0);
7388
result.MsBuild.OverallSuccess.ShouldBe(true);
7489
result.MsBuild.ShouldAllBe(x => x.Succeeded);
7590
result.Output.ShouldNotBeNullOrWhiteSpace();
7691

77-
var generatedFilePath = PathHelper.Combine(Path.GetDirectoryName(result.ProjectPath), "AssemblyInfo.g.cs");
92+
var generatedFilePath = PathHelper.Combine(Path.GetDirectoryName(result.ProjectPath), $"AssemblyInfo.g.{extension}");
7893
result.Output.ShouldContain($"{outputProperty}: {generatedFilePath}");
7994

8095
var fileContent = File.ReadAllText(generatedFilePath);
81-
fileContent.ShouldContain(@"[assembly: AssemblyVersion(""1.0.1.0"")]");
96+
fileContent.ShouldContain(@"assembly: AssemblyVersion(""1.0.1.0"")");
8297
}
8398

84-
[Test]
85-
public void UpdateAssemblyInfoTaskShouldCreateFileWhenIntermediateOutputPathDoesNotExist()
99+
[TestCaseSource(nameof(Languages))]
100+
public void UpdateAssemblyInfoTaskShouldCreateFileWhenIntermediateOutputPathDoesNotExist(string language)
86101
{
87-
var task = new UpdateAssemblyInfo { IntermediateOutputPath = Guid.NewGuid().ToString("N") };
102+
var extension = FileHelper.GetFileExtension(language);
103+
var task = new UpdateAssemblyInfo { Language = language, IntermediateOutputPath = Guid.NewGuid().ToString("N") };
88104

89105
using var result = ExecuteMsBuildTask(task);
90106

91107
result.Success.ShouldBe(true);
92108
result.Errors.ShouldBe(0);
93109
result.Task.AssemblyInfoTempFilePath.ShouldNotBeNull();
110+
result.Task.AssemblyInfoTempFilePath.ShouldMatch($@"AssemblyInfo.*\.g\.{extension}");
94111

95112
var fileContent = File.ReadAllText(result.Task.AssemblyInfoTempFilePath);
96-
fileContent.ShouldContain(@"[assembly: AssemblyVersion(""1.2.4.0"")]");
113+
fileContent.ShouldContain(@"assembly: AssemblyVersion(""1.2.4.0"")");
97114
}
98115

99-
[Test]
100-
public void UpdateAssemblyInfoTaskShouldCreateFileWhenIntermediateOutputPathDoesNotExistInBuildServer()
116+
[TestCaseSource(nameof(Languages))]
117+
public void UpdateAssemblyInfoTaskShouldCreateFileWhenIntermediateOutputPathDoesNotExistInBuildServer(string language)
101118
{
102-
var task = new UpdateAssemblyInfo { IntermediateOutputPath = Guid.NewGuid().ToString("N") };
119+
var extension = FileHelper.GetFileExtension(language);
120+
var task = new UpdateAssemblyInfo { Language = language, IntermediateOutputPath = Guid.NewGuid().ToString("N") };
103121

104122
using var result = ExecuteMsBuildTaskInAzurePipeline(task);
105123

106124
result.Success.ShouldBe(true);
107125
result.Errors.ShouldBe(0);
108126
result.Task.AssemblyInfoTempFilePath.ShouldNotBeNull();
127+
result.Task.AssemblyInfoTempFilePath.ShouldMatch($@"AssemblyInfo.*\.g\.{extension}");
109128

110129
var fileContent = File.ReadAllText(result.Task.AssemblyInfoTempFilePath);
111-
fileContent.ShouldContain(@"[assembly: AssemblyVersion(""1.0.1.0"")]");
130+
fileContent.ShouldContain(@"assembly: AssemblyVersion(""1.0.1.0"")");
112131
}
113132

114-
[Test]
115-
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuildAndIntermediateOutputPathDoesNotExist()
133+
[TestCaseSource(nameof(Languages))]
134+
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuildAndIntermediateOutputPathDoesNotExist(string language)
116135
{
117136
const string taskName = nameof(UpdateAssemblyInfo);
118137
const string outputProperty = nameof(UpdateAssemblyInfo.AssemblyInfoTempFilePath);
119138
var randDir = Guid.NewGuid().ToString("N");
120139

121-
using var result = ExecuteMsBuildExe(project => AddUpdateAssemblyInfoTask(project, taskName, taskName, outputProperty, Path.Combine("$(MSBuildProjectDirectory)", randDir)));
140+
var extension = FileHelper.GetFileExtension(language);
141+
using var result = ExecuteMsBuildExe(project =>
142+
{
143+
var intermediateOutputPath = Path.Combine("$(MSBuildProjectDirectory)", randDir);
144+
AddUpdateAssemblyInfoTask(project, taskName, taskName, outputProperty, language, intermediateOutputPath);
145+
}, language);
122146

123147
result.ProjectPath.ShouldNotBeNullOrWhiteSpace();
124148
result.MsBuild.Count.ShouldBeGreaterThan(0);
125149
result.MsBuild.OverallSuccess.ShouldBe(true);
126150
result.MsBuild.ShouldAllBe(x => x.Succeeded);
127151
result.Output.ShouldNotBeNullOrWhiteSpace();
128152

129-
var generatedFilePath = PathHelper.Combine(Path.GetDirectoryName(result.ProjectPath), randDir, "AssemblyInfo.g.cs");
153+
var generatedFilePath = PathHelper.Combine(Path.GetDirectoryName(result.ProjectPath), randDir, $"AssemblyInfo.g.{extension}");
130154
result.Output.ShouldContain($"{outputProperty}: {generatedFilePath}");
131155

132156
var fileContent = File.ReadAllText(generatedFilePath);
133-
fileContent.ShouldContain(@"[assembly: AssemblyVersion(""1.2.4.0"")]");
157+
fileContent.ShouldContain(@"assembly: AssemblyVersion(""1.2.4.0"")");
134158
}
135159

136-
[Test]
137-
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuildAndIntermediateOutputPathDoesNotExistInBuildServer()
160+
[TestCaseSource(nameof(Languages))]
161+
public void UpdateAssemblyInfoTaskShouldCreateFileWhenRunWithMsBuildAndIntermediateOutputPathDoesNotExistInBuildServer(string language)
138162
{
139163
const string taskName = nameof(UpdateAssemblyInfo);
140164
const string outputProperty = nameof(UpdateAssemblyInfo.AssemblyInfoTempFilePath);
141165
var randDir = Guid.NewGuid().ToString("N");
142166

143-
using var result = ExecuteMsBuildExeInAzurePipeline(project => AddUpdateAssemblyInfoTask(project, taskName, taskName, outputProperty, Path.Combine("$(MSBuildProjectDirectory)", randDir)));
167+
var extension = FileHelper.GetFileExtension(language);
168+
using var result = ExecuteMsBuildExeInAzurePipeline(project =>
169+
{
170+
var intermediateOutputPath = Path.Combine("$(MSBuildProjectDirectory)", randDir);
171+
AddUpdateAssemblyInfoTask(project, taskName, taskName, outputProperty, language, intermediateOutputPath);
172+
}, language);
144173

145174
result.ProjectPath.ShouldNotBeNullOrWhiteSpace();
146175
result.MsBuild.Count.ShouldBeGreaterThan(0);
147176
result.MsBuild.OverallSuccess.ShouldBe(true);
148177
result.MsBuild.ShouldAllBe(x => x.Succeeded);
149178
result.Output.ShouldNotBeNullOrWhiteSpace();
150179

151-
var generatedFilePath = PathHelper.Combine(Path.GetDirectoryName(result.ProjectPath), randDir, "AssemblyInfo.g.cs");
180+
var generatedFilePath = PathHelper.Combine(Path.GetDirectoryName(result.ProjectPath), randDir, $"AssemblyInfo.g.{extension}");
152181
result.Output.ShouldContain($"{outputProperty}: {generatedFilePath}");
153182

154183
var fileContent = File.ReadAllText(generatedFilePath);
155-
fileContent.ShouldContain(@"[assembly: AssemblyVersion(""1.0.1.0"")]");
184+
fileContent.ShouldContain(@"assembly: AssemblyVersion(""1.0.1.0"")");
156185
}
157186

158-
private static void AddUpdateAssemblyInfoTask(ProjectCreator project, string targetToRun, string taskName, string outputProperty, string intermediateOutputPath = "$(MSBuildProjectDirectory)")
187+
private static void AddUpdateAssemblyInfoTask(ProjectCreator project, string targetToRun, string taskName,
188+
string outputProperty, string language,
189+
string intermediateOutputPath = "$(MSBuildProjectDirectory)")
159190
{
160191
var assemblyFileLocation = typeof(GitVersionTaskBase).Assembly.Location;
161192
project.UsingTaskAssemblyFile(taskName, assemblyFileLocation)
193+
.Property("ManagePackageVersionsCentrally", "false")
162194
.Property("GenerateAssemblyInfo", "false")
195+
.Property("Language", language)
163196
.Target(targetToRun, beforeTargets: "CoreCompile;GetAssemblyVersion;GenerateNuspec")
164197
.Task(taskName, parameters: new Dictionary<string, string?>
165198
{

src/GitVersion.MsBuild.Tests/Tasks/WriteVersionInfoTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ public void WriteVersionInfoTaskShouldLogOutputVariablesToBuildOutputWhenRunWith
104104
{
105105
const string taskName = nameof(WriteVersionInfoToBuildLog);
106106

107-
using var result = ExecuteMsBuildExeInAzurePipeline(project => AddWriteVersionInfoToBuildLogTask(project, taskName, taskName));
107+
using var result = ExecuteMsBuildExeInAzurePipeline(project =>
108+
AddWriteVersionInfoToBuildLogTask(project, taskName, taskName));
108109

109110
result.ProjectPath.ShouldNotBeNullOrWhiteSpace();
110111
result.MsBuild.Count.ShouldBeGreaterThan(0);

src/GitVersion.MsBuild/Helpers/FileHelper.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ public static void DeleteTempFiles()
5151
_ => throw new ArgumentException($"Unknown language detected: '{language}'")
5252
};
5353

54+
public static string GetProjectExtension(string language) => language switch
55+
{
56+
"C#" => "csproj",
57+
"F#" => "fsproj",
58+
"VB" => "vbproj",
59+
_ => throw new ArgumentException($"Unknown language detected: '{language}'")
60+
};
61+
5462
public static void CheckForInvalidFiles(IEnumerable<ITaskItem> compileFiles, string projectFile)
5563
{
5664
if (GetInvalidFiles(compileFiles, projectFile).FirstOrDefault() is { } invalidCompileFile)

0 commit comments

Comments
 (0)