Skip to content

Commit 2121513

Browse files
committed
Add expected diagnostic to fix MSBuildWorkspace test
1 parent cda8483 commit 2121513

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Workspaces/MSBuildTest/NewlyCreatedProjectsFromDotNetNew.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ public async Task ValidateCSharpTemplateProjects(string templateName)
7171
return;
7272
}
7373

74+
string[] ignoredDiagniostics = templateName switch
75+
{
76+
// We expect the following error until it is resolved in 17.12. See https://github.com/dotnet/roslyn/issues/74511
77+
// error CS9137: The 'interceptors' experimental feature is not enabled in this namespace. Add '<InterceptorsPreviewNamespaces>$(InterceptorsPreviewNamespaces);Microsoft.AspNetCore.Http.Generated</InterceptorsPreviewNamespaces>' to your project.
78+
"webapiaot" => ["CS9137"],
79+
_ => [],
80+
};
81+
7482
await AssertTemplateProjectLoadsCleanlyAsync(templateName, LanguageNames.CSharp);
7583
}
7684

0 commit comments

Comments
 (0)