From 338de4710a6f5d3355dfb113bb5aaedb737ba082 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Wed, 13 Feb 2019 14:31:15 -0800 Subject: [PATCH] Automatically set 'PrivateAssets=All' for .Sources references (#7539) When a `` is named `*.Sources`, set PrivateAssets=All (exclude from generated nuspec) and IncludeAssets=ContentFiles (only consume content files, not .dll's) --- eng/targets/ResolveReferences.targets | 25 +++++++++++-------- .../Microsoft.AspNetCore.Blazor.Build.csproj | 2 +- .../Microsoft.AspNetCore.Blazor.Cli.csproj | 2 +- ...t.AspNetCore.Components.Performance.csproj | 2 +- .../src/Microsoft.AspNetCore.Hosting.csproj | 2 +- .../src/Microsoft.AspNetCore.TestHost.csproj | 2 +- ...rosoft.AspNetCore.Http.Abstractions.csproj | 2 +- ...crosoft.AspNetCore.Http.Performance.csproj | 2 +- ...soft.AspNetCore.Routing.Performance.csproj | 2 +- .../src/Microsoft.AspNetCore.Routing.csproj | 2 +- .../tools/Swaggatherer/Swaggatherer.csproj | 2 +- .../Microsoft.AspNetCore.Diagnostics.csproj | 2 +- ...ore.ResponseCompression.Performance.csproj | 2 +- ...crosoft.AspNetCore.Mvc.Abstractions.csproj | 2 +- .../Microsoft.AspNetCore.Mvc.Core.csproj | 6 ++--- .../Microsoft.AspNetCore.Mvc.Testing.csproj | 2 +- .../test/ProjectTemplates.Tests.csproj | 2 +- .../src/Microsoft.AspNetCore.Razor.csproj | 2 +- ...oft.AspNetCore.Security.Performance.csproj | 2 +- ...AspNetCore.Connections.Abstractions.csproj | 2 +- .../IIS.Performance/IIS.Performance.csproj | 2 +- ...pNetCore.Server.Kestrel.Performance.csproj | 4 +-- .../InMemory.FunctionalTests.csproj | 2 +- .../Microsoft.AspNetCore.Shared.Tests.csproj | 2 +- ....AspNetCore.Http.Connections.Common.csproj | 2 +- ...crosoft.AspNetCore.Http.Connections.csproj | 2 +- ...Microsoft.AspNetCore.SignalR.Common.csproj | 2 +- ...soft.AspNetCore.SignalR.Tests.Utils.csproj | 2 +- ....AspNetCore.SignalR.Microbenchmarks.csproj | 2 +- .../benchmarkapps/Crankier/Crankier.csproj | 2 +- .../samples/ClientSample/ClientSample.csproj | 2 +- .../src/dotnet-dev-certs.csproj | 2 +- .../src/dotnet-sql-cache.csproj | 2 +- .../src/dotnet-user-secrets.csproj | 2 +- .../dotnet-watch/src/dotnet-watch.csproj | 2 +- 35 files changed, 52 insertions(+), 47 deletions(-) diff --git a/eng/targets/ResolveReferences.targets b/eng/targets/ResolveReferences.targets index c397c09ded..c91706203e 100644 --- a/eng/targets/ResolveReferences.targets +++ b/eng/targets/ResolveReferences.targets @@ -48,7 +48,17 @@ false + + + + + + + + true + + <_ImplicitPackageReference Include="@(PackageReference->WithMetadataValue('IsImplicitlyDefined', 'true'))" /> @@ -67,7 +77,8 @@ @(AspNetCoreAppReference); @(AspNetCoreAppReferenceAndPackage); @(ExternalAspNetCoreAppReference); - @(_CompilationOnlyReference)" /> + @(_CompilationOnlyReference); + @(Reference->WithMetadataValue('IsSharedSource', 'true'))" /> - ContentFiles - All + ContentFiles + All diff --git a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj index b675eaa4fc..8ee476fadc 100644 --- a/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj +++ b/src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj @@ -39,7 +39,7 @@ - + diff --git a/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.csproj b/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.csproj index ff6b0ea7e3..5a85cbf615 100644 --- a/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.csproj +++ b/src/Components/Blazor/Cli/src/Microsoft.AspNetCore.Blazor.Cli.csproj @@ -17,7 +17,7 @@ - +