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
This commit is contained in:
parent
1be16fb4c9
commit
e13368391b
|
|
@ -1063,7 +1063,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.AspNetCore.Razor.Tools", "Microsoft.AspNetCore.Razor.Tools", "{B9704650-5360-416C-9393-FAF707766AA8}"
|
||||
EndProject
|
||||
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}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor.Tools", "src\Razor\Microsoft.AspNetCore.Razor.Tools\src\rzc.csproj", "{4C84173F-5C1F-49A1-895A-C0CA11DE84B1}"
|
||||
EndProject
|
||||
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}"
|
||||
EndProject
|
||||
|
|
@ -1295,7 +1295,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.ApiDes
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GetDocumentInsider", "GetDocumentInsider", "{A1B75FC7-A777-4412-A635-D0C9ED8FE7A0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GetDocumentInsider", "src\Tools\GetDocumentInsider\src\GetDocumentInsider.csproj", "{DD63EA3C-929C-48FF-8E8A-8F3CC553E93B}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GetDocumentInsider", "src\Tools\GetDocumentInsider\src\GetDocument.Insider.csproj", "{DD63EA3C-929C-48FF-8E8A-8F3CC553E93B}"
|
||||
EndProject
|
||||
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}"
|
||||
EndProject
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@
|
|||
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Client" ProjectPath="$(RepoRoot)src\Tools\Extensions.ApiDescription.Client\src\Microsoft.Extensions.ApiDescription.Client.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.Extensions.ApiDescription.Server" ProjectPath="$(RepoRoot)src\Tools\Extensions.ApiDescription.Server\src\Microsoft.Extensions.ApiDescription.Server.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.DeveloperCertificates.XPlat" ProjectPath="$(RepoRoot)src\Tools\FirstRunCertGenerator\src\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj" />
|
||||
<ProjectReferenceProvider Include="GetDocument.Insider" ProjectPath="$(RepoRoot)src\Tools\GetDocumentInsider\src\GetDocumentInsider.csproj" />
|
||||
<ProjectReferenceProvider Include="GetDocument.Insider" ProjectPath="$(RepoRoot)src\Tools\GetDocumentInsider\src\GetDocument.Insider.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.Extensions.Logging.AzureAppServices" ProjectPath="$(RepoRoot)src\Logging.AzureAppServices\src\Microsoft.Extensions.Logging.AzureAppServices.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.ConcurrencyLimiter" ProjectPath="$(RepoRoot)src\Middleware\ConcurrencyLimiter\src\Microsoft.AspNetCore.ConcurrencyLimiter.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Cors" ProjectPath="$(RepoRoot)src\Middleware\CORS\src\Microsoft.AspNetCore.Cors.csproj" />
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Mvc.Razor.Extensions\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Razor.Language" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Razor.Language\src\Microsoft.AspNetCore.Razor.Language.csproj" />
|
||||
<ProjectReferenceProvider Include="rzc" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Razor.Tools\src\Microsoft.AspNetCore.Razor.Tools.csproj" />
|
||||
<ProjectReferenceProvider Include="rzc" ProjectPath="$(RepoRoot)src\Razor\Microsoft.AspNetCore.Razor.Tools\src\rzc.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.CodeAnalysis.Razor" ProjectPath="$(RepoRoot)src\Razor\Microsoft.CodeAnalysis.Razor\src\Microsoft.CodeAnalysis.Razor.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.NET.Sdk.Razor" ProjectPath="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj" />
|
||||
<ProjectReferenceProvider Include="Microsoft.AspNetCore.Razor.Runtime" ProjectPath="$(RepoRoot)src\Razor\Razor.Runtime\src\Microsoft.AspNetCore.Razor.Runtime.csproj" />
|
||||
|
|
|
|||
|
|
@ -18,9 +18,8 @@
|
|||
several versions older than latest. We reference the project to ensure it's built before the other projects that use it. Since this
|
||||
is a project reference, we must explicitly import the props file and also specify the output location of the SDK directory.
|
||||
-->
|
||||
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj"
|
||||
<Reference Include="Microsoft.NET.Sdk.Razor"
|
||||
PrivateAssets="All"
|
||||
IsImplicitlyDefined="true"
|
||||
ReferenceOutputAssembly="false"
|
||||
SkipGetTargetFrameworkProperties="true"
|
||||
UndefineProperties="TargetFramework;TargetFrameworks" />
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<!--
|
||||
|
||||
The targets in this file are used to implement custom <Reference> resolution.
|
||||
For more details, see /docs/ReferenceResolution.md.
|
||||
|
||||
|
|
@ -76,8 +75,6 @@
|
|||
<_AllowedExplicitPackageReference Include="FSharp.Core" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" />
|
||||
<_ExplicitPackageReference Include="@(PackageReference)" Exclude="@(_ImplicitPackageReference);@(_AllowedExplicitPackageReference)" />
|
||||
|
||||
<_UnusedProjectReferenceProvider Include="@(ProjectReferenceProvider)" Exclude="@(Reference)" />
|
||||
|
||||
<_CompilationOnlyReference Condition="'$(TargetFramework)' == 'netstandard2.0'"
|
||||
Include="@(Reference->WithMetadataValue('NuGetPackageId','NETStandard.Library'))" />
|
||||
|
||||
|
|
@ -91,24 +88,55 @@
|
|||
@(Reference->WithMetadataValue('IsSharedSource', 'true'));
|
||||
@(Reference->WithMetadataValue('PrivateAssets', 'All'))" />
|
||||
<_OriginalReferences Include="@(Reference)" />
|
||||
|
||||
<!--
|
||||
Turn Reference items into a ProjectReference when UseProjectReferences is true.
|
||||
Order matters. This comes before package resolution because projects should be used when possible instead of packages.
|
||||
-->
|
||||
<_ProjectReferenceByAssemblyName Condition="'$(UseProjectReferences)' == 'true'"
|
||||
Include="@(ProjectReferenceProvider)"
|
||||
Exclude="@(_UnusedProjectReferenceProvider)" />
|
||||
|
||||
<ProjectReference Include="@(_ProjectReferenceByAssemblyName->'%(ProjectPath)')" />
|
||||
<Reference Remove="@(_ProjectReferenceByAssemblyName)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
This target resolves remaining Referene items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve.
|
||||
This target helps ensure projects within the shared framework do no unintentionally add new references,
|
||||
and that assemblies outside the shared framework reference the framework as a whole instead of using
|
||||
individual assemblies.
|
||||
Turn Reference items into a ProjectReference when UseProjectReferences is true. Order matters; this
|
||||
comes before package resolution because projects should be used when possible instead of packages.
|
||||
-->
|
||||
<ItemGroup Condition=" '$(EnableCustomReferenceResolution)' == 'true' AND '$(UseProjectReferences)' == 'true' ">
|
||||
<!-- Copy then Update / Copy to intersect the ProjectReferenceProvider and Reference item groups. -->
|
||||
<_AllProjectReference Include="@(ProjectReferenceProvider)" />
|
||||
|
||||
<!-- Use only Reference items when project is a reference provider. Simplifies project moves and shortens files. -->
|
||||
<_AllProjectReference Update="@(ProjectReference->'%(Filename)')" DirectUse="1" />
|
||||
|
||||
<_AllProjectReference Update="@(Reference)" Use="1">
|
||||
<!--
|
||||
Metadata list is long because (a) Update defaults to copying no metadata and (b) ProjectReference metadata
|
||||
may include (real) Reference metadata and MSBuild task parameters. Even so, the list below is not exhaustive.
|
||||
-->
|
||||
<Aliases>%(Reference.Aliases)</Aliases>
|
||||
<BuildInParallel>%(Reference.BuildInParallel)</BuildInParallel>
|
||||
<DoNotHarvest>%(Reference.DoNotHarvest)</DoNotHarvest>
|
||||
<ExcludeAssets>%(Reference.ExcludeAssets)</ExcludeAssets>
|
||||
<IncludeAssets>%(Reference.IncludeAssets)</IncludeAssets>
|
||||
<IsNativeImage>%(Reference.IsNativeImage)</IsNativeImage>
|
||||
<LinkBase>%(Reference.LinkBase)</LinkBase>
|
||||
<Name>%(Reference.Name)</Name>
|
||||
<OutputItemType>%(Reference.OutputItemType)</OutputItemType>
|
||||
<Package>%(Reference.Package)</Package>
|
||||
<Private>%(Reference.Private)</Private>
|
||||
<PrivateAssets>%(Reference.PrivateAssets)</PrivateAssets>
|
||||
<Project>%(Reference.Project)</Project>
|
||||
<Properties>%(Reference.Properties)</Properties>
|
||||
<Publish>%(Reference.Publish)</Publish>
|
||||
<ReferenceOutputAssembly>%(Reference.ReferenceOutputAssembly)</ReferenceOutputAssembly>
|
||||
<SetPlatform>%(Reference.SetPlatform)</SetPlatform>
|
||||
<SkipGetTargetFrameworkProperties>%(Reference.SkipGetTargetFrameworkProperties)</SkipGetTargetFrameworkProperties>
|
||||
<Targets>%(Reference.Targets)</Targets>
|
||||
<UndefineProperties>%(Reference.UndefineProperties)</UndefineProperties>
|
||||
<Watch>%(Reference.Watch)</Watch>
|
||||
</_AllProjectReference>
|
||||
|
||||
<ProjectReference Include="@(_AllProjectReference->WithMetadataValue('Use', '1')->'%(ProjectPath)')" Use="" />
|
||||
<Reference Remove="@(_AllProjectReference->WithMetadataValue('Use', '1'))" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
This target helps ensure projects within the shared framework do no unintentionally add new references, and that
|
||||
assemblies outside the shared framework reference the framework as a whole instead of using individual assemblies.
|
||||
In addition, enforce use of Reference items for projects reference providers.
|
||||
-->
|
||||
<Target Name="_CheckForReferenceBoundaries" BeforeTargets="CollectPackageReferences;ResolveReferences">
|
||||
<Error
|
||||
|
|
@ -118,6 +146,10 @@
|
|||
<Error
|
||||
Condition="@(_InvalidReferenceToNonSharedFxAssembly->Count()) != 0 AND '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)'"
|
||||
Text="Cannot reference "%(_InvalidReferenceToNonSharedFxAssembly.Identity)". This dependency is not in the shared framework. See docs/SharedFramework.md for instructions on how to modify what is in the shared framework." />
|
||||
|
||||
<Error
|
||||
Condition=" '$(EnableCustomReferenceResolution)' == 'true' AND @(_AllProjectReference->WithMetadataValue('DirectUse', '1')->Count()) != 0 "
|
||||
Text="Cannot reference "%(_AllProjectReference.Identity)" with a ProjectReference item; use a Reference item." />
|
||||
</Target>
|
||||
|
||||
<Target Name="_WarnAboutRedundantRef" AfterTargets="ResolveFrameworkReferences;ProcessFrameworkReferences">
|
||||
|
|
@ -127,14 +159,15 @@
|
|||
</Target>
|
||||
|
||||
<!--
|
||||
This target resolves remaining Reference items to Packages, if possible. If not, they are left as Reference items fo the SDK to resolve.
|
||||
This executes on NuGet restore and during DesignTimeBuild. It should not run in the outer, cross-targeting build.
|
||||
This target resolves remaining Reference items to Packages, if possible. If not, they are left as Reference
|
||||
items for the SDK to resolve. This executes on NuGet restore and during DesignTimeBuild. It should not run in
|
||||
outer, cross-targeting build.
|
||||
-->
|
||||
<Target Name="ResolveCustomReferences"
|
||||
BeforeTargets="CheckForImplicitPackageReferenceOverrides;CollectPackageReferences;ResolvePackageAssets"
|
||||
Condition=" '$(TargetFramework)' != '' AND '$(EnableCustomReferenceResolution)' == 'true' ">
|
||||
<ItemGroup>
|
||||
<!-- Ensure only content asset are consumed from .Sources packages -->
|
||||
<!-- Ensure only content assets are consumed from .Sources packages. -->
|
||||
<Reference>
|
||||
<IncludeAssets Condition="'%(IsSharedSource)' == 'true'">ContentFiles;Build</IncludeAssets>
|
||||
<PrivateAssets Condition="'%(IsSharedSource)' == 'true'">All</PrivateAssets>
|
||||
|
|
@ -285,6 +318,8 @@
|
|||
Text="Only implementation projects should set IsAspNetCoreApp=true." />
|
||||
<Error Condition=" '$(IsAspNetCoreApp)' != 'true' AND $(HasReferenceAssembly) "
|
||||
Text="Only projects in the shared framework i.e. IsAspNetCoreApp==true should produce a reference assembly." />
|
||||
<Warning Condition=" '$(IsProjectReferenceProvider)' == 'true' AND '$(AssemblyName)' != '$(MSBuildProjectName)' "
|
||||
Text="Project name "$(MSBuildProjectName)" is confusing; assembly is named "$(AssemblyName)"." />
|
||||
|
||||
<ItemGroup Condition=" '$(IsProjectReferenceProvider)' == 'true' ">
|
||||
<ProvidesReference Include="$(AssemblyName)">
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ namespace RepoTasks
|
|||
|
||||
Log.LogMessage(MessageImportance.High, $"Attempting download '{source}' to '{target}'");
|
||||
|
||||
using (var httpClient = new HttpClient())
|
||||
using (var httpClient = new HttpClient { Timeout = TimeSpan.FromMinutes(5) })
|
||||
{
|
||||
for (int retryNumber = 0; retryNumber < MaxRetries; retryNumber++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@
|
|||
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
|
||||
<Reference Include="Microsoft.AspNetCore.Components.Server" />
|
||||
<Reference Include="Microsoft.AspNetCore.ResponseCompression" />
|
||||
<Reference Include="Microsoft.AspNetCore" />
|
||||
|
||||
<Compile Include="$(SharedSourceRoot)CommandLineUtils\**\*.cs" />
|
||||
<Reference Include="Microsoft.Extensions.Hosting" />
|
||||
|
|
|
|||
|
|
@ -28,16 +28,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="$(RepoRoot)src\Razor\test\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.csproj" />
|
||||
|
||||
<ProjectReference Include="..\src\Microsoft.NET.Sdk.BlazorWebAssembly.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
||||
</ProjectReference>
|
||||
|
||||
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
||||
</ProjectReference>
|
||||
<Reference Include="Microsoft.NET.Sdk.BlazorWebAssembly" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
|
||||
<Reference Include="Microsoft.NET.Sdk.Razor" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
Include="..\tools\Microsoft.NET.Sdk.BlazorWebAssembly.Tools.csproj"
|
||||
Targets="Publish"
|
||||
ReferenceOutputAssembly="false"
|
||||
IsImplicityDefined="false"
|
||||
SkipGetTargetFrameworkProperties="true"
|
||||
UndefineProperties="TargetFramework;TargetFrameworks;RuntimeIdentifier;PublishDir" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -10,24 +10,25 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.AspNetCore.Diagnostics" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.AspNetCore.HostFiltering" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.AspNetCore.Hosting" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.AspNetCore.Routing" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.IIS" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.Kestrel" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Json" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.CommandLine" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
|
||||
<Reference Include="Microsoft.AspNetCore.HostFiltering" />
|
||||
<Reference Include="Microsoft.AspNetCore.Hosting" />
|
||||
<Reference Include="Microsoft.AspNetCore.Routing" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.IIS" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.Kestrel" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.FileExtensions" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Json" />
|
||||
<Reference Include="Microsoft.Extensions.Configuration.CommandLine" />
|
||||
<!-- Projects using this one should get UserSecrets build assets and those are private by default. -->
|
||||
<Reference Include="Microsoft.Extensions.Configuration.UserSecrets" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Composite" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Logging" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Configuration" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Console" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Debug" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.EventSource" PrivateAssets="None" />
|
||||
<Reference Include="Microsoft.Extensions.FileProviders.Composite" />
|
||||
<Reference Include="Microsoft.Extensions.Logging" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Configuration" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Console" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Debug" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.EventSource" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -40,9 +40,7 @@
|
|||
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
|
||||
<ProjectReference Include="../testassets/DotNetToolsInstaller/DotNetToolsInstaller.csproj" ReferenceOutputAssembly="false" />
|
||||
<ProjectReference Include="../Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj" ReferenceOutputAssembly="false" />
|
||||
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj"
|
||||
ReferenceOutputAssembly="false"
|
||||
SkipGetTargetFrameworkProperties="true" />
|
||||
<Reference Include="Microsoft.NET.Sdk.Razor" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -54,9 +54,7 @@
|
|||
<ProjectReference Include="../Web.ItemTemplates/Microsoft.DotNet.Web.ItemTemplates.csproj" ReferenceOutputAssembly="false" />
|
||||
<ProjectReference Include="../Web.ProjectTemplates/Microsoft.DotNet.Web.ProjectTemplates.csproj" ReferenceOutputAssembly="false" />
|
||||
<ProjectReference Include="../Web.Spa.ProjectTemplates/Microsoft.DotNet.Web.Spa.ProjectTemplates.csproj" ReferenceOutputAssembly="false" />
|
||||
<ProjectReference Include="$(RepoRoot)src\Razor\Microsoft.NET.Sdk.Razor\src\Microsoft.NET.Sdk.Razor.csproj"
|
||||
ReferenceOutputAssembly="false"
|
||||
SkipGetTargetFrameworkProperties="true" />
|
||||
<Reference Include="Microsoft.NET.Sdk.Razor" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ namespace Microsoft.AspNetCore.Razor.Design.IntegrationTests
|
|||
var repositoryRoot = ProjectDirectory.SearchUp(AppContext.BaseDirectory, "global.json");
|
||||
var solutionRoot = Path.Combine(repositoryRoot, "src", "Razor");
|
||||
var toolAssemblyDirectory = Path.Combine(solutionRoot, "Microsoft.AspNetCore.Razor.Tools", "src");
|
||||
var toolAssemblyPath = Path.Combine(toolAssemblyDirectory, "Microsoft.AspNetCore.Razor.Tools.csproj");
|
||||
var toolAssemblyPath = Path.Combine(toolAssemblyDirectory, "rzc.csproj");
|
||||
var projectDirectory = new TestProjectDirectory(solutionRoot, toolAssemblyDirectory, toolAssemblyPath);
|
||||
var publishDir = Path.Combine(Path.GetTempPath(), "Razor", Path.GetRandomFileName(), "RzcPublish");
|
||||
var publishResult = await MSBuildProcessManager.RunProcessAsync(projectDirectory, $"/t:Publish /p:PublishDir=\"{publishDir}\"");
|
||||
|
|
|
|||
|
|
@ -30,11 +30,7 @@
|
|||
<ItemGroup>
|
||||
<Reference Include="rzc" />
|
||||
<ProjectReference Include="..\..\test\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib\Microsoft.AspNetCore.Razor.Test.MvcShim.ClassLib.csproj" />
|
||||
|
||||
<ProjectReference Include="..\src\Microsoft.NET.Sdk.Razor.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
|
||||
</ProjectReference>
|
||||
<Reference Include="Microsoft.NET.Sdk.Razor" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -24,18 +24,14 @@
|
|||
<Reference Include="Microsoft.Build.Utilities.Core" />
|
||||
<Reference Include="System.Reflection.Metadata" Condition="'$(TargetFramework)'=='net46'" />
|
||||
|
||||
<ProjectReference
|
||||
Include="..\..\Microsoft.AspNetCore.Razor.Tools\src\Microsoft.AspNetCore.Razor.Tools.csproj"
|
||||
<Reference Include="rzc"
|
||||
Targets="Publish"
|
||||
ReferenceOutputAssembly="false"
|
||||
IsImplicityDefined="false"
|
||||
SkipGetTargetFrameworkProperties="true"
|
||||
UndefineProperties="TargetFramework;TargetFrameworks;RuntimeIdentifier;PublishDir" />
|
||||
|
||||
<ProjectReference
|
||||
Include="..\..\Microsoft.AspNetCore.Mvc.Razor.Extensions\src\Microsoft.AspNetCore.Mvc.Razor.Extensions.csproj"
|
||||
<Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions"
|
||||
ReferenceOutputAssembly="false"
|
||||
IsImplicityDefined="false"
|
||||
SkipGetTargetFrameworkProperties="true"
|
||||
UndefineProperties="TargetFramework;TargetFrameworks" />
|
||||
</ItemGroup>
|
||||
|
|
@ -73,12 +69,12 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<RazorToolsOutput Include="$(ArtifactsBinDir)Microsoft.AspNetCore.Razor.Tools\$(Configuration)\netcoreapp3.0\publish\**\*.*" />
|
||||
<RazorToolsOutput Include="$(ArtifactsBinDir)rzc\$(Configuration)\netcoreapp3.0\publish\**\*.*" />
|
||||
<MvcRazorExtensionOutput Include="$(ArtifactsBinDir)Microsoft.AspNetCore.Mvc.Razor.Extensions\$(Configuration)\netstandard2.0\Microsoft.AspNetCore.Mvc.Razor.Extensions.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<Error
|
||||
Text="rzc outputs were not found in $(ArtifactsBinDir)Microsoft.AspNetCore.Razor.Tools\$(Configuration)\netcoreapp3.0\publish"
|
||||
Text="rzc outputs were not found in $(ArtifactsBinDir)rzc\$(Configuration)\netcoreapp3.0\publish"
|
||||
Condition="'@(RazorToolsOutput->Count())' == '0'" />
|
||||
|
||||
<Error
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
"src\\Razor\\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X\\test\\Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X.Test.csproj",
|
||||
"src\\Razor\\Microsoft.AspNetCore.Razor.Language\\src\\Microsoft.AspNetCore.Razor.Language.csproj",
|
||||
"src\\Razor\\Microsoft.AspNetCore.Razor.Language\\test\\Microsoft.AspNetCore.Razor.Language.Test.csproj",
|
||||
"src\\Razor\\Microsoft.AspNetCore.Razor.Tools\\src\\Microsoft.AspNetCore.Razor.Tools.csproj",
|
||||
"src\\Razor\\Microsoft.AspNetCore.Razor.Tools\\src\\rzc.csproj",
|
||||
"src\\Razor\\Microsoft.AspNetCore.Razor.Tools\\test\\Microsoft.AspNetCore.Razor.Tools.Test.csproj",
|
||||
"src\\Razor\\Microsoft.CodeAnalysis.Razor\\src\\Microsoft.CodeAnalysis.Razor.csproj",
|
||||
"src\\Razor\\Microsoft.CodeAnalysis.Razor\\test\\Microsoft.CodeAnalysis.Razor.Test.csproj",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- Don't bother passing the following assemblies to the (ignored) build or copying the files into our bin. -->
|
||||
<Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" ReferenceOutputAssembly="false" />
|
||||
<Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X" ReferenceOutputAssembly="false" />
|
||||
<Reference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X" ReferenceOutputAssembly="false" />
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Microsoft.AspNetCore.Server.IIS.csproj" />
|
||||
<Reference Include="Microsoft.AspNetCore.Server.IIS" />
|
||||
<ProjectReference Include="..\testassets\IIS.Common.TestLib\IIS.Common.TestLib.csproj" />
|
||||
<ProjectReference Include="$(RepoRoot)src\Hosting\Server.IntegrationTesting\src\Microsoft.AspNetCore.Server.IntegrationTesting.csproj" />
|
||||
<ProjectReference Include="$(RepoRoot)src\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj" />
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj" />
|
||||
<Reference Include="Microsoft.Web.Xdt.Extensions" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\src\Microsoft.Web.Xdt.Extensions.csproj" />
|
||||
<Reference Include="Microsoft.Web.Xdt.Extensions" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -20,11 +20,14 @@
|
|||
<Content Include="applicationHost.xdt" />
|
||||
<Content Include="scmApplicationHost.xdt" />
|
||||
<Content Include="install.cmd" />
|
||||
<Content Include="$(ArtifactsBinDir)Microsoft.Web.Xdt.Extensions\$(Configuration)\net461\Microsoft.Web.Xdt.Extensions.dll" PackagePath="content" />
|
||||
<Content Include="$(ArtifactsBinDir)Microsoft.Web.Xdt.Extensions\$(Configuration)\net461\Microsoft.Web.Xdt.Extensions.dll"
|
||||
Condition="EXISTS('$(ArtifactsBinDir)Microsoft.Web.Xdt.Extensions\$(Configuration)\net461\Microsoft.Web.Xdt.Extensions.dll')"
|
||||
PackagePath="content" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Web.Xdt.Extensions\src\Microsoft.Web.Xdt.Extensions.csproj" PrivateAssets="All" ReferenceOutputAssembly="False"/>
|
||||
|
||||
<!-- Make sure redist folder is built and ready -->
|
||||
<ProjectReference Include="..\..\Framework\App.Runtime\src\Microsoft.AspNetCore.App.Runtime.csproj">
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
|
|
@ -33,7 +36,6 @@
|
|||
|
||||
<NativeProjectReference Include="$(RepoRoot)src\Servers\IIS\AspNetCoreModuleV2\AspNetCore\AspNetCore.vcxproj" Platform="$(TargetArchitecture)" />
|
||||
<NativeProjectReference Include="$(RepoRoot)src\Servers\IIS\AspNetCoreModuleV2\OutOfProcessRequestHandler\OutOfProcessRequestHandler.vcxproj" HandlerPath="2.0.0" Platform="$(TargetArchitecture)" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="ResolveReferenceItemsForPackage" DependsOnTargets="ResolveReferences" BeforeTargets="_GetPackageFiles">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<Content Include="$(MSBuildProjectDirectory)\..\src\buildMultiTargeting\**\*" CopyToOutputDirectory="PreserveNewest" LinkBase="buildMultiTargeting" />
|
||||
<Content Include="TestProjects\**\*" CopyToOutputDirectory="PreserveNewest" />
|
||||
|
||||
<ProjectReference Include="..\src\Microsoft.Extensions.ApiDescription.Client.csproj" />
|
||||
<Reference Include="Microsoft.Extensions.ApiDescription.Client" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CleanTestProjects" BeforeTargets="CoreCompile">
|
||||
|
|
|
|||
|
|
@ -11,18 +11,21 @@
|
|||
<PackageId>$(MSBuildProjectName)</PackageId>
|
||||
<PackageTags>MSBuild;Swagger;OpenAPI;code generation;Web API;service reference;document generation</PackageTags>
|
||||
<DevelopmentDependency>true</DevelopmentDependency>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!--
|
||||
Publish the referenced projects when building .NET Core bits. This is not needed for full framework builds
|
||||
because publish output matches what was built.
|
||||
-->
|
||||
<ProjectReferenceBuildTargets
|
||||
Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">Build;Publish</ProjectReferenceBuildTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="dotnet-getdocument" Condition=" '$(TargetFramework)' == 'netcoreapp2.1' " />
|
||||
<Reference Include="GetDocument.Insider" />
|
||||
<Reference Include="dotnet-getdocument"
|
||||
Targets="Publish"
|
||||
ReferenceOutputAssembly="false"
|
||||
SkipGetTargetFrameworkProperties="true"
|
||||
UndefineProperties="TargetFramework;TargetFrameworks;RuntimeIdentifier;PublishDir" />
|
||||
<Reference Include="GetDocument.Insider" ReferenceOutputAssembly="false">
|
||||
<Targets Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">Publish</Targets>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
<file src="build\*" target="build" />
|
||||
<file src="buildMultiTargeting\*" target="buildMultiTargeting" />
|
||||
<file src="$artifactsBinDir$\dotnet-getdocument\$configuration$\netcoreapp2.1\publish\*.*" target="tools" />
|
||||
<file src="$artifactsBinDir$\GetDocumentInsider\$configuration$\net461\*.*" target="tools\net461" />
|
||||
<file src="$artifactsBinDir$\GetDocumentInsider\x86\$configuration$\net461\*.*" target="tools\net461-x86" />
|
||||
<file src="$artifactsBinDir$\GetDocumentInsider\$configuration$\netcoreapp2.1\publish\*.*" target="tools\netcoreapp2.1" />
|
||||
<file src="$artifactsBinDir$\GetDocument.Insider\$configuration$\net461\*.*" target="tools\net461" />
|
||||
<file src="$artifactsBinDir$\GetDocument.Insider\x86\$configuration$\net461\*.*" target="tools\net461-x86" />
|
||||
<file src="$artifactsBinDir$\GetDocument.Insider\$configuration$\netcoreapp2.1\publish\*.*" target="tools\netcoreapp2.1" />
|
||||
</files>
|
||||
</package>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
"src\\Tools\\Extensions.ApiDescription.Server\\src\\Microsoft.Extensions.ApiDescription.Server.csproj",
|
||||
"src\\Tools\\FirstRunCertGenerator\\src\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.csproj",
|
||||
"src\\Tools\\FirstRunCertGenerator\\test\\Microsoft.AspNetCore.DeveloperCertificates.XPlat.Tests.csproj",
|
||||
"src\\Tools\\GetDocumentInsider\\src\\GetDocumentInsider.csproj",
|
||||
"src\\Tools\\GetDocumentInsider\\src\\GetDocument.Insider.csproj",
|
||||
"src\\Tools\\Microsoft.dotnet-openapi\\src\\Microsoft.dotnet-openapi.csproj",
|
||||
"src\\Tools\\Microsoft.dotnet-openapi\\test\\dotnet-microsoft.openapi.Tests.csproj",
|
||||
"src\\Tools\\dotnet-dev-certs\\src\\dotnet-dev-certs.csproj",
|
||||
|
|
|
|||
Loading…
Reference in New Issue