Gray Wolf Corporation

.Net Core 2.1 publish is incomplete

I had just finished porting a .Net Framework 4.7 app to .Net Core 2.1 and was ready to ftp all the files to the server, but none of the dependant project or package dlls were in the bin directory.

I tried the command line ( dotnet publish --configuration Release ), but that only returned warnings and errors about missing projects, even though everything ran fine through VS in Debug mode.

Turns out, publish requires another param: PublishWithAspNetCoreTargetManifest = false

Command line

dotnet publish --configuration Release /property:PublishWithAspNetCoreTargetManifest=false

.csproj

<PropertyGroup>
  <TargetFramework>netcoreapp2.1</TargetFramework>
  <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

If you include PublishWithAspNetCoreTargetManifest in your .csproj, you don't need to supply on the command line.

An unhandled error has occurred. Reload 🗙