<!-- Sign managed libraries in installer subset. -->
<ItemsToSign Include="$(ArtifactsBinDir)Microsoft.DotNet.PlatformAbstractions/**/*.dll" />
- <ItemsToSign Include="$(ArtifactsBinDir)Microsoft.Extensions.DependencyModel/**/*.dll" />
<ItemsToSign Include="$(ArtifactsBinDir)Microsoft.NET.HostModel/**/*.dll" />
</ItemGroup>
./build.sh /p:Subset=CoreHost-Managed
- This builds the CoreHost and also the Managed (e.g. Microsoft.Extensions.DependencyModel)
+ This builds the CoreHost and also the Managed (e.g. Microsoft.DotNet.PlatformAbstractions)
projects. A '-' is the delimiter between multiple subsets to build.
./build.sh -test /p:Subset=Test
<!-- Installer -->
<SubsetName Include="All" Category="Installer" Description="The .NET Core hosts, hosting libraries, bundles, and installers. Includes these projects' tests." />
<SubsetName Include="CoreHost" Category="Installer" Description="The .NET Core hosts." />
- <SubsetName Include="Managed" Category="Installer" Description="The managed .NET hosting projects. This includes PlatformAbstractions, DependencyModel, and HostModel." />
+ <SubsetName Include="Managed" Category="Installer" Description="The managed .NET hosting projects. This includes PlatformAbstractions and HostModel." />
<SubsetName Include="DepProj" Category="Installer" Description="The dependency projects. These gather shared framework files and run crossgen on them to turn them into ready-to-run (R2R) assemblies for the current platform." />
<SubsetName Include="PkgProj" Category="Installer" Description="The packaging projects. These produce NETCoreApp assets: NuGet packages, installers, zips, and Linux packages." />
<SubsetName Include="Bundle" Category="Installer" Description="The shared framework bundle installer projects. Produces .exe installers for Windows." />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.NET.HostModel.Tests\Microsoft.NET.HostModel.ComHost.Tests\Microsoft.NET.HostModel.ComHost.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\HostActivation.Tests\HostActivation.Tests.csproj" />
<TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.DotNet.CoreSetup.Packaging.Tests\Microsoft.DotNet.CoreSetup.Packaging.Tests.csproj" />
- <TestProjectToBuild Include="$(InstallerProjectRoot)test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.csproj" />
<ProjectToBuild Include="@(TestProjectToBuild)" BuildInParallel="false" />
</ItemGroup>
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.DotNet.PlatformAbstractions", "managed\Microsoft.DotNet.PlatformAbstractions\Microsoft.DotNet.PlatformAbstractions.csproj", "{04D84DC8-A509-43FE-B846-16B770D9E3AA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyModel", "managed\Microsoft.Extensions.DependencyModel\Microsoft.Extensions.DependencyModel.csproj", "{566D86A6-D940-4270-867E-C9EA0EA01F6E}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HostActivation.Tests", "test\HostActivation.Tests\HostActivation.Tests.csproj", "{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyModel.Tests", "test\Microsoft.Extensions.DependencyModel.Tests\Microsoft.Extensions.DependencyModel.Tests.csproj", "{D86A859D-E6FA-4E73-A255-5776FC473A25}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtils", "test\TestUtils\TestUtils.csproj", "{D6676666-D14D-4DFA-88FB-76E3E823E2E1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.NET.HostModel", "managed\Microsoft.NET.HostModel\Microsoft.NET.HostModel.csproj", "{325FB7F2-2E2E-422D-ADAA-F0B63E84CF24}"
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{04D84DC8-A509-43FE-B846-16B770D9E3AA}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.Debug|x64.ActiveCfg = Debug|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.Debug|x64.Build.0 = Debug|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.MinSizeRel|x64.Build.0 = Debug|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.Release|Any CPU.Build.0 = Release|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.Release|x64.ActiveCfg = Release|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.Release|x64.Build.0 = Release|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
- {566D86A6-D940-4270-867E-C9EA0EA01F6E}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.Debug|x64.ActiveCfg = Debug|Any CPU
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
{23F4AB97-D15C-4C51-A641-DF5C5D5EF70F}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.Debug|x64.ActiveCfg = Debug|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.Debug|x64.Build.0 = Debug|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.MinSizeRel|Any CPU.ActiveCfg = Debug|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.MinSizeRel|Any CPU.Build.0 = Debug|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.MinSizeRel|x64.ActiveCfg = Debug|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.MinSizeRel|x64.Build.0 = Debug|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.Release|Any CPU.Build.0 = Release|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.Release|x64.ActiveCfg = Release|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.Release|x64.Build.0 = Release|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.RelWithDebInfo|x64.ActiveCfg = Release|Any CPU
- {D86A859D-E6FA-4E73-A255-5776FC473A25}.RelWithDebInfo|x64.Build.0 = Release|Any CPU
{D6676666-D14D-4DFA-88FB-76E3E823E2E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6676666-D14D-4DFA-88FB-76E3E823E2E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6676666-D14D-4DFA-88FB-76E3E823E2E1}.Debug|x64.ActiveCfg = Debug|Any CPU
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28B9726D-802B-478D-AF7A-B9243B9E180B}
EndGlobalSection
</PropertyGroup>
<ItemGroup>
- <InternalsVisibleTo Include="Microsoft.Extensions.DependencyModel" />
<InternalsVisibleTo Include="Microsoft.DotNet.Tools.Tests.Utilities" />
- <InternalsVisibleTo Include="Microsoft.Extensions.DependencyModel.Tests" />
<InternalsVisibleTo Include="Microsoft.DotNet.Configurer" />
<InternalsVisibleTo Include="Microsoft.DotNet.Configurer.UnitTests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.IO;
-using Newtonsoft.Json;
-
-namespace Microsoft.Extensions.DependencyModel
-{
- public partial class DependencyContextJsonReader : IDependencyContextReader
- {
- public DependencyContext Read(Stream stream)
- {
- if (stream == null)
- {
- throw new ArgumentNullException(nameof(stream));
- }
-
- using (var streamReader = new StreamReader(stream))
- {
- using (var reader = new JsonTextReader(streamReader))
- {
- return Read(reader);
- }
- }
- }
-
- private DependencyContext Read(JsonTextReader jsonReader)
- {
- var reader = new UnifiedJsonReader(jsonReader);
- return ReadCore(reader);
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.IO;
-using Newtonsoft.Json;
-
-namespace Microsoft.Extensions.DependencyModel
-{
- public partial class DependencyContextWriter
- {
- public void Write(DependencyContext context, Stream stream)
- {
- if (context == null)
- {
- throw new ArgumentNullException(nameof(context));
- }
- if (stream == null)
- {
- throw new ArgumentNullException(nameof(stream));
- }
- using (var writer = new StreamWriter(stream))
- {
- using (var jsonWriter = new JsonTextWriter(writer) { Formatting = Formatting.Indented })
- {
- WriteCore(context, new UnifiedJsonWriter(jsonWriter));
- }
- }
- }
- }
-}
+++ /dev/null
-using System;
-using System.IO;
-
-namespace Microsoft.Extensions.DependencyModel
-{
- public interface IDependencyContextReader: IDisposable
- {
- DependencyContext Read(Stream stream);
- }
-}
\ No newline at end of file
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
- <Import Project="$([MSBuild]::GetPathOfFileAbove(CommonManaged.props))" />
-
- <PropertyGroup>
- <Description>Abstractions for reading `.deps` files.</Description>
- <TargetFrameworks>net451;netstandard1.3;netstandard1.6;netstandard2.0</TargetFrameworks>
- <TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netstandard1.3;netstandard1.6;netstandard2.0</TargetFrameworks>
- </PropertyGroup>
-
- <ItemGroup>
- <Compile Include="..\Microsoft.DotNet.PlatformAbstractions\HashCodeCombiner.cs" />
- </ItemGroup>
-
- <ItemGroup>
- <InternalsVisibleTo Include="Microsoft.Extensions.DependencyModel.Tests" />
- </ItemGroup>
-
- <Choose>
- <!--
- Since we added a target for netstandard2.0 so users aren't forced to download the 1.x dependencies,
- or depend on Newtonsoft.Json, use the Microsoft.Bcl.Json.Sources package (which targets netstandard2.0).
- However, we still use the Newtonsoft.Json (v9.0.1) for other TFMs, so existing users don't need to upgrade their Newtonsoft.Json.
- For example, the SDK targets net4x and is loaded in VS, so it can't upgrade to a new Newtonsoft.Json.
- -->
- <When Condition="'$(TargetFramework)' == 'netstandard2.0'">
- <ItemGroup>
- <PackageReference Include="System.Text.Json" Version="4.7.1" />
- </ItemGroup>
- <ItemGroup>
- <Compile Remove="DependencyContextJsonReader.JsonTextReader.cs" />
- <Compile Remove="DependencyContextWriter.JsonTextWriter.cs" />
- <Compile Remove="UnifiedJsonReader.JsonTextReader.cs" />
- <Compile Remove="UnifiedJsonWriter.JsonTextWriter.cs" />
- </ItemGroup>
- </When>
- <Otherwise>
- <ItemGroup>
- <PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
- <PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.0.0" />
- </ItemGroup>
- <ItemGroup>
- <Compile Remove="ArrayBufferWriter.cs" />
- <Compile Remove="DependencyContextJsonReader.Utf8JsonReader.cs" />
- <Compile Remove="DependencyContextWriter.Utf8JsonWriter.cs" />
- <Compile Remove="UnifiedJsonReader.Utf8JsonReader.cs" />
- <Compile Remove="UnifiedJsonWriter.Utf8JsonWriter.cs" />
- </ItemGroup>
- </Otherwise>
- </Choose>
-
- <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' Or '$(TargetFramework)' == 'netstandard1.6' ">
- <PackageReference Include="System.AppContext" Version="4.1.0" />
- <PackageReference Include="System.Diagnostics.Debug" Version="4.0.11" />
- <PackageReference Include="System.Dynamic.Runtime" Version="4.0.11" />
- <PackageReference Include="System.IO.FileSystem" Version="4.0.1" />
- <PackageReference Include="System.Linq" Version="4.1.0" />
- </ItemGroup>
-
-</Project>
+++ /dev/null
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyMetadataAttribute("Serviceable", "True")]
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using Newtonsoft.Json;
-
-namespace Microsoft.Extensions.DependencyModel
-{
- internal ref struct UnifiedJsonReader
- {
- private JsonTextReader _reader;
-
- public UnifiedJsonReader(JsonTextReader reader)
- {
- _reader = reader;
- }
-
- public bool Read() => _reader.Read();
-
- public string GetStringValue() => (string)_reader.Value;
-
- public bool IsTokenTypeProperty()
- => _reader.TokenType == JsonToken.PropertyName;
-
- public bool TryReadStringProperty(out string name, out string value)
- {
- name = null;
- value = null;
- if (_reader.Read() && IsTokenTypeProperty())
- {
- name = GetStringValue();
-
- if (_reader.Read())
- {
- if (_reader.TokenType == JsonToken.String)
- {
- value = GetStringValue();
- }
- else
- {
- Skip();
- }
- }
-
- return true;
- }
-
- return false;
- }
-
- public void ReadStartObject()
- {
- _reader.Read();
- CheckStartObject();
- }
-
- public void CheckStartObject()
- {
- if (_reader.TokenType != JsonToken.StartObject)
- {
- throw CreateUnexpectedException(_reader, "{");
- }
- }
-
- public void CheckEndObject()
- {
- if (_reader.TokenType != JsonToken.EndObject)
- {
- throw CreateUnexpectedException(_reader, "}");
- }
- }
-
- public string[] ReadStringArray()
- {
- _reader.Read();
- if (_reader.TokenType != JsonToken.StartArray)
- {
- throw CreateUnexpectedException(_reader, "[");
- }
-
- var items = new List<string>();
-
- while (_reader.Read() && _reader.TokenType == JsonToken.String)
- {
- items.Add(GetStringValue());
- }
-
- if (_reader.TokenType != JsonToken.EndArray)
- {
- throw CreateUnexpectedException(_reader, "]");
- }
-
- return items.ToArray();
- }
-
- public void Skip() => _reader.Skip();
-
- public string ReadAsString()
- {
- Debug.Assert(IsTokenTypeProperty());
- return _reader.ReadAsString();
- }
-
- public bool? ReadAsNullableBoolean()
- {
- Debug.Assert(IsTokenTypeProperty());
- return _reader.ReadAsBoolean();
- }
-
- public bool ReadAsBoolean(bool defaultValue)
- {
- Debug.Assert(IsTokenTypeProperty());
- bool? nullableBool = _reader.ReadAsBoolean();
- return nullableBool ?? defaultValue;
- }
-
- private static Exception CreateUnexpectedException(JsonTextReader reader, string expected)
- {
- return new FormatException($"Unexpected character encountered, excepted '{expected}' " +
- $"at line {reader.LineNumber} position {reader.LinePosition} path {reader.Path}");
- }
- }
-}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using Newtonsoft.Json;
-
-namespace Microsoft.Extensions.DependencyModel
-{
- internal ref struct UnifiedJsonWriter
- {
- private readonly JsonTextWriter _writer;
-
- public UnifiedJsonWriter(JsonTextWriter writer)
- {
- _writer = writer;
- }
-
- public void WriteStartObject() => _writer.WriteStartObject();
- public void WriteEndObject() => _writer.WriteEndObject();
- public void WriteStartArray() => _writer.WriteStartArray();
- public void WriteEndArray() => _writer.WriteEndArray();
-
- public void Flush() => _writer.Flush();
-
- public void WriteStartObject(string propertyName, bool escape = true)
- {
- _writer.WritePropertyName(propertyName, escape);
- _writer.WriteStartObject();
- }
-
- public void WriteStartArray(string propertyName, bool escape = true)
- {
- _writer.WritePropertyName(propertyName, escape);
- _writer.WriteStartArray();
- }
-
- public void WriteString(string propertyName, string value, bool escape = true)
- {
- _writer.WritePropertyName(propertyName, escape);
- _writer.WriteValue(value);
- }
-
- public void WriteBoolean(string propertyName, bool value, bool escape = true)
- {
- _writer.WritePropertyName(propertyName, escape);
- _writer.WriteValue(value);
- }
-
- public void WriteStringValue(string value, bool escape = true)
- => _writer.WriteValue(value);
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>$(TestInfraTargetFramework)</TargetFramework>
- <StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
- <SignAssembly>true</SignAssembly>
- <PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
- <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
- <PackageReference Include="FluentAssertions" Version="4.19.4" />
- <PackageReference Include="Moq" Version="4.7.142" />
- <PackageReference Include="Microsoft.DotNet.ProjectModel" Version="1.0.0-rc2-002702" />
- <ProjectReference Include="..\..\managed\Microsoft.Extensions.DependencyModel\Microsoft.Extensions.DependencyModel.csproj" />
- </ItemGroup>
-
-</Project>
--- /dev/null
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29920.165
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyModel", "src\Microsoft.Extensions.DependencyModel.csproj", "{5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyModel", "ref\Microsoft.Extensions.DependencyModel.csproj", "{9EACDD3F-3833-4E71-954A-847989D634AB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.DependencyModel.Tests", "tests\Microsoft.Extensions.DependencyModel.Tests.csproj", "{E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{48E09E46-BD12-4B7E-9D10-3FEC7F9AE9B4}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{47B5CCF6-E349-42D1-B3C2-900EFF594C8A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{A05AC200-A15B-430E-A4BD-522C570DDCB3}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "pkg", "pkg", "{8C081484-2645-46B8-B33E-DC3D883B27F1}"
+ ProjectSection(SolutionItems) = preProject
+ pkg\Microsoft.Extensions.DependencyModel.pkgproj = pkg\Microsoft.Extensions.DependencyModel.pkgproj
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Debug|x64.Build.0 = Debug|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Debug|x86.Build.0 = Debug|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Release|x64.ActiveCfg = Release|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Release|x64.Build.0 = Release|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Release|x86.ActiveCfg = Release|Any CPU
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1}.Release|x86.Build.0 = Release|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Debug|x64.Build.0 = Debug|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Debug|x86.Build.0 = Debug|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Release|x64.ActiveCfg = Release|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Release|x64.Build.0 = Release|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Release|x86.ActiveCfg = Release|Any CPU
+ {9EACDD3F-3833-4E71-954A-847989D634AB}.Release|x86.Build.0 = Release|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Debug|x64.Build.0 = Debug|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Debug|x86.Build.0 = Debug|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Release|x64.ActiveCfg = Release|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Release|x64.Build.0 = Release|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Release|x86.ActiveCfg = Release|Any CPU
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {5E0AA1BE-28A2-4D25-A10A-E13EBDABE8A1} = {47B5CCF6-E349-42D1-B3C2-900EFF594C8A}
+ {9EACDD3F-3833-4E71-954A-847989D634AB} = {48E09E46-BD12-4B7E-9D10-3FEC7F9AE9B4}
+ {E0DEC773-1FE9-49B0-9562-1E245FE2DA5C} = {A05AC200-A15B-430E-A4BD-522C570DDCB3}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {56AA6766-64A9-4715-BC6B-4A24EF6AF7F9}
+ EndGlobalSection
+EndGlobal
--- /dev/null
+<Project DefaultTargets="Build">
+ <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" />
+ <ItemGroup>
+ <ProjectReference Include="..\src\Microsoft.Extensions.DependencyModel.csproj">
+ <SupportedFramework>net461;netcoreapp2.0;uap10.0.16299;$(AllXamarinFrameworks)</SupportedFramework>
+ </ProjectReference>
+ <!-- Elements from previous packages that will be included in the newly built package -->
+ <HarvestIncludePaths Include="lib/net451;lib/netstandard1.3;lib/netstandard1.6" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets))" />
+</Project>
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+// ------------------------------------------------------------------------------
+// Changes to this file must follow the https://aka.ms/api-review process.
+// ------------------------------------------------------------------------------
+
+namespace Microsoft.DotNet.PlatformAbstractions
+{
+ [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+ [System.ObsoleteAttribute("This type is obsolete and will be removed in a future version. The recommended alternative is System.HashCode.")]
+ public partial struct HashCodeCombiner
+ {
+ private int _dummyPrimitive;
+ public int CombinedHash { get { throw null; } }
+ public void Add(int i) { }
+ public void Add(object o) { }
+ public void Add(string s) { }
+ public void Add<TValue>(TValue value, System.Collections.Generic.IEqualityComparer<TValue> comparer) { }
+ public static Microsoft.DotNet.PlatformAbstractions.HashCodeCombiner Start() { throw null; }
+ }
+}
+namespace Microsoft.Extensions.DependencyModel
+{
+ public partial class CompilationLibrary : Microsoft.Extensions.DependencyModel.Library
+ {
+ public CompilationLibrary(string type, string name, string version, string hash, System.Collections.Generic.IEnumerable<string> assemblies, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency> dependencies, bool serviceable) : base (default(string), default(string), default(string), default(string), default(System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency>), default(bool)) { }
+ public CompilationLibrary(string type, string name, string version, string hash, System.Collections.Generic.IEnumerable<string> assemblies, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency> dependencies, bool serviceable, string path, string hashPath) : base (default(string), default(string), default(string), default(string), default(System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency>), default(bool)) { }
+ public System.Collections.Generic.IReadOnlyList<string> Assemblies { get { throw null; } }
+ public System.Collections.Generic.IEnumerable<string> ResolveReferencePaths() { throw null; }
+ public System.Collections.Generic.IEnumerable<string> ResolveReferencePaths(params Microsoft.Extensions.DependencyModel.Resolution.ICompilationAssemblyResolver[] customResolvers) { throw null; }
+ }
+ public partial class CompilationOptions
+ {
+ public CompilationOptions(System.Collections.Generic.IEnumerable<string> defines, string languageVersion, string platform, bool? allowUnsafe, bool? warningsAsErrors, bool? optimize, string keyFile, bool? delaySign, bool? publicSign, string debugType, bool? emitEntryPoint, bool? generateXmlDocumentation) { }
+ public bool? AllowUnsafe { get { throw null; } }
+ public string DebugType { get { throw null; } }
+ public static Microsoft.Extensions.DependencyModel.CompilationOptions Default { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList<string> Defines { get { throw null; } }
+ public bool? DelaySign { get { throw null; } }
+ public bool? EmitEntryPoint { get { throw null; } }
+ public bool? GenerateXmlDocumentation { get { throw null; } }
+ public string KeyFile { get { throw null; } }
+ public string LanguageVersion { get { throw null; } }
+ public bool? Optimize { get { throw null; } }
+ public string Platform { get { throw null; } }
+ public bool? PublicSign { get { throw null; } }
+ public bool? WarningsAsErrors { get { throw null; } }
+ }
+ public partial struct Dependency
+ {
+ private object _dummy;
+ private int _dummyPrimitive;
+ public Dependency(string name, string version) { throw null; }
+ public readonly string Name { get { throw null; } }
+ public readonly string Version { get { throw null; } }
+ public bool Equals(Microsoft.Extensions.DependencyModel.Dependency other) { throw null; }
+ public override bool Equals(object obj) { throw null; }
+ public override int GetHashCode() { throw null; }
+ }
+ public partial class DependencyContext
+ {
+ public DependencyContext(Microsoft.Extensions.DependencyModel.TargetInfo target, Microsoft.Extensions.DependencyModel.CompilationOptions compilationOptions, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.CompilationLibrary> compileLibraries, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeLibrary> runtimeLibraries, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeFallbacks> runtimeGraph) { }
+ public Microsoft.Extensions.DependencyModel.CompilationOptions CompilationOptions { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.CompilationLibrary> CompileLibraries { get { throw null; } }
+ public static Microsoft.Extensions.DependencyModel.DependencyContext Default { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeFallbacks> RuntimeGraph { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeLibrary> RuntimeLibraries { get { throw null; } }
+ public Microsoft.Extensions.DependencyModel.TargetInfo Target { get { throw null; } }
+ public static Microsoft.Extensions.DependencyModel.DependencyContext Load(System.Reflection.Assembly assembly) { throw null; }
+ public Microsoft.Extensions.DependencyModel.DependencyContext Merge(Microsoft.Extensions.DependencyModel.DependencyContext other) { throw null; }
+ }
+ public static partial class DependencyContextExtensions
+ {
+ public static System.Collections.Generic.IEnumerable<System.Reflection.AssemblyName> GetDefaultAssemblyNames(this Microsoft.Extensions.DependencyModel.DependencyContext self) { throw null; }
+ public static System.Collections.Generic.IEnumerable<System.Reflection.AssemblyName> GetDefaultAssemblyNames(this Microsoft.Extensions.DependencyModel.RuntimeLibrary self, Microsoft.Extensions.DependencyModel.DependencyContext context) { throw null; }
+ public static System.Collections.Generic.IEnumerable<string> GetDefaultNativeAssets(this Microsoft.Extensions.DependencyModel.DependencyContext self) { throw null; }
+ public static System.Collections.Generic.IEnumerable<string> GetDefaultNativeAssets(this Microsoft.Extensions.DependencyModel.RuntimeLibrary self, Microsoft.Extensions.DependencyModel.DependencyContext context) { throw null; }
+ public static System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeFile> GetDefaultNativeRuntimeFileAssets(this Microsoft.Extensions.DependencyModel.DependencyContext self) { throw null; }
+ public static System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeFile> GetDefaultNativeRuntimeFileAssets(this Microsoft.Extensions.DependencyModel.RuntimeLibrary self, Microsoft.Extensions.DependencyModel.DependencyContext context) { throw null; }
+ public static System.Collections.Generic.IEnumerable<System.Reflection.AssemblyName> GetRuntimeAssemblyNames(this Microsoft.Extensions.DependencyModel.DependencyContext self, string runtimeIdentifier) { throw null; }
+ public static System.Collections.Generic.IEnumerable<System.Reflection.AssemblyName> GetRuntimeAssemblyNames(this Microsoft.Extensions.DependencyModel.RuntimeLibrary self, Microsoft.Extensions.DependencyModel.DependencyContext context, string runtimeIdentifier) { throw null; }
+ public static System.Collections.Generic.IEnumerable<string> GetRuntimeNativeAssets(this Microsoft.Extensions.DependencyModel.DependencyContext self, string runtimeIdentifier) { throw null; }
+ public static System.Collections.Generic.IEnumerable<string> GetRuntimeNativeAssets(this Microsoft.Extensions.DependencyModel.RuntimeLibrary self, Microsoft.Extensions.DependencyModel.DependencyContext context, string runtimeIdentifier) { throw null; }
+ public static System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeFile> GetRuntimeNativeRuntimeFileAssets(this Microsoft.Extensions.DependencyModel.DependencyContext self, string runtimeIdentifier) { throw null; }
+ public static System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeFile> GetRuntimeNativeRuntimeFileAssets(this Microsoft.Extensions.DependencyModel.RuntimeLibrary self, Microsoft.Extensions.DependencyModel.DependencyContext context, string runtimeIdentifier) { throw null; }
+ }
+ public partial class DependencyContextJsonReader : Microsoft.Extensions.DependencyModel.IDependencyContextReader, System.IDisposable
+ {
+ public DependencyContextJsonReader() { }
+ public void Dispose() { }
+ protected virtual void Dispose(bool disposing) { }
+ public Microsoft.Extensions.DependencyModel.DependencyContext Read(System.IO.Stream stream) { throw null; }
+ }
+ public partial class DependencyContextLoader
+ {
+ public DependencyContextLoader() { }
+ public static Microsoft.Extensions.DependencyModel.DependencyContextLoader Default { get { throw null; } }
+ public Microsoft.Extensions.DependencyModel.DependencyContext Load(System.Reflection.Assembly assembly) { throw null; }
+ }
+ public partial class DependencyContextWriter
+ {
+ public DependencyContextWriter() { }
+ public void Write(Microsoft.Extensions.DependencyModel.DependencyContext context, System.IO.Stream stream) { }
+ }
+ public partial interface IDependencyContextReader : System.IDisposable
+ {
+ Microsoft.Extensions.DependencyModel.DependencyContext Read(System.IO.Stream stream);
+ }
+ public partial class Library
+ {
+ public Library(string type, string name, string version, string hash, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency> dependencies, bool serviceable) { }
+ public Library(string type, string name, string version, string hash, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency> dependencies, bool serviceable, string path, string hashPath) { }
+ public Library(string type, string name, string version, string hash, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency> dependencies, bool serviceable, string path, string hashPath, string runtimeStoreManifestName = null) { }
+ public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.Dependency> Dependencies { get { throw null; } }
+ public string Hash { get { throw null; } }
+ public string HashPath { get { throw null; } }
+ public string Name { get { throw null; } }
+ public string Path { get { throw null; } }
+ public string RuntimeStoreManifestName { get { throw null; } }
+ public bool Serviceable { get { throw null; } }
+ public string Type { get { throw null; } }
+ public string Version { get { throw null; } }
+ }
+ public partial class ResourceAssembly
+ {
+ public ResourceAssembly(string path, string locale) { }
+ public string Locale { get { throw null; } set { } }
+ public string Path { get { throw null; } set { } }
+ }
+ public partial class RuntimeAssembly
+ {
+ public RuntimeAssembly(string assemblyName, string path) { }
+ public System.Reflection.AssemblyName Name { get { throw null; } }
+ public string Path { get { throw null; } }
+ public static Microsoft.Extensions.DependencyModel.RuntimeAssembly Create(string path) { throw null; }
+ }
+ public partial class RuntimeAssetGroup
+ {
+ public RuntimeAssetGroup(string runtime, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeFile> runtimeFiles) { }
+ public RuntimeAssetGroup(string runtime, System.Collections.Generic.IEnumerable<string> assetPaths) { }
+ public RuntimeAssetGroup(string runtime, params string[] assetPaths) { }
+ public System.Collections.Generic.IReadOnlyList<string> AssetPaths { get { throw null; } }
+ public string Runtime { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeFile> RuntimeFiles { get { throw null; } }
+ }
+ public partial class RuntimeFallbacks
+ {
+ public RuntimeFallbacks(string runtime, System.Collections.Generic.IEnumerable<string> fallbacks) { }
+ public RuntimeFallbacks(string runtime, params string[] fallbacks) { }
+ public System.Collections.Generic.IReadOnlyList<string> Fallbacks { get { throw null; } set { } }
+ public string Runtime { get { throw null; } set { } }
+ }
+ public partial class RuntimeFile
+ {
+ public RuntimeFile(string path, string assemblyVersion, string fileVersion) { }
+ public string AssemblyVersion { get { throw null; } }
+ public string FileVersion { get { throw null; } }
+ public string Path { get { throw null; } }
+ }
+ public partial class RuntimeLibrary : Microsoft.Extensions.DependencyModel.Library
+ {
+ public RuntimeLibrary(string type, string name, string version, string hash, System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> runtimeAssemblyGroups, System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> nativeLibraryGroups, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.ResourceAssembly> resourceAssemblies, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency> dependencies, bool serviceable) : base (default(string), default(string), default(string), default(string), default(System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency>), default(bool)) { }
+ public RuntimeLibrary(string type, string name, string version, string hash, System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> runtimeAssemblyGroups, System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> nativeLibraryGroups, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.ResourceAssembly> resourceAssemblies, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency> dependencies, bool serviceable, string path, string hashPath) : base (default(string), default(string), default(string), default(string), default(System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency>), default(bool)) { }
+ public RuntimeLibrary(string type, string name, string version, string hash, System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> runtimeAssemblyGroups, System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> nativeLibraryGroups, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.ResourceAssembly> resourceAssemblies, System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency> dependencies, bool serviceable, string path, string hashPath, string runtimeStoreManifestName) : base (default(string), default(string), default(string), default(string), default(System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.Dependency>), default(bool)) { }
+ public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> NativeLibraryGroups { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.ResourceAssembly> ResourceAssemblies { get { throw null; } }
+ public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> RuntimeAssemblyGroups { get { throw null; } }
+ }
+ public partial class TargetInfo
+ {
+ public TargetInfo(string framework, string runtime, string runtimeSignature, bool isPortable) { }
+ public string Framework { get { throw null; } }
+ public bool IsPortable { get { throw null; } }
+ public string Runtime { get { throw null; } }
+ public string RuntimeSignature { get { throw null; } }
+ }
+}
+namespace Microsoft.Extensions.DependencyModel.Resolution
+{
+ public partial class AppBaseCompilationAssemblyResolver : Microsoft.Extensions.DependencyModel.Resolution.ICompilationAssemblyResolver
+ {
+ public AppBaseCompilationAssemblyResolver() { }
+ public AppBaseCompilationAssemblyResolver(string basePath) { }
+ public bool TryResolveAssemblyPaths(Microsoft.Extensions.DependencyModel.CompilationLibrary library, System.Collections.Generic.List<string> assemblies) { throw null; }
+ }
+ public partial class CompositeCompilationAssemblyResolver : Microsoft.Extensions.DependencyModel.Resolution.ICompilationAssemblyResolver
+ {
+ public CompositeCompilationAssemblyResolver(Microsoft.Extensions.DependencyModel.Resolution.ICompilationAssemblyResolver[] resolvers) { }
+ public bool TryResolveAssemblyPaths(Microsoft.Extensions.DependencyModel.CompilationLibrary library, System.Collections.Generic.List<string> assemblies) { throw null; }
+ }
+ public partial class DotNetReferenceAssembliesPathResolver
+ {
+ public static readonly string DotNetReferenceAssembliesPathEnv;
+ public DotNetReferenceAssembliesPathResolver() { }
+ public static string Resolve() { throw null; }
+ }
+ public partial interface ICompilationAssemblyResolver
+ {
+ bool TryResolveAssemblyPaths(Microsoft.Extensions.DependencyModel.CompilationLibrary library, System.Collections.Generic.List<string> assemblies);
+ }
+ public partial class PackageCompilationAssemblyResolver : Microsoft.Extensions.DependencyModel.Resolution.ICompilationAssemblyResolver
+ {
+ public PackageCompilationAssemblyResolver() { }
+ public PackageCompilationAssemblyResolver(string nugetPackageDirectory) { }
+ public bool TryResolveAssemblyPaths(Microsoft.Extensions.DependencyModel.CompilationLibrary library, System.Collections.Generic.List<string> assemblies) { throw null; }
+ }
+ public partial class ReferenceAssemblyPathResolver : Microsoft.Extensions.DependencyModel.Resolution.ICompilationAssemblyResolver
+ {
+ public ReferenceAssemblyPathResolver() { }
+ public ReferenceAssemblyPathResolver(string defaultReferenceAssembliesPath, string[] fallbackSearchPaths) { }
+ public bool TryResolveAssemblyPaths(Microsoft.Extensions.DependencyModel.CompilationLibrary library, System.Collections.Generic.List<string> assemblies) { throw null; }
+ }
+}
+namespace System.Collections.Generic
+{
+ public static partial class CollectionExtensions
+ {
+ public static System.Collections.Generic.IEnumerable<string> GetDefaultAssets(this System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> self) { throw null; }
+ public static Microsoft.Extensions.DependencyModel.RuntimeAssetGroup GetDefaultGroup(this System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> self) { throw null; }
+ public static System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeFile> GetDefaultRuntimeFileAssets(this System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> self) { throw null; }
+ public static System.Collections.Generic.IEnumerable<string> GetRuntimeAssets(this System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> self, string runtime) { throw null; }
+ public static System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeFile> GetRuntimeFileAssets(this System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> self, string runtime) { throw null; }
+ public static Microsoft.Extensions.DependencyModel.RuntimeAssetGroup GetRuntimeGroup(this System.Collections.Generic.IEnumerable<Microsoft.Extensions.DependencyModel.RuntimeAssetGroup> self, string runtime) { throw null; }
+ }
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFrameworks>netstandard2.0;net461;$(NetFrameworkCurrent)</TargetFrameworks>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="Microsoft.Extensions.DependencyModel.cs" />
+ </ItemGroup>
+ <ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ </ItemGroup>
+</Project>
private static string GetApplicationBasePath()
{
- string basePath =
-#if NET451
- (string)AppDomain.CurrentDomain.GetData("APP_CONTEXT_BASE_DIRECTORY") ??
- AppDomain.CurrentDomain.BaseDirectory;
-#else
- AppContext.BaseDirectory;
-#endif
+ string basePath = AppContext.BaseDirectory;
return Path.GetFullPath(basePath);
}
}
-using Microsoft.Extensions.DependencyModel;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using Microsoft.Extensions.DependencyModel;
using System.Linq;
namespace System.Collections.Generic
public IReadOnlyList<string> Assemblies { get; }
-#if !NETSTANDARD1_3
internal static ICompilationAssemblyResolver DefaultResolver { get; } = new CompositeCompilationAssemblyResolver(new ICompilationAssemblyResolver[]
{
new AppBaseCompilationAssemblyResolver(),
}
return assemblies;
}
-#endif
-
}
}
// See the LICENSE file in the project root for more information.
using System;
-using Microsoft.DotNet.PlatformAbstractions;
+using System.Numerics.Hashing;
namespace Microsoft.Extensions.DependencyModel
{
return obj is Dependency && Equals((Dependency) obj);
}
- public override int GetHashCode()
- {
- var combiner = HashCodeCombiner.Start();
- combiner.Add(Name);
- combiner.Add(Version);
- return combiner.CombinedHash;
- }
+ public override int GetHashCode() =>
+ HashHelpers.Combine(Name.GetHashCode(), Version.GetHashCode());
}
-}
\ No newline at end of file
+}
{
public class DependencyContext
{
-#if !NETSTANDARD1_3
private static readonly Lazy<DependencyContext> _defaultContext = new Lazy<DependencyContext>(LoadDefault);
-#endif
public DependencyContext(TargetInfo target,
CompilationOptions compilationOptions,
RuntimeGraph = runtimeGraph.ToArray();
}
-#if !NETSTANDARD1_3
public static DependencyContext Default => _defaultContext.Value;
-#endif
public TargetInfo Target { get; }
);
}
-#if !NETSTANDARD1_3
private static DependencyContext LoadDefault()
{
var entryAssembly = Assembly.GetEntryAssembly();
{
return DependencyContextLoader.Default.Load(assembly);
}
-#endif
private class LibraryMergeEqualityComparer<T> : IEqualityComparer<T> where T : Library
{
-using System;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.IO;
using System.Reflection;
-#if !NETSTANDARD1_3
-
namespace Microsoft.Extensions.DependencyModel
{
public class DependencyContextLoader
}
}
}
-
-#endif
using System.Collections.Generic;
using System.Linq;
-#if !NETSTANDARD1_3
-
namespace Microsoft.Extensions.DependencyModel
{
internal class DependencyContextPaths
private static DependencyContextPaths GetCurrent()
{
-#if NETSTANDARD1_6
- var deps = AppContext.GetData(DepsFilesProperty);
- var fxDeps = AppContext.GetData(FxDepsFileProperty);
-#else
var deps = AppDomain.CurrentDomain.GetData(DepsFilesProperty);
var fxDeps = AppDomain.CurrentDomain.GetData(FxDepsFileProperty);
-#endif
+
return Create(deps as string, fxDeps as string);
}
}
}
}
-#endif
private bool AddRuntimeSpecificAssetGroups(string assetType, IEnumerable<RuntimeAssetGroup> assetGroups, bool wroteObjectStart, ref UnifiedJsonWriter jsonWriter)
{
IEnumerable<RuntimeAssetGroup> groups = assetGroups.Where(g => !string.IsNullOrEmpty(g.Runtime));
- if (!wroteObjectStart && (groups.Count() > 0))
+ if (!wroteObjectStart && groups.Any())
{
jsonWriter.WriteStartObject(DependencyContextStrings.RuntimeTargetsPropertyName, escape: false);
wroteObjectStart = true;
{
public static IEnvironment Default = new EnvironmentWrapper();
- public string GetEnvironmentVariable(string name)
- {
- return Environment.GetEnvironmentVariable(name);
- }
+ public string GetEnvironmentVariable(string name) => Environment.GetEnvironmentVariable(name);
- public bool IsWindows()
- {
- return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
- }
+ public object GetAppContextData(string name) => AppDomain.CurrentDomain.GetData(name);
+
+ public bool IsWindows() => RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
}
-}
\ No newline at end of file
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+
+namespace Microsoft.DotNet.PlatformAbstractions
+{
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [Obsolete("This type is obsolete and will be removed in a future version. The recommended alternative is System.HashCode.")]
+ public struct HashCodeCombiner
+ {
+ private long _combinedHash64;
+
+ public int CombinedHash
+ {
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ get { return _combinedHash64.GetHashCode(); }
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private HashCodeCombiner(long seed)
+ {
+ _combinedHash64 = seed;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void Add(int i)
+ {
+ _combinedHash64 = ((_combinedHash64 << 5) + _combinedHash64) ^ i;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void Add(string s)
+ {
+ var hashCode = (s != null) ? s.GetHashCode() : 0;
+ Add(hashCode);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void Add(object o)
+ {
+ var hashCode = (o != null) ? o.GetHashCode() : 0;
+ Add(hashCode);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public void Add<TValue>(TValue value, IEqualityComparer<TValue> comparer)
+ {
+ var hashCode = value != null ? comparer.GetHashCode(value) : 0;
+ Add(hashCode);
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static HashCodeCombiner Start()
+ {
+ return new HashCodeCombiner(0x1505L);
+ }
+ }
+}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.IO;
+
+namespace Microsoft.Extensions.DependencyModel
+{
+ public interface IDependencyContextReader: IDisposable
+ {
+ DependencyContext Read(Stream stream);
+ }
+}
internal interface IEnvironment
{
string GetEnvironmentVariable(string name);
+ object GetAppContextData(string name);
bool IsWindows();
}
-}
\ No newline at end of file
+}
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFrameworks>netstandard2.0;net461;$(NetFrameworkCurrent)</TargetFrameworks>
+ <ExcludeCurrentFullFrameworkFromPackage>true</ExcludeCurrentFullFrameworkFromPackage>
+ <EnableDefaultItems>true</EnableDefaultItems>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Compile Include="$(CoreLibSharedDir)\System\Numerics\Hashing\HashHelpers.cs">
+ <Link>System\Numerics\Hashing\HashHelpers.cs</Link>
+ </Compile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <InternalsVisibleTo Include="Microsoft.Extensions.DependencyModel.Tests" />
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(TargetsNetFx)' == 'true'">
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
+ </ItemGroup>
+ <ItemGroup>
+ <Reference Include="System.Buffers" />
+ <Reference Include="System.Memory" />
+ <Reference Include="System.Text.Json" />
+ <Reference Include="System.Text.Encodings.Web" />
+ </ItemGroup>
+</Project>
using System.Collections.Generic;
using System.IO;
-#if !NETSTANDARD1_3
-
namespace Microsoft.Extensions.DependencyModel.Resolution
{
public class AppBaseCompilationAssemblyResolver : ICompilationAssemblyResolver
}
}
}
-
-#endif
internal static string[] GetDefaultProbeDirectories(IEnvironment environment)
{
-#if !NETSTANDARD1_3
-#if NETSTANDARD1_6
- var probeDirectories = AppContext.GetData("PROBING_DIRECTORIES");
-#else
- var probeDirectories = AppDomain.CurrentDomain.GetData("PROBING_DIRECTORIES");
-#endif
+ var probeDirectories = environment.GetAppContextData("PROBING_DIRECTORIES");
var listOfDirectories = probeDirectories as string;
{
return listOfDirectories.Split(new char[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries);
}
-#endif
var packageDirectory = environment.GetEnvironmentVariable("NUGET_PACKAGES");
-using System;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
-using System;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using System.Collections.Generic;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.Json;
.Subject.Values<string>().Should().BeEquivalentTo(new[] { "MY", "DEFINES" });
}
}
-}
\ No newline at end of file
+}
public class DependencyContextLoaderTests
{
[Fact]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "GetEntryAssembly() returns null")]
public void LoadLoadsExtraPaths()
{
string appDepsPath = "appPath.deps.json";
public void LoadReturnsNullWhenNotFound()
{
var loader = new DependencyContextLoader();
- Assert.Null(loader.Load(typeof(string).Assembly));
+ Assert.Null(loader.Load(typeof(Moq.Mock).Assembly));
}
}
}
public class EnvironmentMockBuilder
{
private Dictionary<string, string> _variables = new Dictionary<string, string>();
+ private Dictionary<string, object> _appContextData = new Dictionary<string, object>();
private bool _isWindows;
internal static IEnvironment Empty { get; } = Create().Build();
return this;
}
+ public EnvironmentMockBuilder AddAppContextData(string name, object value)
+ {
+ _appContextData.Add(name, value);
+ return this;
+ }
+
public EnvironmentMockBuilder SetIsWindows(bool value)
{
_isWindows = value;
internal IEnvironment Build()
{
- return new EnvironmentMock(_variables, _isWindows);
+ return new EnvironmentMock(_variables, _appContextData, _isWindows);
}
private class EnvironmentMock : IEnvironment
{
private Dictionary<string, string> _variables;
+ private Dictionary<string, object> _appContextData;
private bool _isWindows;
- public EnvironmentMock(Dictionary<string, string> variables, bool isWindows)
+ public EnvironmentMock(Dictionary<string, string> variables, Dictionary<string, object> appContextData, bool isWindows)
{
_variables = variables;
+ _appContextData = appContextData;
_isWindows = isWindows;
}
public string GetEnvironmentVariable(string name)
{
- string value = null;
- _variables.TryGetValue(name, out value);
+ _variables.TryGetValue(name, out string value);
+ return value;
+ }
+
+ public object GetAppContextData(string name)
+ {
+ _appContextData.TryGetValue(name, out object value);
return value;
}
-using System;
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
+ <EnableDefaultItems>true</EnableDefaultItems>
+ <GenerateDependencyFile>true</GenerateDependencyFile>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ReferenceFromRuntime Include="Microsoft.Extensions.DependencyModel" />
+
+ <PackageReference Include="Microsoft.DotNet.InternalAbstractions" Version="1.0.0" />
+ <PackageReference Include="FluentAssertions" Version="4.19.4" />
+ <PackageReference Include="Moq" Version="$(MoqVersion)" />
+ <PackageReference Include="Microsoft.DotNet.ProjectModel" Version="1.0.0-rc2-002702" />
+ </ItemGroup>
+
+</Project>
{
var environment = EnvironmentMockBuilder.Create()
.AddVariable("NUGET_PACKAGES", PackagesPath)
+ .AddAppContextData("PROBING_DIRECTORIES", string.Empty)
.Build();
var result = PackageCompilationAssemblyResolver.GetDefaultProbeDirectories(environment);
- // The host for .NET Core 2.0 always sets the PROBING_DIRECTORIES property on the AppContext. Because of that,
- // no additional package directories should be returned from this, even if they are set as environment variables.
- result.Should().NotContain(PackagesPath);
+ result.Should().Contain(PackagesPath);
}
var environment = EnvironmentMockBuilder.Create()
.SetIsWindows(true)
.AddVariable("USERPROFILE", "User Profile")
+ .AddAppContextData("PROBING_DIRECTORIES", string.Empty)
.Build();
var result = PackageCompilationAssemblyResolver.GetDefaultProbeDirectories(environment);
- // The host for .NET Core 2.0 always sets the PROBING_DIRECTORIES property on the AppContext. Because of that,
- // no additional package directories should be returned from this, even if they are set as environment variables.
- result.Should().NotContain(Path.Combine("User Profile", ".nuget", "packages"));
+ result.Should().Contain(Path.Combine("User Profile", ".nuget", "packages"));
}
[Fact]
var environment = EnvironmentMockBuilder.Create()
.SetIsWindows(false)
.AddVariable("HOME", "User Home")
+ .AddAppContextData("PROBING_DIRECTORIES", string.Empty)
.Build();
var result = PackageCompilationAssemblyResolver.GetDefaultProbeDirectories(environment);
- // The host for .NET Core 2.0 always sets the PROBING_DIRECTORIES property on the AppContext. Because of that,
- // no additional package directories should be returned from this, even if they are set as environment variables.
- result.Should().NotContain(Path.Combine("User Home", ".nuget", "packages"));
+ result.Should().Contain(Path.Combine("User Home", ".nuget", "packages"));
}
[Fact]
"5.0.0.0": "5.0.0"
}
},
+ "Microsoft.Extensions.DependencyModel": {
+ "StableVersions": [
+ "1.0.0",
+ "1.0.2",
+ "1.0.3",
+ "1.1.0",
+ "1.1.1",
+ "1.1.2",
+ "1.1.9",
+ "2.0.0",
+ "2.0.1",
+ "2.0.3",
+ "2.0.4",
+ "2.1.0",
+ "3.0.0",
+ "3.0.1",
+ "3.0.2",
+ "3.0.3",
+ "3.1.0",
+ "3.1.1",
+ "3.1.2",
+ "3.1.3"
+ ],
+ "BaselineVersion": "5.0.0",
+ "InboxOn": {},
+ "AssemblyVersionInPackageVersion": {
+ "3.1.3.0": "5.0.0",
+ "5.0.0.0": "5.0.0"
+ }
+ },
"Microsoft.Extensions.FileProviders.Abstractions": {
"StableVersions": [
"1.0.0",
"BaselineVersion": "1.6.1",
"InboxOn": {}
},
+ "Newtonsoft.Json": {
+ "StableVersions": [
+ "9.0.1"
+ ],
+ "InboxOn": {},
+ "AssemblyVersionInPackageVersion": {
+ "9.0.0.0": "9.0.1"
+ }
+ },
"PresentationBuildTasks": {
"InboxOn": {
"net45": "4.0.0.0"
"4.6.1",
"4.7.0",
"4.8.0",
- "4.8.1",
+ "4.8.1"
],
"BaselineVersion": "4.8.0",
"InboxOn": {
"CommonTypes": []
},
{
+ "Name": "Microsoft.Extensions.DependencyModel",
+ "Description": "Abstractions for reading `.deps` files.",
+ "CommonTypes": [
+ "Microsoft.Extensions.DependencyModel.DependencyContext"
+ ]
+ },
+ {
"Name": "Microsoft.Extensions.DependencyInjection.Abstractions",
"Description": "Abstractions for dependency injection.",
"CommonTypes": [
<IgnoredTypes Include="System.Threading.IOCompletionCallback" />
<IgnoredTypes Include="System.Threading.NativeOverlapped" />
<IgnoredTypes Include="System.DBNull" />
+ <IgnoredTypes Include="System.Runtime.Serialization.OnDeserializedAttribute" />
+ <IgnoredTypes Include="System.Runtime.Serialization.OnDeserializingAttribute" />
+ <IgnoredTypes Include="System.Runtime.Serialization.OnSerializingAttribute" />
+ <IgnoredTypes Include="System.Runtime.Serialization.OnSerializedAttribute" />
+ <IgnoredTypes Include="System.Runtime.Serialization.SerializationException" />
+ <IgnoredTypes Include="System.Runtime.Serialization.StreamingContext" />
</ItemGroup>
</Project>
\ No newline at end of file
<IgnoredTypes Include="System.Threading.IOCompletionCallback" />
<IgnoredTypes Include="System.Threading.NativeOverlapped" />
<IgnoredTypes Include="System.DBNull" />
+ <IgnoredTypes Include="System.Runtime.Serialization.OnDeserializedAttribute" />
+ <IgnoredTypes Include="System.Runtime.Serialization.OnDeserializingAttribute" />
+ <IgnoredTypes Include="System.Runtime.Serialization.OnSerializingAttribute" />
+ <IgnoredTypes Include="System.Runtime.Serialization.OnSerializedAttribute" />
+ <IgnoredTypes Include="System.Runtime.Serialization.SerializationException" />
+ <IgnoredTypes Include="System.Runtime.Serialization.StreamingContext" />
</ItemGroup>
</Project>
\ No newline at end of file
<ItemGroup>
<!-- Type duplicated: https://github.com/dotnet/runtime/issues/33998 -->
<IgnoredTypes Include="Microsoft.Extensions.Logging.LoggingBuilderExtensions" />
+ <!-- Type duplicated: https://github.com/dotnet/runtime/issues/34420 -->
+ <IgnoredTypes Include="System.Collections.Generic.CollectionExtensions" />
</ItemGroup>
<Target Name="LogBeginTest">
<ItemGroup>
<!-- reference everything but self -->
+ <!-- Type duplicated in Microsoft.Extensions.DependencyModel. Exclude it for now: https://github.com/dotnet/runtime/issues/34420 -->
<ReferencePath
Include="$(RefPath)*.dll"
- Exclude="$(RefPath)$(MSBuildProjectName).dll;$(RefPath)netstandard.dll" />
+ Exclude="$(RefPath)$(MSBuildProjectName).dll;$(RefPath)netstandard.dll;$(RefPath)Microsoft.Extensions.DependencyModel.dll" />
<!-- required by compiler to resolve core types -->
<ProjectReference Condition="'$(MSBuildProjectName)' != 'netstandard'"