I'm trying to run this brand new aspnet 2.1 app -- that I built -- on WIndows bash using .netcore 2.1. And I get the following error:
An assembly specified in the application dependencies manifest (AutoFaqRestApi.deps.json) was not found:
package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
I do not have anything to do with ApplicationInsights. And I have not explicitly added it anywhere to my project. How can I get rid of it? Or is this references by the aspnet itself?
Seems to be a duplicate of https://github.com/dotnet/coreclr/issues/13542
Actually no. the recommendation in the above link did not fix the issue.
I have the same issue.
I have installed Core SDK v2.1.300, Core Runtime v2.1.0 and Core Hosting Environment on the brand new target server (Windows Server 2012 R2).
Deploying my .Net Core v2.0 app (Microsoft.AspNetCore.All v2.0.8)
Figured temporary workaround - choose target runtime to anything else other than 'Portable' (win-x64 in my case):
This will inflate your app size however.
Microsoft, please double check the .Net Core SDK v2.1.300 and/or Core Runtime build for missing libs that should have been included.
Having this issue as well on a console application with the following command:
dotnet publish -c Release
Target server dotnet --info
:
dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.301
Commit: 59524873d6
Runtime Environment:
OS Name: Windows
OS Version: 6.3.9600
OS Platform: Windows
RID: win81-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.301\
Host (useful for support):
Version: 2.1.1
Commit: 6985b9f684
.NET Core SDKs installed:
2.1.301 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNe
tCore.All]
Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNe
tCore.App]
Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.
App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Getting the following error at runtime:
Error:
An assembly specified in the application dependencies manifest (MyProject.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
EDIT:
In our case, we were referencing the 2.0.0 metapackage of Microsoft.AspNetCore.All
, which is seemingly packaged along with only the 2.0 SDK, updating to the latest meta package version of 2.1.1 fixed it for us.
@pakrym - any idea on this?
I have a very similar issue on an Amazon EC2 running WIndows Server 2016, where if I do anything other than publish a self-contained app (i.e. with runtime win-x64) I receive an error. This is even the case when I deploy with
An assembly specified in the application dependencies manifest (XTag.API.deps.json) was not found:
package: 'System.Security.Cryptography.Cng', version: '4.5.0'
path: 'runtimes/win/lib/netcoreapp2.0/System.Security.Cryptography.Cng.dll'
I don't know why the deps.json has specified this runtimes path, since I can see this exact dll in the site root. The deps.json file is generated, so is there any way to force it to look in the local directory first?
It's possible that installing the sdk on the server will allow me to ship a smaller package, but I'm a bit confused as to why you would need to install _an sdk_ when you're not doing any development on the server - why does the sdk give you dlls which the runtime doesn't?
Deploying a self contained app works, but it's very frustrating to be forced to deploy a much larger package just because somehow the dotnet core runtime on the Server is incomplete. Is there any clean solution for this, or do we have to wait for a later version of dotnet core for these bugs in common deployment scenarios to be fixed?
Just to emphasise, the publish command which works is:
dotnet publish proj.csproj -c Release -f netcoreapp2.0 -r win-x64 -o site
and the one which doesn't is:
dotnet publish proj.csproj -c Release -f netcoreapp2.0 -o site
Also note that I'm not doing anything specific with cryptography.
I'm seeing this as well running ASP.NET Core 2.1. Running locally through IIS. I have two apps using the same nugets. One works fine, the other gives me this in my log file:
Error:
An assembly specified in the application dependencies manifest (Users.Web.Api.deps.json) was not found:
package: 'AutoMapper', version: '7.0.1'
path: 'lib/netcoreapp2.0/AutoMapper.dll'
My solution was to upgrade all project dependencies. It solved the problem in my case.
Have the same issue with Windows Server 2016 on AWS and a console app on .NET Core 2.0 / 2.2.
Tried to publish it for win-x64, but that didn't help.
I'm trying to deploy to GCP and I get a similar error: (dotnet --version: 2.1.500)
Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [9]
Application startup error:
Error: An assembly specified in the application dependencies manifest (MY-APP-NAME.deps.json) was not found:
package: 'AspNetCoreRateLimit', version: '2.1.0'
path: 'lib/netstandard1.6/AspNetCoreRateLimit.dll'
My MY-APP-NAME.csproj:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App"/>
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All"/>
...
<PackageReference Include="AspNetCoreRateLimit" Version="2.1.0"/>
...
</ItemGroup>
</Project>
@pakrym / @pranavkm - any ideas on what might cause this or how to diagnose?
@Eilon I remember seeing similar issues a long time ago but can't remember the cause. csproj
looks reasonable. Repro app would help to diagnose the issue here.
something that resembles that happened to me, there was another project (.net framework) in the solution and it was referenced by the .net core project. I've deleted the project from the solution, and after that I've started seeing this error when trying to publish. It was solved by re-adding the other project to the solution, referencing it again, removing the reference from the references window and only then deleting the project from the solution explorer. It appears that there is an issue with removing the referenced project from the manifests when dependencies are deleted. In a case of a nuget like application insights, I would try removing it using the nuget manager or the package manager console. Anyway, at least in my case it looks more like a bug in visual studio than a bug in .net core.
I had this with an IIS deployment on a Windows Server 2016 VM after installing .NET Core 3 Preview and running my first Core 3 web app. After lots of IIS restarts and a huge amount of faffing with code (because I thought the issue was there) it finally occurred to me to restart the server, which then magically fixed it.
I could here the words "have you tried turning it off and on again" ringing in my ears...
Had similar error:
Error: An assembly specified in the application dependencies manifest (ISS.API.deps.json) was not found: package: 'System.Diagnostics.DiagnosticSource', version: '4.5.1' path: 'lib/netstandard1.3/System.Diagnostics.DiagnosticSource.dll'
Problem was due to a small change to dependencies in csproj file. That resulted in more files to deploy. Modified installer to include the new files.
Most helpful comment
Actually no. the recommendation in the above link did not fix the issue.