An assembly specified in the application dependencies manifest (RhWeb.deps.json) was not found
I got a weird error on IIS since I migrate my Asp.Net Core 1.1 to Asp.Net Core 2.0. I publish with MSBuild interface.
I don't use ApplicationInsights.AspNetCore in my project....
Here is the error message.
Error:
An assembly specified in the application dependencies manifest (RhWeb.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.xm
HI... I am also having the same issue. Does anyone have a fix for this.
I also hit this. For me, it had to do with the use of
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />
in my .csproj when running in an environment that had installed a dotnetcore 2.0 runtime, but not an SDK. See docs on implicit store.
The solution was adding the following to my .csproj:
<PropertyGroup>
<PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>
Although it should be noted that installing the SDK also worked.
^this.
I upgraded to Asp.Net Core 2.0 as well in this week, and I was trying to deploy to my Azure app service. I don't have the option to install the SDK there.
I have arch linux (not officially supported).
dotnet new empty
dotnet publish -o ./published
dotnet published/<ProjectName>.dll
and that error is presented
but
...
//I added runtime identifier for linux
dotnet publish -o ./published -r linux-x64
dotnet published/<ProjectName>.dll
this works.
So perhaps try to specify runtime identifier when you publish your application.
I get these errors no matter what I do w/AspNetCore 2.0.3.
I had to roll back to 2.0.0.
Having similar issue after upgrading to 2.0.3 and publish to IIS. Was working in 2.0.0
An assembly specified in the application dependencies manifest (MyApp.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
@ctrl-brk I find that simply creating a new dotnetcore 2.0 mvc project in VS 2017 and then publishing to Azure results in this error when you try to run the app in Azure. Quite annoying as I did nothing but follow wizards. I did not find a solution yet, even after adding Microsoft.AspNetCore.Antiforgery via NuGet and republishing the project.
I figured out the issue--I needed to install aspnetcore web hosting 2.0.3.
dotnet restore installs aspnetcore 2.0.3, and we aren't doing standalone deployments, so the higher version couldn't find the libraries it needed.
@cr41g1w OMG. I should've think about it. Thank you.
@doctorhilarius what do you mean by I figured out the issue--I needed to install aspnetcore web hosting 2.0.3. I have this error in docker?
with dotnet 2.0.3, I got the error after I deployed the app onto Azure Web Service. Adding <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest> into the project file is dirty but useful, it can work as a charm.
I found aspnet/Home#2254.
The issue seems to be with using dotnet at the command line to create the project.
I originally created a dotnet core mvc project at the command line, then opened it in VS 2017 and published it to Azure. This did not run in Azure.
I just tried again but this time I used the VS 2017 wizard to create the project and published it to Azure. This project runs perfectly fine in Azure.
I will see if I can find the difference in these two projects as the output looks the same at first glance.
Hi, same problem here:
Error: An assembly specified in the application dependencies manifest (src.deps.json) was not found: package: 'Microsoft.AspNetCore.Antiforgery', version: '2.0.1' path: 'lib/netstandard2.0/Microsoft.AspNetCore.Antiforgery.dll'
switched from
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.**3**" />
to
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.**0**" />
Now it works without any other changes.
@alexzaytsev-newsroomly He most likely means this: https://aka.ms/dotnetcore-2-windowshosting It's a link from this article: https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x (Install the .NET Core Windows Server Hosting bundle)
This will help you, if you run your own IIS Server.
sry, forgot to preview.... ;-)
After a lot more messing about, it seems this dotnetcore 2.0 is very very buggy when you try to deploy to Azure. If you create a dotnet core 1.1 project in VS it will deploy and run perfectly. No matter how you create a 2.0 project, most of the time it will fail to run at all on Azure.
Also started getting this error after upgrading Microsoft.AspNetCore.All to 2.0.3 as prompted by NuGet. The .NET Core 2.0 Web App ran locally but failed to run the published App on my Ubuntu server with:
deploy@Ubuntu-1604-xenial-64-minimal:~/client-tests$ dotnet Tests.Server.dll
Error:
An assembly specified in the application dependencies manifest (Tests.Server.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
The solution was to downgrade Microsoft.AspNetCore.All back to 2.0.0. Either this was not tested properly or we're supposed to manually upgrade Microsoft's NuGet packages on each deployed server everytime the meta Microsoft.AspNetCore.All package is updated? If so what command are we supposed to run as I don't see anything in dotnet --help.
nuget doesn't install aspnetcore windows server hosting 2.0.3.
that has to be installed with: https://aka.ms/dotnetcore-2-windowshosting
@doctorhilarius What do we need to do for Ubuntu?