File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
Tasks/Microsoft.NET.Build.Tasks/targets
Tests/Microsoft.NET.Pack.Tests Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,12 @@ Copyright (c) .NET Foundation. All rights reserved.
97
97
<ItemGroup >
98
98
<!-- Set implicit metadata on ASP.NET package references -->
99
99
<PackageReference Update =" Microsoft.AspNetCore.App" >
100
- <PrivateAssets Condition =" '%(PackageReference.Version)' == ''" >true </PrivateAssets >
100
+ <PrivateAssets Condition =" '%(PackageReference.Version)' == ''" >all </PrivateAssets >
101
101
<Publish Condition =" '%(PackageReference.Version)' == ''" >true</Publish >
102
102
</PackageReference >
103
103
104
104
<PackageReference Update =" Microsoft.AspNetCore.All" >
105
- <PrivateAssets Condition =" '%(PackageReference.Version)' == ''" >true </PrivateAssets >
105
+ <PrivateAssets Condition =" '%(PackageReference.Version)' == ''" >all </PrivateAssets >
106
106
<Publish Condition =" '%(PackageReference.Version)' == ''" >true</Publish >
107
107
</PackageReference >
108
108
Original file line number Diff line number Diff line change @@ -158,6 +158,27 @@ public void Packing_a_netcoreapp_2_0_app_does_not_include_the_implicit_dependenc
158
158
dependencies . Should ( ) . BeEmpty ( ) ;
159
159
}
160
160
161
+ [ Theory ]
162
+ [ InlineData ( "Microsoft.AspNetCore.App" ) ]
163
+ [ InlineData ( "Microsoft.AspNetCore.All" ) ]
164
+ public void Package_an_aspnetcore_2_1_app_does_not_include_the_implicit_dependency ( string packageId )
165
+ {
166
+ TestProject testProject = new TestProject ( )
167
+ {
168
+ Name = "PackAspNetCoreApp21App" ,
169
+ IsSdkProject = true ,
170
+ TargetFrameworks = "netcoreapp2.1" ,
171
+ IsExe = true
172
+ } ;
173
+
174
+ testProject . PackageReferences . Add ( new TestPackageReference ( packageId , "" ) ) ;
175
+
176
+ var dependencies = PackAndGetDependencies ( testProject ) ;
177
+
178
+ dependencies . Should ( ) . BeEmpty ( ) ;
179
+
180
+ }
181
+
161
182
[ Fact ]
162
183
public void Packing_a_netcoreapp_2_0_DotnetCliTool_app_includes_the_implicit_dependency ( )
163
184
{
You can’t perform that action at this time.
0 commit comments