question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Framework Dependent Publish doesn't work on 2.1.400

See original GitHub issue

Steps to reproduce

Try to publish web api with dotnet publish -f netcoreapp2.0 -c Release, or within visual studio, with framework dependent selected

Expected behavior

Publish around 30 files

Actual behavior

Publishing over 200 files (self-contained)

Environment data

dotnet --info output:

SDK do .NET Core (refletindo qualquer global.json): Version: 2.1.400 Commit: 8642e60a0f

Ambiente de tempo de execução: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.1.400\

Host (useful for support): Version: 2.1.2 Commit: 811c3ce6c0

.NET Core SDKs installed: 2.1.202 [C:\Program Files\dotnet\sdk] 2.1.302 [C:\Program Files\dotnet\sdk] 2.1.400 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:

https://aka.ms/dotnet-download

Description

After upgrading to Visual Studio v15.8, which comes with .net core SDK v2.1.4, I’ve been trying to publish my WebAPI in a Framework Dependent way, but it only generates the Self Contained way, with over 200 files.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:28 (23 by maintainers)

github_iconTop GitHub Comments

1reaction
nagilsoncommented, Jan 20, 2023

@peterhuene Thank you for writing such a clean and informative commit history for future SDK engineers ❤️

1reaction
peterhuenecommented, Aug 22, 2018

@TatiTheFreaK another workaround if you don’t want to edit your project file is to publish with dotnet publish -f netcoreapp2.0 -c Release --self-contained false. The bug is that SelfContained should be implicitly set to false, but it’s actually an empty string with the 2.1.4xx SDK. I have a fix ready that we hope to get into a 2.1.4xx servicing release. Thanks very much for reporting this issue to us!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Framework Dependent Publish doesn't work on 2.1.400
After upgrading to Visual Studio v15.8, which comes with .net core SDK v2.1.4, I've been trying to publish my WebAPI in a Framework...
Read more >
asp.net core 2.0 publish generating lots of DLL's
This is caused by a bug introduced in .NET Core SDK version 2.1.400. See Framework Dependent Publish doesn't work on 2.1.400 #9852.
Read more >
Publish .NET apps with the .NET CLI
NET Core SDK 2.1, the default publish mode is framework-dependent deployment. Native dependencies. If your app has native dependencies, it may ...
Read more >
Should I use self-contained or framework-dependent ...
In this post I compare the impact of the framework-dependent vs self-contained mode on Docker image size, taking layer caching into account.
Read more >
Diagnose ASP.Net Core startup issues when hosted as a ...
Net Core SDK 2.1.400, if it was not previously installed if ((dotnet ... to enable host to run as service dotnet publish --self-contained ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found