Skip to content

Commit 0162f0a

Browse files
Merge branch 'main' into unify-test-utilities
2 parents f6baf62 + f3d9a0b commit 0162f0a

File tree

163 files changed

+3522
-1721
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+3522
-1721
lines changed

azure-pipelines-integration-dartlab.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Razor integration test pipeline for validating against branch builds of VS.
1+
# Razor integration test pipeline for validating against branch builds of VS.
22

33
trigger: none # Manual trigger for now
44
pr: none
@@ -17,7 +17,7 @@ resources:
1717
name: DartLab.Templates
1818
ref: main
1919
- repository: RazorMirror
20-
endpoint: dnceng/internal dotnet-roslyn
20+
endpoint: dnceng/internal
2121
type: git
2222
name: internal/dotnet-razor
2323
ref: $(Build.SourceBranch)

eng/Version.Details.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
66
<Sha>839cdfb0ecca5e0be3dbccd926e7651ef50fdf10</Sha>
77
</Dependency>
8-
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.23558.1">
8+
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="9.0.0-alpha.1.23565.2">
99
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
10-
<Sha>8b3155afc95d149699cbd761b18b059755cfd198</Sha>
10+
<Sha>b5ceed90b72d1b05975dd95fedd86c2455969adb</Sha>
1111
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
1212
</Dependency>
1313
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.8.0-3.23475.1">
@@ -94,14 +94,14 @@
9494
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
9595
<Sha>3a25a7f1cc446b60678ed25c9d829420d6321eba</Sha>
9696
</Dependency>
97-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.23563.1">
97+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.23572.2">
9898
<Uri>https://github.com/dotnet/arcade</Uri>
99-
<Sha>e3fde0b990dea6fbb8d06574a136cf2d4a12bf4e</Sha>
99+
<Sha>c5e5051496efbcc9046b25628666377d6b97a670</Sha>
100100
<SourceBuild RepoName="arcade" ManagedOnly="true" />
101101
</Dependency>
102-
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.23563.1">
102+
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="9.0.0-beta.23572.2">
103103
<Uri>https://github.com/dotnet/arcade</Uri>
104-
<Sha>e3fde0b990dea6fbb8d06574a136cf2d4a12bf4e</Sha>
104+
<Sha>c5e5051496efbcc9046b25628666377d6b97a670</Sha>
105105
</Dependency>
106106
<!-- Necessary for source-build. This allows Microsoft.Extensions.ObjectPool and System.Collections.Immutable packages
107107
to be retrieved from live source-build and their content consumed by packages produced by razor.

eng/Versions.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<PropertyGroup Label="Automated">
5252
<MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>6.0.2-servicing.22064.6</MicrosoftNETCoreBrowserDebugHostTransportPackageVersion>
5353
<MicrosoftNETCorePlatformsPackageVersion>6.0.1</MicrosoftNETCorePlatformsPackageVersion>
54-
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesPackageVersion>9.0.0-alpha.1.23558.1</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesPackageVersion>
54+
<MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesPackageVersion>9.0.0-alpha.1.23565.2</MicrosoftSourceBuildIntermediatesourcebuildreferencepackagesPackageVersion>
5555
<MicrosoftNetCompilersToolsetPackageVersion>4.8.0-3.23475.1</MicrosoftNetCompilersToolsetPackageVersion>
5656
<MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>4.8.0-3.23475.1</MicrosoftCommonLanguageServerProtocolFrameworkPackageVersion>
5757
<MicrosoftCodeAnalysisExternalAccessRazorPackageVersion>4.8.0-3.23475.1</MicrosoftCodeAnalysisExternalAccessRazorPackageVersion>
@@ -71,7 +71,7 @@
7171
<MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>4.8.0-3.23475.1</MicrosoftCodeAnalysisWorkspacesCommonPackageVersion>
7272
<MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>4.8.0-3.23475.1</MicrosoftCodeAnalysisWorkspacesMSBuildPackageVersion>
7373
<MicrosoftVisualStudioLanguageServicesPackageVersion>4.8.0-3.23475.1</MicrosoftVisualStudioLanguageServicesPackageVersion>
74-
<MicrosoftDotNetXliffTasksPackageVersion>9.0.0-beta.23563.1</MicrosoftDotNetXliffTasksPackageVersion>
74+
<MicrosoftDotNetXliffTasksPackageVersion>9.0.0-beta.23572.2</MicrosoftDotNetXliffTasksPackageVersion>
7575
<!--
7676
Exception - Microsoft.Extensions.ObjectPool and System.Collections.Immutable packages are not updated by automation,
7777
but are present in Version.Details.xml for source-build PVP flow. See the comment in Version.Details.xml for more information.

global.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"tools": {
3-
"dotnet": "8.0.100-rtm.23506.1",
3+
"dotnet": "8.0.100",
44
"runtimes": {
55
"dotnet": [
66
"2.1.30",
@@ -16,11 +16,11 @@
1616
}
1717
},
1818
"sdk": {
19-
"version": "8.0.100-rtm.23506.1",
19+
"version": "8.0.100",
2020
"allowPrerelease": false,
2121
"rollForward": "latestPatch"
2222
},
2323
"msbuild-sdks": {
24-
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.23563.1"
24+
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.23572.2"
2525
}
2626
}

src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X/test/InjectTargetExtensionTest.cs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ public void InjectDirectiveTargetExtension_WritesProperty()
3030
target.WriteInjectProperty(context, node);
3131

3232
// Assert
33-
Assert.Equal(
34-
"[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]" + Environment.NewLine +
35-
"public PropertyType PropertyName { get; private set; }" + Environment.NewLine,
33+
Assert.Equal("""
34+
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
35+
public PropertyType PropertyName { get; private set; }
36+
37+
""",
3638
context.CodeWriter.GenerateCode());
3739
}
3840

@@ -58,14 +60,18 @@ public void InjectDirectiveTargetExtension_WritesPropertyWithLinePragma_WhenSour
5860
target.WriteInjectProperty(context, node);
5961

6062
// Assert
61-
Assert.Equal(Environment.NewLine +
62-
"#nullable restore" + Environment.NewLine +
63-
"#line 2 \"test-path\"" + Environment.NewLine +
64-
"[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]" + Environment.NewLine +
65-
"public PropertyType<ModelType> PropertyName { get; private set; }" + Environment.NewLine + Environment.NewLine +
66-
"#line default" + Environment.NewLine +
67-
"#line hidden" + Environment.NewLine +
68-
"#nullable disable" + Environment.NewLine,
63+
Assert.Equal("""
64+
65+
#nullable restore
66+
#line 2 "test-path"
67+
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
68+
public PropertyType<ModelType> PropertyName { get; private set; }
69+
70+
#line default
71+
#line hidden
72+
#nullable disable
73+
74+
""",
6975
context.CodeWriter.GenerateCode());
7076
}
7177
}

src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X/test/IntegrationTests/CodeGenerationIntegrationTest.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ public void Basic_DesignTime()
157157
public void Sections_DesignTime()
158158
{
159159
// Arrange
160-
AddCSharpSyntaxTree($@"
160+
AddCSharpSyntaxTree($$"""
161161
using Microsoft.AspNetCore.Mvc.ViewFeatures;
162162
163-
public class InputTestTagHelper : {typeof(TagHelper).FullName}
164-
{{
165-
public ModelExpression For {{ get; set; }}
166-
}}
167-
");
163+
public class InputTestTagHelper : {{typeof(TagHelper).FullName}}
164+
{
165+
public ModelExpression For { get; set; }
166+
}
167+
""");
168168

169169
var projectItem = CreateProjectItemFromFile();
170170

@@ -320,14 +320,14 @@ public class ThisShouldBeGenerated
320320
public void ModelExpressionTagHelper_DesignTime()
321321
{
322322
// Arrange
323-
AddCSharpSyntaxTree($@"
323+
AddCSharpSyntaxTree($$"""
324324
using Microsoft.AspNetCore.Mvc.ViewFeatures;
325325
326-
public class InputTestTagHelper : {typeof(TagHelper).FullName}
327-
{{
328-
public ModelExpression For {{ get; set; }}
329-
}}
330-
");
326+
public class InputTestTagHelper : {{typeof(TagHelper).FullName}}
327+
{
328+
public ModelExpression For { get; set; }
329+
}
330+
""");
331331

332332
var projectItem = CreateProjectItemFromFile();
333333

@@ -344,21 +344,21 @@ public class InputTestTagHelper : {typeof(TagHelper).FullName}
344344
public void ViewComponentTagHelper_DesignTime()
345345
{
346346
// Arrange
347-
AddCSharpSyntaxTree($@"
347+
AddCSharpSyntaxTree($$"""
348348
public class TestViewComponent
349-
{{
349+
{
350350
public string Invoke(string firstName)
351-
{{
351+
{
352352
return firstName;
353-
}}
354-
}}
355-
356-
[{typeof(HtmlTargetElementAttribute).FullName}]
357-
public class AllTagHelper : {typeof(TagHelper).FullName}
358-
{{
359-
public string Bar {{ get; set; }}
360-
}}
361-
");
353+
}
354+
}
355+
356+
[{{typeof(HtmlTargetElementAttribute).FullName}}]
357+
public class AllTagHelper : {{typeof(TagHelper).FullName}}
358+
{
359+
public string Bar { get; set; }
360+
}
361+
""");
362362

363363
var projectItem = CreateProjectItemFromFile();
364364

src/Compiler/Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X/test/InjectTargetExtensionTest.cs

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ public void InjectDirectiveTargetExtension_WritesProperty()
2828
target.WriteInjectProperty(context, node);
2929

3030
// Assert
31-
Assert.Equal(
32-
"[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]" + Environment.NewLine +
33-
"public PropertyType PropertyName { get; private set; }" + Environment.NewLine,
31+
Assert.Equal("""
32+
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
33+
public PropertyType PropertyName { get; private set; }
34+
35+
""",
3436
context.CodeWriter.GenerateCode());
3537
}
3638

@@ -56,14 +58,18 @@ public void InjectDirectiveTargetExtension_WritesPropertyWithLinePragma_WhenSour
5658
target.WriteInjectProperty(context, node);
5759

5860
// Assert
59-
Assert.Equal(Environment.NewLine +
60-
"#nullable restore" + Environment.NewLine +
61-
"#line 2 \"test-path\"" + Environment.NewLine +
62-
"[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]" + Environment.NewLine +
63-
"public PropertyType<ModelType> PropertyName { get; private set; }" + Environment.NewLine + Environment.NewLine +
64-
"#line default" + Environment.NewLine +
65-
"#line hidden" + Environment.NewLine +
66-
"#nullable disable" + Environment.NewLine,
61+
Assert.Equal("""
62+
63+
#nullable restore
64+
#line 2 "test-path"
65+
[global::Microsoft.AspNetCore.Mvc.Razor.Internal.RazorInjectAttribute]
66+
public PropertyType<ModelType> PropertyName { get; private set; }
67+
68+
#line default
69+
#line hidden
70+
#nullable disable
71+
72+
""",
6773
context.CodeWriter.GenerateCode());
6874
}
6975
}

0 commit comments

Comments
 (0)