Move DependencyModel to libraries (#34296)
authorEric Erhardt <eric.erhardt@microsoft.com>
Sat, 4 Apr 2020 01:47:17 +0000 (20:47 -0500)
committerGitHub <noreply@github.com>
Sat, 4 Apr 2020 01:47:17 +0000 (20:47 -0500)
* Move DependencyModel to libraries

Moving DependencyModel to the same folder and infrastructure as the rest of our libraries, and out of the installer folder.

I also dropped support for anything below netstandard2.0 at this time.

Contributes to #3470
Fix #3425

* Exclude DependencyModel in shims and package checks since it has a duplicated type with System.Collections.

* Harvest previous TFM assets from the previously shipped package.

This also means we start building DependencyModel for net461 to ensure full framework support works correctly, and doesn't pick up the old net451 asset.

* Fix unit tests to consistently pass on core and netfx.

* Add back HashCodeCombiner as obsolete.

* Fix DependencyModel pkg build to reference the correct version of Newtonsoft.Json for the harvested package assets.

* Adding IgnoredTypes for Serialization.Primitives in netcoreapp1.0 and netcoreapp1.1

Co-authored-by: Jose Perez Rodriguez <joperezr@microsoft.com>
81 files changed:
eng/Signing.props
eng/Subsets.props
src/installer/Microsoft.DotNet.CoreSetup.sln
src/installer/managed/Microsoft.DotNet.PlatformAbstractions/Microsoft.DotNet.PlatformAbstractions.csproj
src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextJsonReader.JsonTextReader.cs [deleted file]
src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextWriter.JsonTextWriter.cs [deleted file]
src/installer/managed/Microsoft.Extensions.DependencyModel/IDependencyContextReader.cs [deleted file]
src/installer/managed/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.csproj [deleted file]
src/installer/managed/Microsoft.Extensions.DependencyModel/Properties/Properties.cs [deleted file]
src/installer/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonReader.JsonTextReader.cs [deleted file]
src/installer/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonWriter.JsonTextWriter.cs [deleted file]
src/installer/test/Microsoft.Extensions.DependencyModel.Tests/Microsoft.Extensions.DependencyModel.Tests.csproj [deleted file]
src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln [new file with mode: 0644]
src/libraries/Microsoft.Extensions.DependencyModel/pkg/Microsoft.Extensions.DependencyModel.pkgproj [new file with mode: 0644]
src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.csproj [new file with mode: 0644]
src/libraries/Microsoft.Extensions.DependencyModel/src/ApplicationEnvironment.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/ApplicationEnvironment.cs with 70% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/ArrayBufferWriter.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/ArrayBufferWriter.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/CollectionExtensions.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/CollectionExtensions.cs with 90% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationLibrary.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/CompilationLibrary.cs with 99% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/CompilationOptions.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/CompilationOptions.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Dependency.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Dependency.cs with 80% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContext.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContext.cs with 97% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextExtensions.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextExtensions.cs with 97% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.Utf8JsonReader.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextJsonReader.Utf8JsonReader.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextJsonReader.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextLoader.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextLoader.cs with 99% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextPaths.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextPaths.cs with 91% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextStrings.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextStrings.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.Utf8JsonWriter.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextWriter.Utf8JsonWriter.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextWriter.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextWriter.cs with 99% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/DirectoryWrapper.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/DirectoryWrapper.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/EnvironmentWrapper.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/EnvironmentWrapper.cs with 60% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/FileSystemWrapper.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/FileSystemWrapper.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/FileWrapper.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/FileWrapper.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/HashCodeCombiner.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.DependencyModel/src/IDependencyContextReader.cs [new file with mode: 0644]
src/libraries/Microsoft.Extensions.DependencyModel/src/IDirectory.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/IDirectory.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/IEnvironment.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/IEnvironment.cs with 88% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/IFile.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/IFile.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/IFileSystem.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/IFileSystem.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Library.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Library.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Microsoft.Extensions.DependencyModel.csproj [new file with mode: 0644]
src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/AppBaseCompilationAssemblyResolver.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Resolution/AppBaseCompilationAssemblyResolver.cs with 99% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/CompositeCompilationAssemblyResolver.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Resolution/CompositeCompilationAssemblyResolver.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/DotNetReferenceAssembliesPathResolver.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Resolution/DotNetReferenceAssembliesPathResolver.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ICompilationAssemblyResolver.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Resolution/ICompilationAssemblyResolver.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/PackageCompilationAssemblyResolver.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Resolution/PackageCompilationAssemblyResolver.cs with 94% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ReferenceAssemblyPathResolver.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Resolution/ReferenceAssemblyPathResolver.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/Resolution/ResolverUtils.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/Resolution/ResolverUtils.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/ResourceAssembly.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/ResourceAssembly.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssembly.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/RuntimeAssembly.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeAssetGroup.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/RuntimeAssetGroup.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFallbacks.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/RuntimeFallbacks.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeFile.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/RuntimeFile.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/RuntimeLibrary.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/RuntimeLibrary.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/TargetInfo.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/TargetInfo.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonReader.Utf8JsonReader.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonReader.Utf8JsonReader.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/src/UnifiedJsonWriter.Utf8JsonWriter.cs [moved from src/installer/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonWriter.Utf8JsonWriter.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/AppBaseResolverTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/AppBaseResolverTests.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/CompilationLibraryTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/CompilationLibraryTests.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/CompositeResolverTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/CompositeResolverTests.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextBuilderTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextBuilderTests.cs with 98% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonReaderTest.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextJsonReaderTest.cs with 99% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextJsonWriterTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextJsonWriterTests.cs with 99% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextLoaderTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextLoaderTests.cs with 94% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextPathsTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextPathsTests.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/DependencyContextTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/DependencyContextTests.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/EnvironmentMockBuilder.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/EnvironmentMockBuilder.cs with 67% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/JsonAssetions.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/JsonAssetions.cs with 89% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/Microsoft.Extensions.DependencyModel.Tests.csproj [new file with mode: 0644]
src/libraries/Microsoft.Extensions.DependencyModel/tests/PackageResolverTest.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/PackageResolverTest.cs with 83% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/ReferenceAssemblyResolverTests.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/ReferenceAssemblyResolverTests.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/TestLibraryFactory.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/TestLibraryFactory.cs with 100% similarity]
src/libraries/Microsoft.Extensions.DependencyModel/tests/mocks/FileSystemMockBuilder.cs [moved from src/installer/test/Microsoft.Extensions.DependencyModel.Tests/mocks/FileSystemMockBuilder.cs with 100% similarity]
src/libraries/pkg/baseline/packageIndex.json
src/libraries/pkg/descriptions.json
src/libraries/pkg/test/frameworkSettings/netcoreapp1.0/settings.targets
src/libraries/pkg/test/frameworkSettings/netcoreapp1.1/settings.targets
src/libraries/pkg/test/packageTest.targets
src/libraries/shims/generated/Directory.Build.props

index b4cc294..05f2a8b 100644 (file)
@@ -72,7 +72,6 @@
 
     <!-- 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>
 
index aa7a89b..386bed4 100644 (file)
@@ -24,7 +24,7 @@
 
       ./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>
 
index ec98664..e3b39fe 100644 (file)
@@ -11,12 +11,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
 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}"
@@ -61,22 +57,6 @@ Global
                {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
@@ -93,22 +73,6 @@ Global
                {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
@@ -241,8 +205,6 @@ Global
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
        EndGlobalSection
-       GlobalSection(NestedProjects) = preSolution
-       EndGlobalSection
        GlobalSection(ExtensibilityGlobals) = postSolution
                SolutionGuid = {28B9726D-802B-478D-AF7A-B9243B9E180B}
        EndGlobalSection
index 7ad385f..06a5298 100644 (file)
@@ -9,9 +9,7 @@
   </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" />
diff --git a/src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextJsonReader.JsonTextReader.cs b/src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextJsonReader.JsonTextReader.cs
deleted file mode 100644 (file)
index 0c6c5ca..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-// 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);
-        }
-    }
-}
diff --git a/src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextWriter.JsonTextWriter.cs b/src/installer/managed/Microsoft.Extensions.DependencyModel/DependencyContextWriter.JsonTextWriter.cs
deleted file mode 100644 (file)
index 857f9cb..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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));
-                }
-            }
-        }
-    }
-}
diff --git a/src/installer/managed/Microsoft.Extensions.DependencyModel/IDependencyContextReader.cs b/src/installer/managed/Microsoft.Extensions.DependencyModel/IDependencyContextReader.cs
deleted file mode 100644 (file)
index 0603b5b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-using System;
-using System.IO;
-
-namespace Microsoft.Extensions.DependencyModel
-{
-    public interface IDependencyContextReader: IDisposable
-    {
-        DependencyContext Read(Stream stream);
-    }
-}
\ No newline at end of file
diff --git a/src/installer/managed/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.csproj b/src/installer/managed/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.csproj
deleted file mode 100644 (file)
index 7a48c05..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<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>
diff --git a/src/installer/managed/Microsoft.Extensions.DependencyModel/Properties/Properties.cs b/src/installer/managed/Microsoft.Extensions.DependencyModel/Properties/Properties.cs
deleted file mode 100644 (file)
index ffc81f4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-[assembly: AssemblyMetadataAttribute("Serviceable", "True")]
diff --git a/src/installer/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonReader.JsonTextReader.cs b/src/installer/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonReader.JsonTextReader.cs
deleted file mode 100644 (file)
index 4a2a405..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-// 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}");
-        }
-    }
-}
diff --git a/src/installer/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonWriter.JsonTextWriter.cs b/src/installer/managed/Microsoft.Extensions.DependencyModel/UnifiedJsonWriter.JsonTextWriter.cs
deleted file mode 100644 (file)
index a5bb6b9..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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);
-    }
-}
diff --git a/src/installer/test/Microsoft.Extensions.DependencyModel.Tests/Microsoft.Extensions.DependencyModel.Tests.csproj b/src/installer/test/Microsoft.Extensions.DependencyModel.Tests/Microsoft.Extensions.DependencyModel.Tests.csproj
deleted file mode 100644 (file)
index b19fbe7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<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>
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln b/src/libraries/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.sln
new file mode 100644 (file)
index 0000000..e148704
--- /dev/null
@@ -0,0 +1,81 @@
+
+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
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/pkg/Microsoft.Extensions.DependencyModel.pkgproj b/src/libraries/Microsoft.Extensions.DependencyModel/pkg/Microsoft.Extensions.DependencyModel.pkgproj
new file mode 100644 (file)
index 0000000..6d9d2b9
--- /dev/null
@@ -0,0 +1,11 @@
+<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>
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.cs b/src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.cs
new file mode 100644 (file)
index 0000000..e11309f
--- /dev/null
@@ -0,0 +1,226 @@
+// 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; }
+    }
+}
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.csproj b/src/libraries/Microsoft.Extensions.DependencyModel/ref/Microsoft.Extensions.DependencyModel.csproj
new file mode 100644 (file)
index 0000000..48d24ea
--- /dev/null
@@ -0,0 +1,12 @@
+<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>
@@ -13,13 +13,7 @@ namespace Microsoft.Extensions.DependencyModel
 
         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);
         }
     }
@@ -1,4 +1,8 @@
-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
@@ -42,7 +42,6 @@ namespace Microsoft.Extensions.DependencyModel
 
         public IReadOnlyList<string> Assemblies { get; }
 
-#if !NETSTANDARD1_3
         internal static ICompilationAssemblyResolver DefaultResolver { get; } = new CompositeCompilationAssemblyResolver(new ICompilationAssemblyResolver[]
         {
             new AppBaseCompilationAssemblyResolver(),
@@ -83,7 +82,5 @@ namespace Microsoft.Extensions.DependencyModel
             }
             return assemblies;
         }
-#endif
-
     }
 }
@@ -3,7 +3,7 @@
 // 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
 {
@@ -37,12 +37,7 @@ 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
+}
@@ -11,9 +11,7 @@ namespace Microsoft.Extensions.DependencyModel
 {
     public class DependencyContext
     {
-#if !NETSTANDARD1_3
         private static readonly Lazy<DependencyContext> _defaultContext = new Lazy<DependencyContext>(LoadDefault);
-#endif
 
         public DependencyContext(TargetInfo target,
             CompilationOptions compilationOptions,
@@ -49,9 +47,7 @@ namespace Microsoft.Extensions.DependencyModel
             RuntimeGraph = runtimeGraph.ToArray();
         }
 
-#if !NETSTANDARD1_3
         public static DependencyContext Default => _defaultContext.Value;
-#endif
 
         public TargetInfo Target { get; }
 
@@ -79,7 +75,6 @@ namespace Microsoft.Extensions.DependencyModel
                 );
         }
 
-#if !NETSTANDARD1_3
         private static DependencyContext LoadDefault()
         {
             var entryAssembly = Assembly.GetEntryAssembly();
@@ -95,7 +90,6 @@ namespace Microsoft.Extensions.DependencyModel
         {
             return DependencyContextLoader.Default.Load(assembly);
         }
-#endif
 
         private class LibraryMergeEqualityComparer<T> : IEqualityComparer<T> where T : Library
         {
@@ -1,4 +1,8 @@
-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;
@@ -8,8 +8,6 @@ using System.Diagnostics;
 using System.IO;
 using System.Reflection;
 
-#if !NETSTANDARD1_3
-
 namespace Microsoft.Extensions.DependencyModel
 {
     public class DependencyContextLoader
@@ -165,5 +163,3 @@ namespace Microsoft.Extensions.DependencyModel
         }
     }
 }
-
-#endif
@@ -6,8 +6,6 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 
-#if !NETSTANDARD1_3
-
 namespace Microsoft.Extensions.DependencyModel
 {
     internal class DependencyContextPaths
@@ -35,13 +33,9 @@ namespace Microsoft.Extensions.DependencyModel
 
         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);
         }
 
@@ -61,4 +55,3 @@ namespace Microsoft.Extensions.DependencyModel
         }
     }
 }
-#endif
@@ -292,7 +292,7 @@ namespace Microsoft.Extensions.DependencyModel
         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;
@@ -11,14 +11,10 @@ namespace Microsoft.Extensions.DependencyModel
     {
         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
+}
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/HashCodeCombiner.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/HashCodeCombiner.cs
new file mode 100644 (file)
index 0000000..ae840bc
--- /dev/null
@@ -0,0 +1,63 @@
+// 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);
+        }
+    }
+}
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/IDependencyContextReader.cs b/src/libraries/Microsoft.Extensions.DependencyModel/src/IDependencyContextReader.cs
new file mode 100644 (file)
index 0000000..e9c6430
--- /dev/null
@@ -0,0 +1,14 @@
+// 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);
+    }
+}
@@ -7,6 +7,7 @@ namespace Microsoft.Extensions.DependencyModel
     internal interface IEnvironment
     {
         string GetEnvironmentVariable(string name);
+        object GetAppContextData(string name);
         bool IsWindows();
     }
-}
\ No newline at end of file
+}
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/src/Microsoft.Extensions.DependencyModel.csproj b/src/libraries/Microsoft.Extensions.DependencyModel/src/Microsoft.Extensions.DependencyModel.csproj
new file mode 100644 (file)
index 0000000..dadbc7e
--- /dev/null
@@ -0,0 +1,30 @@
+<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>
@@ -6,8 +6,6 @@ using System;
 using System.Collections.Generic;
 using System.IO;
 
-#if !NETSTANDARD1_3
-
 namespace Microsoft.Extensions.DependencyModel.Resolution
 {
     public class AppBaseCompilationAssemblyResolver : ICompilationAssemblyResolver
@@ -115,5 +113,3 @@ namespace Microsoft.Extensions.DependencyModel.Resolution
         }
     }
 }
-
-#endif
@@ -37,12 +37,7 @@ namespace Microsoft.Extensions.DependencyModel.Resolution
 
         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;
 
@@ -50,7 +45,6 @@ namespace Microsoft.Extensions.DependencyModel.Resolution
             {
                 return listOfDirectories.Split(new char[] { Path.PathSeparator }, StringSplitOptions.RemoveEmptyEntries);
             }
-#endif
 
             var packageDirectory = environment.GetEnvironmentVariable("NUGET_PACKAGES");
 
@@ -1,4 +1,8 @@
-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;
@@ -1,4 +1,8 @@
-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;
@@ -1,4 +1,8 @@
-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;
@@ -644,4 +648,4 @@ namespace Microsoft.Extensions.DependencyModel.Tests
                 .Subject.Values<string>().Should().BeEquivalentTo(new[] { "MY", "DEFINES" });
         }
     }
-}
\ No newline at end of file
+}
@@ -11,6 +11,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests
     public class DependencyContextLoaderTests
     {
         [Fact]
+        [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, "GetEntryAssembly() returns null")]
         public void LoadLoadsExtraPaths()
         {
             string appDepsPath = "appPath.deps.json";
@@ -88,7 +89,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests
         public void LoadReturnsNullWhenNotFound()
         {
             var loader = new DependencyContextLoader();
-            Assert.Null(loader.Load(typeof(string).Assembly));
+            Assert.Null(loader.Load(typeof(Moq.Mock).Assembly));
         }
     }
 }
@@ -9,6 +9,7 @@ namespace Microsoft.Extensions.DependencyModel.Tests
     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();
@@ -24,6 +25,12 @@ namespace Microsoft.Extensions.DependencyModel.Tests
             return this;
         }
 
+        public EnvironmentMockBuilder AddAppContextData(string name, object value)
+        {
+            _appContextData.Add(name, value);
+            return this;
+        }
+
         public EnvironmentMockBuilder SetIsWindows(bool value)
         {
             _isWindows = value;
@@ -32,24 +39,31 @@ namespace Microsoft.Extensions.DependencyModel.Tests
 
         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;
             }
 
@@ -1,4 +1,8 @@
-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;
diff --git a/src/libraries/Microsoft.Extensions.DependencyModel/tests/Microsoft.Extensions.DependencyModel.Tests.csproj b/src/libraries/Microsoft.Extensions.DependencyModel/tests/Microsoft.Extensions.DependencyModel.Tests.csproj
new file mode 100644 (file)
index 0000000..e7463cc
--- /dev/null
@@ -0,0 +1,18 @@
+<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>
@@ -20,12 +20,11 @@ namespace Microsoft.Extensions.DependencyModel.Tests
         {
             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);
         }
 
 
@@ -35,12 +34,11 @@ namespace Microsoft.Extensions.DependencyModel.Tests
             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]
@@ -49,12 +47,11 @@ namespace Microsoft.Extensions.DependencyModel.Tests
             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]
index e143135..2af1fe9 100644 (file)
         "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": {
index 449c46b..87b23a3 100644 (file)
     "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": [
index ac52538..f319b95 100644 (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
index f1a20b8..846df54 100644 (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
index 2d1c98b..2196f4a 100644 (file)
@@ -23,6 +23,8 @@
   <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">
index f936b3f..2768718 100644 (file)
 
   <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'"