Skip to content

Commit e133683

Browse files
authored
Keep @(Reference) metadata when creating @(ProjectReference) items (#21567)
- #20818, fix e.g. references to Microsoft.Web.Xdt.Extensions in our packages - make `@(Reference)` items much more broadly applicable - emit an error when `@(ProjectReference)` is used instead of `@(Reference)` - then get rid of the errors (!!) - rename a couple of projects to match their assembly names - then regenerate the `@(ProjectReferenceProvider)` items - switch intersection approach from Exclude / Exclude to Copy / Update / Copy Projects of particular interest: - src/DefaultBuilder/src/Microsoft.AspNetCore.csproj - honouring metadata left e.g. Microsoft.AspNetCore.Components.WebAssembly.DevServer package unchanged - removed redundant metadata after that confirmation - src/Razor/tools/Microsoft.AspNetCore.Razor.Internal.Transport/ - content of this package unchanged but metadata avoids extra work - add a comment about the extra work - src/SiteExtensions/LoggingAggregate/src/Microsoft.AspNetCore.AzureAppServices.SiteExtension/ - success! removes Microsoft.Web.Xdt.Extensions dependency from the package - src/SiteExtensions/Runtime/Microsoft.AspNetCore.Runtime.SiteExtension.pkgproj - add a `Condition` to avoid an ordering issue I hit here - src/Tools/Extensions.ApiDescription.Server/src/ - avoid errors the new build ordering and timing caused Separately, up the timeout in the `<DownloadFile />` task - hit repeated timeouts downloading dotnet-runtime-5.0.0-rc.1.20370.4-win-x64.zip nits: - remove dupe `@(Reference)` item in Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj - remove useless `%(ProjectReference.IsImplicitlyDefined)` metadata as well as its misspellings - remove extra spaces from ProjectReferences.props - clean up a few comments in ResolveReferences.targets * !fixup! Correct other references to renamed projects
1 parent 1be16fb commit e133683

File tree

27 files changed

+269
-250
lines changed

27 files changed

+269
-250
lines changed

AspNetCore.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.
10631063
EndProject
10641064
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetCore.Razor.Tools", "Microsoft.AspNetCore.Razor.Tools", "{B9704650-5360-416C-9393-FAF707766AA8}"
10651065
EndProject
1066-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Tools", "src\Razor\Microsoft.AspNetCore.Razor.Tools\src\Microsoft.AspNetCore.Razor.Tools.csproj", "{4C84173F-5C1F-49A1-895A-C0CA11DE84B1}"
1066+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Tools", "src\Razor\Microsoft.AspNetCore.Razor.Tools\src\rzc.csproj", "{4C84173F-5C1F-49A1-895A-C0CA11DE84B1}"
10671067
EndProject
10681068
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Tools.Test", "src\Razor\Microsoft.AspNetCore.Razor.Tools\test\Microsoft.AspNetCore.Razor.Tools.Test.csproj", "{FE095F11-4CD2-406D-A2BB-1BE569603BF0}"
10691069
EndProject
@@ -1295,7 +1295,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ApiDes
12951295
EndProject
12961296
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GetDocumentInsider", "GetDocumentInsider", "{A1B75FC7-A777-4412-A635-D0C9ED8FE7A0}"
12971297
EndProject
1298-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GetDocumentInsider", "src\Tools\GetDocumentInsider\src\GetDocumentInsider.csproj", "{DD63EA3C-929C-48FF-8E8A-8F3CC553E93B}"
1298+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GetDocumentInsider", "src\Tools\GetDocumentInsider\src\GetDocument.Insider.csproj", "{DD63EA3C-929C-48FF-8E8A-8F3CC553E93B}"
12991299
EndProject
13001300
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ApiDescription.Client.Tests", "src\Tools\Extensions.ApiDescription.Client\test\Microsoft.Extensions.ApiDescription.Client.Tests.csproj", "{34E40892-48C1-4D3D-AB49-FAC3C4C00B42}"
13011301
EndProject

eng/CodeGen.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
-->
3434
<Project>
3535
<ItemGroup>
36-
@(_ProjectReferenceProvider->'<ProjectReferenceProvider Include="%(Identity)" ProjectPath="%24(RepoRoot)%(ProjectFileRelativePath)" />', '%0A ')
36+
@(_ProjectReferenceProvider->'<ProjectReferenceProvider Include="%(Identity)" ProjectPath="%24(RepoRoot)%(ProjectFileRelativePath)" />', '%0A ')
3737
</ItemGroup>
3838
</Project>
3939
]]></ProjectListContent>

eng/ProjectReferences.props

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

eng/targets/CSharp.Common.props

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
several versions older than latest. We reference the project to ensure it's built before the other projects that use it. Since this
1919
is a project reference, we must explicitly import the props file and also specify the output location of the SDK directory.
2020
-->
21-
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj"
21+
<Reference Include="Microsoft.NET.Sdk.Razor"
2222
PrivateAssets="All"
23-
IsImplicitlyDefined="true"
2423
ReferenceOutputAssembly="false"
2524
SkipGetTargetFrameworkProperties="true"
2625
UndefineProperties="TargetFramework;TargetFrameworks" />

eng/targets/ResolveReferences.targets

Lines changed: 54 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<!--
2-
32
The targets in this file are used to implement custom <Reference> resolution.
43
For more details, see /docs/ReferenceResolution.md.
54
@@ -76,8 +75,6 @@
7675
<_AllowedExplicitPackageReference Include="FSharp.Core" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" />
7776
<_ExplicitPackageReference Include="@(PackageReference)" Exclude="@(_ImplicitPackageReference);@(_AllowedExplicitPackageReference)" />
7877

79-
<_UnusedProjectReferenceProvider Include="@(ProjectReferenceProvider)" Exclude="@(Reference)" />
80-
8178
<_CompilationOnlyReference Condition="'$(TargetFramework)' == 'netstandard2.0'"
8279
Include="@(Reference->WithMetadataValue('NuGetPackageId','NETStandard.Library'))" />
8380

@@ -91,24 +88,55 @@
9188
@(Reference->WithMetadataValue('IsSharedSource', 'true'));
9289
@(Reference->WithMetadataValue('PrivateAssets', 'All'))" />
9390
<_OriginalReferences Include="@(Reference)" />
91+
</ItemGroup>
9492

95-
<!--
96-
Turn Reference items into a ProjectReference when UseProjectReferences is true.
97-
Order matters. This comes before package resolution because projects should be used when possible instead of packages.
93+
<!--
94+
Turn Reference items into a ProjectReference when UseProjectReferences is true. Order matters; this
95+
comes before package resolution because projects should be used when possible instead of packages.
9896
-->
99-
<_ProjectReferenceByAssemblyName Condition="'$(UseProjectReferences)' == 'true'"
100-
Include="@(ProjectReferenceProvider)"
101-
Exclude="@(_UnusedProjectReferenceProvider)" />
102-
103-
<ProjectReference Include="@(_ProjectReferenceByAssemblyName->'%(ProjectPath)')" />
104-
<Reference Remove="@(_ProjectReferenceByAssemblyName)" />
97+
<ItemGroup Condition=" '$(EnableCustomReferenceResolution)' == 'true' AND '$(UseProjectReferences)' == 'true' ">
98+
<!-- Copy then Update / Copy to intersect the ProjectReferenceProvider and Reference item groups. -->
99+
<_AllProjectReference Include="@(ProjectReferenceProvider)" />
100+
101+
<!-- Use only Reference items when project is a reference provider. Simplifies project moves and shortens files. -->
102+
<_AllProjectReference Update="@(ProjectReference->'%(Filename)')" DirectUse="1" />
103+
104+
<_AllProjectReference Update="@(Reference)" Use="1">
105+
<!--
106+
Metadata list is long because (a) Update defaults to copying no metadata and (b) ProjectReference metadata
107+
may include (real) Reference metadata and MSBuild task parameters. Even so, the list below is not exhaustive.
108+
-->
109+
<Aliases>%(Reference.Aliases)</Aliases>
110+
<BuildInParallel>%(Reference.BuildInParallel)</BuildInParallel>
111+
<DoNotHarvest>%(Reference.DoNotHarvest)</DoNotHarvest>
112+
<ExcludeAssets>%(Reference.ExcludeAssets)</ExcludeAssets>
113+
<IncludeAssets>%(Reference.IncludeAssets)</IncludeAssets>
114+
<IsNativeImage>%(Reference.IsNativeImage)</IsNativeImage>
115+
<LinkBase>%(Reference.LinkBase)</LinkBase>
116+
<Name>%(Reference.Name)</Name>
117+
<OutputItemType>%(Reference.OutputItemType)</OutputItemType>
118+
<Package>%(Reference.Package)</Package>
119+
<Private>%(Reference.Private)</Private>
120+
<PrivateAssets>%(Reference.PrivateAssets)</PrivateAssets>
121+
<Project>%(Reference.Project)</Project>
122+
<Properties>%(Reference.Properties)</Properties>
123+
<Publish>%(Reference.Publish)</Publish>
124+
<ReferenceOutputAssembly>%(Reference.ReferenceOutputAssembly)</ReferenceOutputAssembly>
125+
<SetPlatform>%(Reference.SetPlatform)</SetPlatform>
126+
<SkipGetTargetFrameworkProperties>%(Reference.SkipGetTargetFrameworkProperties)</SkipGetTargetFrameworkProperties>
127+
<Targets>%(Reference.Targets)</Targets>
128+
<UndefineProperties>%(Reference.UndefineProperties)</UndefineProperties>
129+
<Watch>%(Reference.Watch)</Watch>
130+
</_AllProjectReference>
131+
132+
<ProjectReference Include="@(_AllProjectReference->WithMetadataValue('Use', '1')->'%(ProjectPath)')" Use="" />
133+
<Reference Remove="@(_AllProjectReference->WithMetadataValue('Use', '1'))" />
105134
</ItemGroup>
106135

107136
<!--
108-
This target resolves remaining Referene items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve.
109-
This target helps ensure projects within the shared framework do no unintentionally add new references,
110-
and that assemblies outside the shared framework reference the framework as a whole instead of using
111-
individual assemblies.
137+
This target helps ensure projects within the shared framework do no unintentionally add new references, and that
138+
assemblies outside the shared framework reference the framework as a whole instead of using individual assemblies.
139+
In addition, enforce use of Reference items for projects reference providers.
112140
-->
113141
<Target Name="_CheckForReferenceBoundaries" BeforeTargets="CollectPackageReferences;ResolveReferences">
114142
<Error
@@ -118,6 +146,10 @@
118146
<Error
119147
Condition="@(_InvalidReferenceToNonSharedFxAssembly->Count()) != 0 AND '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'"
120148
Text="Cannot reference &quot;%(_InvalidReferenceToNonSharedFxAssembly.Identity)&quot;. This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." />
149+
150+
<Error
151+
Condition=" '$(EnableCustomReferenceResolution)' == 'true' AND @(_AllProjectReference->WithMetadataValue('DirectUse', '1')->Count()) != 0 "
152+
Text="Cannot reference &quot;%(_AllProjectReference.Identity)&quot; with a ProjectReference item; use a Reference item." />
121153
</Target>
122154

123155
<Target Name="_WarnAboutRedundantRef" AfterTargets="ResolveFrameworkReferences;ProcessFrameworkReferences">
@@ -127,14 +159,15 @@
127159
</Target>
128160

129161
<!--
130-
This target resolves remaining Reference items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve.
131-
This executes on NuGet restore and during DesignTimeBuild. It should not run in the outer, cross-targeting build.
162+
This target resolves remaining Reference items to Packages, if possible. If not, they are left as Reference
163+
items for the SDK to resolve. This executes on NuGet restore and during DesignTimeBuild. It should not run in
164+
outer, cross-targeting build.
132165
-->
133166
<Target Name="ResolveCustomReferences"
134167
BeforeTargets="CheckForImplicitPackageReferenceOverrides;CollectPackageReferences;ResolvePackageAssets"
135168
Condition=" '$(TargetFramework)' != '' AND '$(EnableCustomReferenceResolution)' == 'true' ">
136169
<ItemGroup>
137-
<!-- Ensure only content asset are consumed from .Sources packages -->
170+
<!-- Ensure only content assets are consumed from .Sources packages. -->
138171
<Reference>
139172
<IncludeAssets Condition="'%(IsSharedSource)' == 'true'">ContentFiles;Build</IncludeAssets>
140173
<PrivateAssets Condition="'%(IsSharedSource)' == 'true'">All</PrivateAssets>
@@ -285,6 +318,8 @@
285318
Text="Only implementation projects should set IsAspNetCoreApp=true." />
286319
<Error Condition=" '$(IsAspNetCoreApp)' != 'true' AND $(HasReferenceAssembly) "
287320
Text="Only projects in the shared framework i.e. IsAspNetCoreApp==true should produce a reference assembly." />
321+
<Warning Condition=" '$(IsProjectReferenceProvider)' == 'true' AND '$(AssemblyName)' != '$(MSBuildProjectName)' "
322+
Text="Project name &quot;$(MSBuildProjectName)&quot; is confusing; assembly is named &quot;$(AssemblyName)&quot;." />
288323

289324
<ItemGroup Condition=" '$(IsProjectReferenceProvider)' == 'true' ">
290325
<ProvidesReference Include="$(AssemblyName)">

eng/tools/RepoTasks/DownloadFile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private async System.Threading.Tasks.Task<bool> ExecuteAsync()
100100

101101
Log.LogMessage(MessageImportance.High, $"Attempting download '{source}' to '{target}'");
102102

103-
using (var httpClient = new HttpClient())
103+
using (var httpClient = new HttpClient { Timeout = TimeSpan.FromMinutes(5) })
104104
{
105105
for (int retryNumber = 0; retryNumber < MaxRetries; retryNumber++)
106106
{
@@ -146,4 +146,4 @@ private async System.Threading.Tasks.Task<bool> ExecuteAsync()
146146
return null;
147147
}
148148
}
149-
}
149+
}

src/Components/WebAssembly/DevServer/src/Microsoft.AspNetCore.Components.WebAssembly.DevServer.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
2020
<Reference Include="Microsoft.AspNetCore.Components.Server" />
2121
<Reference Include="Microsoft.AspNetCore.ResponseCompression" />
22-
<Reference Include="Microsoft.AspNetCore" />
2322

2423
<Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />
2524
<Reference Include="Microsoft.Extensions.Hosting" />

src/Components/WebAssembly/Sdk/integrationtests/Microsoft.NET.Sdk.BlazorWebAssembly.IntegrationTests.csproj

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,8 @@
2828

2929
<ItemGroup>
3030
<ProjectReference Include="$(RepoRoot)src\Razor\test\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.csproj" />
31-
32-
<ProjectReference Include="..\src\Microsoft.NET.Sdk.BlazorWebAssembly.csproj">
33-
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
34-
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
35-
</ProjectReference>
36-
37-
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj">
38-
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
39-
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
40-
</ProjectReference>
31+
<Reference Include="Microsoft.NET.Sdk.BlazorWebAssembly" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
32+
<Reference Include="Microsoft.NET.Sdk.Razor" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
4133
</ItemGroup>
4234

4335
<ItemGroup>

src/Components/WebAssembly/Sdk/src/Microsoft.NET.Sdk.BlazorWebAssembly.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
Include="..\tools\Microsoft.NET.Sdk.BlazorWebAssembly.Tools.csproj"
2323
Targets="Publish"
2424
ReferenceOutputAssembly="false"
25-
IsImplicityDefined="false"
2625
SkipGetTargetFrameworkProperties="true"
2726
UndefineProperties="TargetFramework;TargetFrameworks;RuntimeIdentifier;PublishDir" />
2827
</ItemGroup>

src/DefaultBuilder/src/Microsoft.AspNetCore.csproj

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,25 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<Reference Include="Microsoft.AspNetCore.Diagnostics" PrivateAssets="None" />
14-
<Reference Include="Microsoft.AspNetCore.HostFiltering" PrivateAssets="None" />
15-
<Reference Include="Microsoft.AspNetCore.Hosting" PrivateAssets="None" />
16-
<Reference Include="Microsoft.AspNetCore.Routing" PrivateAssets="None" />
17-
<Reference Include="Microsoft.AspNetCore.Server.IIS" PrivateAssets="None" />
18-
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration" PrivateAssets="None" />
19-
<Reference Include="Microsoft.AspNetCore.Server.Kestrel" PrivateAssets="None" />
20-
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" PrivateAssets="None" />
21-
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" PrivateAssets="None" />
22-
<Reference Include="Microsoft.Extensions.Configuration.Json" PrivateAssets="None" />
23-
<Reference Include="Microsoft.Extensions.Configuration.CommandLine" PrivateAssets="None" />
13+
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
14+
<Reference Include="Microsoft.AspNetCore.HostFiltering" />
15+
<Reference Include="Microsoft.AspNetCore.Hosting" />
16+
<Reference Include="Microsoft.AspNetCore.Routing" />
17+
<Reference Include="Microsoft.AspNetCore.Server.IIS" />
18+
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration" />
19+
<Reference Include="Microsoft.AspNetCore.Server.Kestrel" />
20+
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
21+
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" />
22+
<Reference Include="Microsoft.Extensions.Configuration.Json" />
23+
<Reference Include="Microsoft.Extensions.Configuration.CommandLine" />
24+
<!-- Projects using this one should get UserSecrets build assets and those are private by default. -->
2425
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets" PrivateAssets="None" />
25-
<Reference Include="Microsoft.Extensions.FileProviders.Composite" PrivateAssets="None" />
26-
<Reference Include="Microsoft.Extensions.Logging" PrivateAssets="None" />
27-
<Reference Include="Microsoft.Extensions.Logging.Configuration" PrivateAssets="None" />
28-
<Reference Include="Microsoft.Extensions.Logging.Console" PrivateAssets="None" />
29-
<Reference Include="Microsoft.Extensions.Logging.Debug" PrivateAssets="None" />
30-
<Reference Include="Microsoft.Extensions.Logging.EventSource" PrivateAssets="None" />
26+
<Reference Include="Microsoft.Extensions.FileProviders.Composite" />
27+
<Reference Include="Microsoft.Extensions.Logging" />
28+
<Reference Include="Microsoft.Extensions.Logging.Configuration" />
29+
<Reference Include="Microsoft.Extensions.Logging.Console" />
30+
<Reference Include="Microsoft.Extensions.Logging.Debug" />
31+
<Reference Include="Microsoft.Extensions.Logging.EventSource" />
3132
</ItemGroup>
3233

3334
</Project>

src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
4141
<ProjectReference Include="../testassets/DotNetToolsInstaller/DotNetToolsInstaller.csproj" ReferenceOutputAssembly="false" />
4242
<ProjectReference Include="../Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj" ReferenceOutputAssembly="false" />
43-
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj"
44-
ReferenceOutputAssembly="false"
45-
SkipGetTargetFrameworkProperties="true" />
43+
<Reference Include="Microsoft.NET.Sdk.Razor" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
4644
</ItemGroup>
4745

4846
<PropertyGroup>

src/ProjectTemplates/test/ProjectTemplates.Tests.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<ItemGroup>
4343
<HelixContent Include="$(OutputPath)$(TargetFramework)Assets\**" />
4444
</ItemGroup>
45-
45+
4646
<ItemGroup>
4747
<ProjectReference Include="$(RepoRoot)src\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj">
4848
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
@@ -54,9 +54,7 @@
5454
<ProjectReference Include="../Web.ItemTemplates/Microsoft.DotNet.Web.ItemTemplates.csproj" ReferenceOutputAssembly="false" />
5555
<ProjectReference Include="../Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj" ReferenceOutputAssembly="false" />
5656
<ProjectReference Include="../Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj" ReferenceOutputAssembly="false" />
57-
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj"
58-
ReferenceOutputAssembly="false"
59-
SkipGetTargetFrameworkProperties="true" />
57+
<Reference Include="Microsoft.NET.Sdk.Razor" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
6058
</ItemGroup>
6159

6260
<PropertyGroup>

src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/BuildServerIntegrationTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public async Task ManualServerShutdown_NoPipeName_ShutsDownServer()
155155
var repositoryRoot = ProjectDirectory.SearchUp(AppContext.BaseDirectory, "global.json");
156156
var solutionRoot = Path.Combine(repositoryRoot, "src", "Razor");
157157
var toolAssemblyDirectory = Path.Combine(solutionRoot, "Microsoft.AspNetCore.Razor.Tools", "src");
158-
var toolAssemblyPath = Path.Combine(toolAssemblyDirectory, "Microsoft.AspNetCore.Razor.Tools.csproj");
158+
var toolAssemblyPath = Path.Combine(toolAssemblyDirectory, "rzc.csproj");
159159
var projectDirectory = new TestProjectDirectory(solutionRoot, toolAssemblyDirectory, toolAssemblyPath);
160160
var publishDir = Path.Combine(Path.GetTempPath(), "Razor", Path.GetRandomFileName(), "RzcPublish");
161161
var publishResult = await MSBuildProcessManager.RunProcessAsync(projectDirectory, $"/t:Publish /p:PublishDir=\"{publishDir}\"");

src/Razor/Microsoft.NET.Sdk.Razor/integrationtests/Microsoft.NET.Sdk.Razor.IntegrationTests.csproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@
3030
<ItemGroup>
3131
<Reference Include="rzc" />
3232
<ProjectReference Include="..\..\test\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.csproj" />
33-
34-
<ProjectReference Include="..\src\Microsoft.NET.Sdk.Razor.csproj">
35-
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
36-
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
37-
</ProjectReference>
33+
<Reference Include="Microsoft.NET.Sdk.Razor" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
3834
</ItemGroup>
3935

4036
<ItemGroup>

0 commit comments

Comments
 (0)