make all packages serviceable by default (#2575)
fixes https://github.com/dotnet/cli/issues/2569
This commit is contained in:
parent
08ee6dedd9
commit
b682ab1d4f
2 changed files with 15 additions and 1 deletions
|
@ -115,7 +115,9 @@ namespace Microsoft.Extensions.DependencyModel
|
|||
{
|
||||
var type = export.Library.Identity.Type;
|
||||
|
||||
var serviceable = (export.Library as PackageDescription)?.PackageLibrary.IsServiceable ?? false;
|
||||
// TEMPORARY: All packages are serviceable in RC2
|
||||
// See https://github.com/dotnet/cli/issues/2569
|
||||
var serviceable = (export.Library as PackageDescription) != null;
|
||||
var libraryDependencies = new HashSet<Dependency>();
|
||||
|
||||
foreach (var libraryDependency in export.Library.Dependencies)
|
||||
|
|
|
@ -95,6 +95,18 @@ namespace Microsoft.Extensions.DependencyModel.Tests
|
|||
context.Target.Framework.Should().Be("SomeFramework,Version=v1.2");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SetsServiceableToTrueForPackageDescriptions()
|
||||
{
|
||||
var context = Build(runtimeExports: new[]
|
||||
{
|
||||
Export(PackageDescription("Pack.Age", servicable: false))
|
||||
});
|
||||
|
||||
var lib = context.RuntimeLibraries.Single();
|
||||
lib.Serviceable.Should().BeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TakesServicableFromPackageDescription()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue