ASP.NET Core 2: missing ApplicationInsights

前端 未结 5 1718
感动是毒
感动是毒 2021-02-01 16:03

I am publishing ASP.NET Core 2 application and seeing the following error.

Error:
  An assembly specified in the application dependencies manifest (MyApp.deps.js         


        
5条回答
  •  不要未来只要你来
    2021-02-01 16:49

    This assembly was expected to be in the local runtime store

    You are getting this error because you don't have the ASP.NET Core Runtime Store installed. You have two options to fix this.

    1. Install the ASP.NET Core Runtime Store. It comes bundled with the .NET Core SDK, which is why installing the SDK fixed this. You can also install just the store, without the SDK, by downloading it here: https://www.microsoft.com/net/download/all.

    2. Don't use runtime store trimming. You can disable the trimming by setting this property in your csproj file.

        
            false
        
    

    You can also pass this in on command line.

    dotnet publish /property:PublishWithAspNetCoreTargetManifest=false
    

    Update: June 25, 2018

    This answer only applies to ASP.NET Core 2.0 projects. In ASP.NET Core 2.1, there is no runtime store anymore.

提交回复
热议问题