1

I tried to build a project for multiple targets. I using net 5 framework, and I want to build app for win64 and linux64 runtimes.

The problem

Missing linux 64 folder

The csproj file :

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
    ...
  <TargetFrameworks>net48;net5.0</TargetFrameworks>
  <RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>
</PropertyGroup>

then I ran cli command:

dotnet build "projectPath"

Result in folder: enter image description here

Expected folder in results (when running with --runtime linux64)

enter image description here

Michael Gabbay
  • 413
  • 1
  • 4
  • 20

1 Answers1

-1

After looking on MSDN enter link description here

dotnet publish section, I understand that the dotnet build/publish process is framework depended to make the output executable targeted to the requested framework so with the configuration i mentioned above, the build resolves all availables targets and run them, but will not make the publish directory for each configured target

Michael Gabbay
  • 413
  • 1
  • 4
  • 20