Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Commit bfdecc8

Browse files
authored
React to the deprecation of Microsoft.AspNetCore.All (#8751)
1 parent 1521f92 commit bfdecc8

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/Microsoft.AspNetCore.Mvc.Core/ApplicationParts/ApplicationAssembliesProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ internal class ApplicationAssembliesProvider
1414
{
1515
internal static HashSet<string> ReferenceAssemblies { get; } = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
1616
{
17-
// The deps file for the Microsoft.AspNetCore.All shared runtime is authored in a way where it does not say
17+
// The deps file for the Microsoft.AspNetCore.App shared runtime is authored in a way where it does not say
1818
// it depends on Microsoft.AspNetCore.Mvc even though it does. Explicitly list it so that referencing this runtime causes
1919
// assembly discovery to work correctly.
20-
"Microsoft.AspNetCore.All",
20+
"Microsoft.AspNetCore.App",
2121
"Microsoft.AspNetCore.Mvc",
2222
"Microsoft.AspNetCore.Mvc.Abstractions",
2323
"Microsoft.AspNetCore.Mvc.ApiExplorer",
@@ -154,7 +154,7 @@ private AssemblyItem GetAssemblyItem(Assembly assembly)
154154
// Internal for unit testing
155155
internal static IEnumerable<RuntimeLibrary> GetCandidateLibraries(DependencyContext dependencyContext)
156156
{
157-
// When using Microsoft.AspNetCore.App \ Microsoft.AspNetCore.All shared runtimes, entries in the RuntimeLibraries
157+
// When using the Microsoft.AspNetCore.App shared runtimes, entries in the RuntimeLibraries
158158
// get "erased" and it is no longer accurate to query to determine a library's dependency closure.
159159
// We'll use CompileLibraries to calculate the dependency graph and runtime library to resolve assemblies to inspect.
160160
var candidatesResolver = new CandidateResolver(dependencyContext.CompileLibraries, ReferenceAssemblies);

test/Microsoft.AspNetCore.Mvc.Core.Test/ApplicationParts/ApplicationAssembliesProviderTest.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public void ResolveAssemblies_ReturnsCurrentAssembly_IfDepsFileDoesNotHaveAnyCom
3535
// Arrange
3636
var runtimeLibraries = new[]
3737
{
38-
GetRuntimeLibrary("MyApp", "Microsoft.AspNetCore.All"),
39-
GetRuntimeLibrary("Microsoft.AspNetCore.All", "Microsoft.NETCore.App"),
38+
GetRuntimeLibrary("MyApp", "Microsoft.AspNetCore.App"),
39+
GetRuntimeLibrary("Microsoft.AspNetCore.App", "Microsoft.NETCore.App"),
4040
GetRuntimeLibrary("Microsoft.NETCore.App"),
4141
GetRuntimeLibrary("ClassLibrary"),
4242
};
@@ -257,22 +257,22 @@ public void GetCandidateLibraries_IgnoresMvcAssemblies()
257257
public void GetCandidateLibraries_ReturnsRuntimeLibraries_IfCompileLibraryDependencyToMvcIsPresent()
258258
{
259259
// Arrange
260-
// When an app is running against Microsoft.AspNetCore.All shared runtime or if the DependencyContext is queried
260+
// When an app is running against Microsoft.AspNetCore.App shared runtime or if the DependencyContext is queried
261261
// from an app that's running on Microsoft.NETCore.App (e.g. in a unit testing scenario), the
262262
// runtime library does not state that the app references Mvc whereas the compile library does. This test validates
263263
// that we correctly recognize this scenario.
264-
var expected = GetRuntimeLibrary("MyApp", "Microsoft.AspNetCore.All");
264+
var expected = GetRuntimeLibrary("MyApp", "Microsoft.AspNetCore.App");
265265
var runtimeLibraries = new[]
266266
{
267267
expected,
268-
GetRuntimeLibrary("Microsoft.AspNetCore.All", "Microsoft.NETCore.App"),
268+
GetRuntimeLibrary("Microsoft.AspNetCore.App", "Microsoft.NETCore.App"),
269269
GetRuntimeLibrary("Microsoft.NETCore.App"),
270270
};
271271

272272
var compileLibraries = new[]
273273
{
274-
GetCompileLibrary("MyApp", "Microsoft.AspNetCore.All"),
275-
GetCompileLibrary("Microsoft.AspNetCore.All", "Microsoft.AspNetCore.Mvc", "Microsoft.NETCore.App"),
274+
GetCompileLibrary("MyApp", "Microsoft.AspNetCore.App"),
275+
GetCompileLibrary("Microsoft.AspNetCore.App", "Microsoft.AspNetCore.Mvc", "Microsoft.NETCore.App"),
276276
GetCompileLibrary("Microsoft.AspNetCore.Mvc"),
277277
GetCompileLibrary("Microsoft.NETCore.App"),
278278
};

test/Microsoft.AspNetCore.Mvc.Test/ApplicationParts/ApplicationAssembliesProviderTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public void ReferenceAssemblies_ReturnsLoadableReferenceAssemblies()
3030
var additionalAssemblies = new[]
3131
{
3232
// The following assemblies are not reachable from Microsoft.AspNetCore.Mvc
33-
"Microsoft.AspNetCore.All",
33+
"Microsoft.AspNetCore.App",
3434
"Microsoft.AspNetCore.Mvc.Formatters.Xml",
3535
};
3636

0 commit comments

Comments
 (0)