Skip to content

ASP.NET MVC fails with "Cannot find compilation library location for package 'Microsoft.Win32.Registry'" on Ubuntu #2701

@mikeharder

Description

@mikeharder

Steps to reproduce

  1. VM with clean Ubuntu 16.04
  2. Install dotnet-dev-1.0.1 to install dependencies (https://www.microsoft.com/net/core#linuxubuntu)
  3. wget https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.0-preview1-005817/dotnet-dev-ubuntu-x64.2.0.0-preview1-005817.tar.gz
  4. mkdir dotnet-dev-ubuntu-x64.2.0.0-preview1-005817
  5. tar xf dotnet-dev-ubuntu-x64.2.0.0-preview1-005817.tar.gz -C dotnet-dev-ubuntu-x64.2.0.0-preview1-005817
  6. mkdir mvc
  7. cd mvc
  8. ../dotnet-dev-ubuntu-x64.2.0.0-preview1-005817/dotnet new mvc
  9. ../dotnet-dev-ubuntu-x64.2.0.0-preview1-005817/dotnet run

Exception

Unhandled Exception: System.InvalidOperationException: Cannot find compilation library location for package 'Microsoft.Win32.Registry'
   at Microsoft.Extensions.DependencyModel.CompilationLibrary.ResolveReferencePaths()
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.MoveNext()
   at Microsoft.AspNetCore.Mvc.Razor.Compilation.MetadataReferenceFeatureProvider.PopulateFeature(IEnumerable`1 parts, MetadataReferenceFeature feature)
   at Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartManager.PopulateFeature[TFeature](TFeature feature)
   at Microsoft.AspNetCore.Mvc.Razor.Internal.RazorReferenceManager.GetCompilationReferences()

grep -r DependencyModel *

bin/Debug/netcoreapp2.0/mvc.deps.json:          "Microsoft.Extensions.DependencyModel": "2.0.0-preview1-002028",
bin/Debug/netcoreapp2.0/mvc.deps.json:      "Microsoft.Extensions.DependencyModel/2.0.0-preview1-002028": {
bin/Debug/netcoreapp2.0/mvc.deps.json:          "lib/netstandard1.6/Microsoft.Extensions.DependencyModel.dll": {}
bin/Debug/netcoreapp2.0/mvc.deps.json:          "lib/netstandard1.6/Microsoft.Extensions.DependencyModel.dll": {}
bin/Debug/netcoreapp2.0/mvc.deps.json:    "Microsoft.Extensions.DependencyModel/2.0.0-preview1-002028": {
obj/project.assets.json:          "Microsoft.Extensions.DependencyModel": "2.0.0-preview1-002028",
obj/project.assets.json:      "Microsoft.Extensions.DependencyModel/2.0.0-preview1-002028": {
obj/project.assets.json:          "lib/netstandard1.6/Microsoft.Extensions.DependencyModel.dll": {}
obj/project.assets.json:          "lib/netstandard1.6/Microsoft.Extensions.DependencyModel.dll": {}
obj/project.assets.json:    "Microsoft.Extensions.DependencyModel/2.0.0-preview1-002028": {
obj/project.assets.json:        "lib/net451/Microsoft.Extensions.DependencyModel.dll",
obj/project.assets.json:        "lib/netstandard1.3/Microsoft.Extensions.DependencyModel.dll",
obj/project.assets.json:        "lib/netstandard1.6/Microsoft.Extensions.DependencyModel.dll",
obj/project.assets.json:        "build/Microsoft.Extensions.DependencyModel.dll",
obj/project.assets.json:        "build/desktop/Microsoft.Extensions.DependencyModel.dll",

dotnet/core-setup#2039 was thought to fix this, but MVC still fails after this change.

Metadata

Metadata

Assignees

Labels

blockingMarks issues that we want to fast track in order to unblock other important workbug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions