I have an old console.exe
app that builds fine on .NET 4.8, and it packages fine as a NuGet.
Maybe this sounds odd, but the console app doubles as a library that I use in other projects. So, the nuget literally has my console.exe
file in it, but I reference it as if it were like any other DLL and it all has worked fine for years.
Recently, I upgraded my *.csproj
to the newer style SDK project format, so that I could support both .NET 4.8 and .NET 6.0 simultaneously:
<Project Sdk="Microsoft.NET.Sdk"><PropertyGroup><TargetFrameworks>net48;net60-windows</TargetFrameworks><Platforms>AnyCPU;x64</Platforms><OutputType>Exe</OutputType>
The build output appears to be correct, with the .exe showing up in the bin folder, for each targeted framework:
but when I go to pack the project, I notice that the NuGet only features a *.dll
instead of the expected *.exe
file:
I see this behavior both on my workstation, as well as the Azure CI build server.