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
Published application should run
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'
$ 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
I can repro this as well.
It looks like the one that is in the store has a mis-matched version than the one trying to be used.
Error from the run:
Error: assembly specified in the dependencies manifest was not found probably due to missing runtime store associated with manifest.win-x64.xml;manifest.win-x86.xml;manifest.osx-x64.xml;manifest.linux-x64.xml -- package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.0-preview1-24801', path: 'lib/netstandard1.3/Microsoft.AspNetCore.Antiforgery.dll'
Notice version: '2.0.0-preview1-24801'
My store contains:
The store has the no-timestamp versions, but the manifest seems to have timestamped versions. We need to be using the no-timestamp version of the Microsoft.AspNetCore.All version here \aspnetci\drops\Coherence-Signed\2.0.0-preview1\Latest\Signed\Packages-NoTimeStamp
Have the templates not been updated?
The cache being picked up has been converted to the timestamp versions since there is no feed with the preview1-final packages
When are packages downloaded to the "store"?
Can I still publish my app in a way they don't require certain packages to be present on the host's store?
Is there some documentation on the "store"?
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:
@livarcocc @mlorbetske - this still repos for me on
```
dotnet --info
.NET Command Line Tools (2.0.0-preview1-005952)
Product Information:
Version: 2.0.0-preview1-005952
Commit SHA-1 hash: 356e309f17
Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: F:\dotnet\sdk\2.0.0-preview1-005952\
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview1-002106-00
Build : 86fe9816c8ba782241c441c3228c665e393c3ef3
````
Which is the tip of dotnet/cli/release/2.0.0 right now
Me and @mlorbetske have talked about this. We have a feed that we can use now and @mlorbetske will send a PR (soon) that will align the templates, the cache and the runtime store, which will fix this.
@mlorbetske any idea when we can expect this PR? Anything I can help with?
The PR is out https://github.com/dotnet/cli/pull/6521
@eerhardt Thanks for explaining!
After reading the docs, I think a more generic way of saying 'don't assume stored packages' is to specify a --manifest
parameter on publish and point that to an empty manifest file. Perhaps it makes sense to add a command line option that doesn't require creating an empty manifest file.
Where can I find the manifest file for ASP.NET projects?
You can just set the msbuild property on the command line.
@davidfowl I added /p:TargetManifestFiles=
and it works like a charm. Thanks! Do you know where the ASP.NET manifest is stored in git?
The manifest is generated from the Microsoft.AspNetCore.All meta package https://github.com/aspnet/MetaPackages/tree/dev/src
Does the cli build process generate it? Or fetch it from somewhere?
Where does it end up under /opt/dotnet?
Does the cli build process generate it?
There's a new dotnet cache
command that creates it.
Where does it end up under /opt/dotnet?
My daily cli doesn't have a dotnet cache
or an /opt/dotnet/store
. The doc doesn't mention where manifest files are stored.
We'd prefer to build the CLI and include the manifest file but not the packages themselves. This is to avoid shipping binary blobs we are not building. Is that feasible?
Was cache renamed to store?
Yes, dotnet store
my bad.
/cc @JunTaoLuo who is working on the runtime store for ASP.NET to answer those questions
Thanks @davidfowl , I'll check with him.
This has been fixed now. Please, re-activate if you still run into issues.
I am confused by this issue. I started to see it too:
Error: assembly specified in the dependencies manifest was not found probably due to missing runtime store associated with manifest.win7-x64.xml;manifest.win7-x86.xml;manifest.osx-x64.xml;manifest.linux-x64.xml -- package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.0-preview1-final', path: 'lib/netcoreapp2.0/Microsoft.AspNetCore.Antiforgery.dll'
I am using the docker image dotnet:2.0-runtime
to deploy for an asp.netcore 2.0 preview 1 final app.
I still do the regular dotnet restore/build/test/publish
and then tries to deploy this to google cloud via docker (this is when it fails).
I do use the new <PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0-preview1-final" />
meta package in the csproj
could you please advise if anything is required to fix this?
@Jonathan34 you need to use the aspnetcore docker image @natemcmaster knows the exact version.
@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
I had the same problem using
FROM microsoft/dotnet:2.0-runtime-deps
and importing version
2.0.0-preview1-002111-00
(1) solved the problem and I'm not using the import anymore
(2) I didn't try
Ok thanks. I was using dotnet image to easily set my own port and ASPNETCORE_URLS.
The aspnetcore image does not easily allow to set https with a custom port that google app engine requires (8080)
crit: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to start Kestrel.
System.InvalidOperationException: HTTPS endpoints can only be configured using KestrelServerOptions.Listen().
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.<BindAddressAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
...
will try to use .UseUrls("https://*:8080")
instead
Ok i actually have an issue with this change. Likely not related to cli though!
When i run my app locally, i set the ASPNETCORE_ENV
to http://localhost:5000
using vscode tasks.
In the dockerfile, i used to set the following (notice http vs https):
EXPOSE 8080/tcp
ENV ASPNETCORE_URLS https://*:8080
This was good because I could control the port and http/https using environment variable only.
Now it seems i have to hardcode this value in Program.cs
which i can't really do.
I deploy several services in docker containers that are listening on port 8080 (Google App Engine requirement). App Engine provide the https certificate automatically.
But when I run them locally, I override the env var and specify some custom port 5000, 5001...
How would you recommend i now handle this case using the aspnetcore 2.0 image.
The Kestrel ListenOptionsHttpsExtensions
seem to require a certificate or a password which i do not have as it is managed by Google...
@Jonathan34 this has strayed off topic. Can you open a new issue on https://github.com/aspnet/KestrelHttpServer?
doing it right now :)
Hello,
I work on the Google runtime images for App Engine Flex for .NET Core. Currently looking at the 2.0.0 images. Is there a way to control this cachine/store behavior that does not require the user to modify the .csproj? Or, are there official redist packages that we can use to pre-populate the cache ourselves as well?
@ivannaranjo See https://github.com/aspnet/Home/issues/2033
@livarcocc this issue still exists on dotnet core 2.0, please view my post https://github.com/dotnet/cli/issues/7680
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
@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
@livarcocc how do I install the asp.net core runtime store? I followed these instructions to install the .net core 2.0.0 runtime on Ubuntu: https://www.microsoft.com/net/download/linux
However I'm seeing this error when I run dotnet xxx.dll
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 have another Ubuntu box where I've got the 2.0.0 SDK installed and the same code is working fine, but I'd prefer to not have the SDK installed here if possible...?
@JunTaoLuo @leecow can you provide instructions on how to install the store separately?
@wessiyad if possible, you can just install the SDK, which will bring the store with it.
The aspnetcore-store-2.0.0 package should be available in all of the feeds (just confirmed the rpm and xenial feeds). sudo apt-get aspnetcore-store-2.0.0
on Ubuntu.
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.
Looks like an oversight on my part. Will need to add them to the release list.
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.
@evil-shrike same issue, found workaround without this?
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
In dockerfile:
FROM microsoft/aspnetcore
@verysimplenick updating .net sdk to 2.0.3 solved the problem, but my comment was about the lack of diagnostic and bad dev experience.
There are so many issues open/closed on this so please point me if I'm supposed to ask about this somewhere else:
I have a fresh install centOS 7 box where I deployed our api. The API is targeting the latest sdk 2.1.101. As part of our deployment process via Octopus, we check if we need to install the sdk/runtime. Since we saw all these issues when installing only the runtime, we decided to go with installing the SDK instead.
Oddly enough, when I ran a deploy for this new machine, it failed starting the service with:
An assembly specified in the application dependencies manifest 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
So, listing the packages installed, I can see I don't have the store
folder at /usr/share/dotnet
. I have only dotnet host LICENSE.txt sdk shared ThirdPartyNotices.txt
Running dotnet --list
shows me:
.NET Command Line Tools (2.1.101)
Product Information:
Version: 2.1.101
Commit SHA-1 hash: 6c22303bf0
Runtime Environment:
OS Name: centos
OS Version: 7
OS Platform: Linux
RID: centos.7-x64
Base Path: /usr/share/dotnet/sdk/2.1.101/
Microsoft .NET Core Shared Framework Host
Version : 2.0.6
Build : 74b1c703813c8910df5b96f304b0f2b78cdf194d
I'm confused now. I thought installing the SDK would also install the runtime store thus preventing this issues. Can someone clarify, please?
@joaopgrassi if you are using dotnet packages that come with CentOS, those do not include the runtime store. For 2.0, the runtime store wasn't source buildable, so only Microsoft packages include the runtime store. In any case, you should be able to get your app running if you include the store packages with your app. This can be done by adding /p:PublishWithAspNetCoreTargetManifest=false
to your dotnet publish
command (or adding that property to the csproj file).
I see. But if I do that, then my artifact is way bigger.. which is not cool. But what I don't understand is we have several other linux vms and the store
folder is there, and they were also installed via yum. The only difference is the other machines have also other versions installed. But I tried installing the 2.0.0 and 2.0.3 SDK's and that didn't work so.. not sure anymore.
Microsoft provides a feed which has these packages. Probably those vms use Microsoft packages.
2.1 should be cooler 馃槑
Ah I see your point now, was a little confused. Sure, as part of our deploy script we add the microsoft feed as explained here . Then we just do yum install dotnet-sdk-{version}
. The issue is that this package (from MS feeds) doesn't contain the runtime store.
Most helpful comment
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