sdk: published application is missing assembly (missing runtime store associated ...) [2.0.0-preview2-005905]

Steps to reproduce

Using latest cli (2.0.0-preview2-005905)

mkdir mvc;cd mvc
dotnet new mvc
dotnet publish
dotnet bin/Debug/netcoreapp2.0/publish/mvc.dll

Expected behavior

Published application should run

Actual behavior


Error: assembly specified in the dependencies manifest was not found probably due to missing runtime store associated with manifest.linux-x64.xml -- package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.0-preview1-24647', path: 'lib/netstandard1.3/Microsoft.AspNetCore.Antiforgery.dll'

Environment data

$ dotnet --info
.NET Command Line Tools (2.0.0-preview2-005905)

Product Information:
 Version:            2.0.0-preview2-005905
 Commit SHA-1 hash:  2cc5612fec

Runtime Environment:
 OS Name:     rhel
 OS Version:  7
 OS Platform: Linux
 RID:         rhel.7-x64

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview2-002093-00
  Build    : 1a195046fd92bd73d993d804bea2f4506c2b56f1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 47 (35 by maintainers)

Most upvoted comments

Still having this issue. Mine is with application insights.

Error: An assembly specified in the application dependencies manifest (XXX.deps.json) was not found: package: ‘Microsoft.ApplicationInsights.AspNetCore’, version: ‘2.1.1’ path: ‘lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll’ This assembly was expected to be in the local runtime store as the application was published using the following target manifest files: aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml

I encountered this issue when I published my app built for 2.0.3 onto a server with 2.0.0 only installed. Obviously it couldn’t work and should fail but I believe error message could be a bit clearer.

C:\Apps\survey-core-dev>dotnet SurveyNetCore.dll
Error:
  An assembly specified in the application dependencies manifest (SurveyNetCore.deps.json) was not found:
    package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1'
    path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'
  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
    aspnetcore-store-2.0.3.xml

And ideally as I was publishing the app via dotnet publish -c Debug /p:WebPublishMethod=MSDeploy it could tell me about missing dependencies.

When are packages downloaded to the “store”?

They are installed when you install the .NET Core SDK.

Can I still publish my app in a way they don’t require certain packages to be present on the host’s store?

Yes, set <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> in your .csproj

Is there some documentation on the “store”?

There’s some work in progress:

https://github.com/dotnet/docs/pull/1912

@Jonathan34 The microsoft/dotnet:2.0-runtime image does not include the ASP.NET Core runtime store. Either you need (1) use the ASP.NET Core image,

FROM microsoft/aspnetcore:2.0

or (2) disable runtime store trimming and bring ASP.NET Core into the microsoft/dotnet image yourself. You can disable runtime store trimming by adding this to your project:

<PropertyGroup>
  <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> 
</PropertyGroup>

cc @glennc

You can install the runtime store by itself on ubuntu via sudo apt get install aspnetcore-store-2.0.0. This part of our documentation is poor and we should update this somewhere.

However this isn’t the expected mechanism for acquisition on Ubuntu. The runtime and runtime store are packaged into “Linux Server Hosting” installers with the package name dotnet-hosting-2.0.0. Those were built for 2.0.0 and should be on the official feeds but I can’t seem to find them via apt get. Is there any reason they are missing @leecow ? This should also be documented.

@evil-shrike same issue, found workaround without this?

  <PropertyGroup  Condition="'$(Configuration)' == 'Release'">
    <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
  </PropertyGroup>

In dockerfile:

FROM microsoft/aspnetcore

Looks like an oversight on my part. Will need to add them to the release list.

@faGH do you have the asp.net core runtime store installed in the machine where you are trying to run your app? That’s is required because by default, ASP.NET Apps are published with a dependency on the runtime store.

cc @JunTaoLuo