3

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

1
  • Is it allowed to do <RuntimeIdentifiers>linux-x64;win-x64</RuntimeIdentifiers>? My VS is shouting at me Commented Jun 18 at 12:42

1 Answer 1

-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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.