Dependencies are not included when publishing to IIS via MSDeploy from VS 2019
See original GitHub issueFiles in packages like Microsoft.EntityFrameworkCore
and Microsoft.AspNetCore.Mvc.NewtonsoftJson
are not included when publishing an ASP.NEt Core app. No matter framework dependent or self-contained.
They are in the Release
folder but not output to publish
(even when just publishing to a folder)
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AspNetCore.Mvc.NewtonsoftJson, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
File name: 'Microsoft.AspNetCore.Mvc.NewtonsoftJson, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
SDK: .NET 5.0 Preview 7 Visual Studio 2019 (Version 16.8.0 Preview 1.0)
My reference:
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0-preview.7.20365.19" />
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Installing and Configuring Web Deploy on IIS 8.0 or Later
Right-click the site that you are configuring, point to Deploy, and then click Configure Web Deploy Publishing.... The following UI will appear: ...
Read more >Publishing to IIS - ASP.NET Core Documentation
Enabling the IISIntegration components¶. Include a dependency on the Microsoft.AspNetCore.Server.IISIntegration package in the application dependencies.
Read more >Error publishing an ASP.NET Core 3.1 site to Azure from ...
I got this error from a fresh new net5.0 project in VS2019 (ASP.NET Core Web Application template) when using the VS web-publisher.
Read more >Publishing and deploying a Razor Pages application to IIS ...
NET Core runtime are not included in the published output. The error therefore arises because items specified in the MyApp. deps.
Read more >ClickOnce publish missing dependencies.
Hello,. I have found a possible error in the new ClickOnce publish for .NET Core (both targeting .NET Core 3.1 and -NET 5.0)....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have exactly the same problem, I can’t publish any more because of that. It’s not because of the new version of VS, I installed 16.7 (final) and 16.8 Preview 1 and it’s the same problem.
I think I figured out why: Microsoft.CodeAnalysis 3.7.0, Microsoft.CodeAnalysis.CSharp 3.7.0, Microsoft.CodeAnalysis.Common 3.7.0 Nuget packages were released on 08/05/2020 but other components are still looking for the previous versions. I don’t think they should have been released yet.
Here’s one of the error messages: warning NU1603: Microsoft.VisualStudio.Web.CodeGeneration.Templating 5.0.0-preview.7.20370.3 depends on Microsoft.CodeAnalysis.CSharp (>= 3.7.0-3.20269.11) but Microsoft.CodeAnalysis.CSharp 3.7.0-3.20269.11 was not found. An approximate best match of Microsoft.CodeAnalysis.CSharp 3.7.0-3.final was resolved.
Also even the dependencies that are included have the wrong version, for example 5.0.0.0 instead of 5.0.0-preview.7.20365.19.
Can someone please help with this issue? I can’t publish until it’s resolved.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.