runtime icon indicating copy to clipboard operation
runtime copied to clipboard

An assembly specified in the application dependencies manifest (RhWeb.deps.json) was not found

Open joellacas opened this issue 9 years ago • 47 comments

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

joellacas avatar Aug 23 '17 12:08 joellacas

HI... I am also having the same issue. Does anyone have a fix for this.

rakeshchevuru avatar Sep 07 '17 22:09 rakeshchevuru

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.

el2iot2 avatar Sep 08 '17 04:09 el2iot2

^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.

helloserve avatar Sep 14 '17 05:09 helloserve

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.

siimhs avatar Oct 12 '17 13:10 siimhs

I get these errors no matter what I do w/AspNetCore 2.0.3.

I had to roll back to 2.0.0.

doctorhilarius avatar Nov 15 '17 21:11 doctorhilarius

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 avatar Nov 16 '17 00:11 ctrl-brk

@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.

cr41g1w avatar Nov 16 '17 16:11 cr41g1w

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.

doctorhilarius avatar Nov 16 '17 16:11 doctorhilarius

@cr41g1w OMG. I should've think about it. Thank you.

ctrl-brk avatar Nov 16 '17 16:11 ctrl-brk

@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?

alexzaytsev-newsroomly avatar Nov 17 '17 03:11 alexzaytsev-newsroomly

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.

kinosang avatar Nov 17 '17 09:11 kinosang

I found aspnet/Home#2254.

kinosang avatar Nov 17 '17 09:11 kinosang

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.

cr41g1w avatar Nov 17 '17 12:11 cr41g1w

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.

Mcafee123 avatar Nov 17 '17 14:11 Mcafee123

@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.

riscie avatar Nov 17 '17 14:11 riscie

sry, forgot to preview.... ;-)

Mcafee123 avatar Nov 17 '17 14:11 Mcafee123

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.

cr41g1w avatar Nov 17 '17 15:11 cr41g1w

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.

mythz avatar Nov 20 '17 21:11 mythz

nuget doesn't install aspnetcore windows server hosting 2.0.3.

that has to be installed with: https://aka.ms/dotnetcore-2-windowshosting

doctorhilarius avatar Nov 20 '17 21:11 doctorhilarius

@doctorhilarius What do we need to do for Ubuntu?

mythz avatar Nov 20 '17 21:11 mythz