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.

dotnet build with runtime specified does not create the right output

See original GitHub issue

Moved from https://github.com/dotnet/cli/issues/5039 on behalf of @Fabi, @nguerrera


Steps to reproduce

  1. Install Visual Studio 2017 RC
  2. Follow the “Deploying a simple self-contained deployment” part from https://docs.microsoft.com/en-us/dotnet/articles/core/preview3/deploying/ until step 5

Expected behavior

After running the dotnet build -r win10-x64 command a folder with the build files (including an .exe file not only dll) should be created at “.\bin\Debug\netcoreapp1.0<runtime_identifier>”

Actual behavior

There is no runtime folder with executables generated. That only works with the publish command now. Before on json based project files it worked fine.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview4-004233)

Product Information:
 Version:            1.0.0-preview4-004233
 Commit SHA-1 hash:  8cec61c6f7

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\1.0.0-preview4-004233

@nguerrera this is the standalone publish scenario. It should work like this:

on build

Build produces the portable output as well as a RID-specific output. The RID-specific output contains the portable output + the appropriate RID-specific host for the app. That host still uses deps.json, etc. to load Shared Framework artifacts from the nuget cache

on publish

The publish output is RID specific. It includes everything from the RID-specific build output + everything from the RID-specific Shared Framework. The publish output can now be zip’d and then deployed to any host with a matching RID.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
nguerreracommented, Feb 7, 2017

We decided not to change the default output folder this late in the cycle. You can set AppendRuntimeIdentifierToOutputputPath=true to opt in to that behavior.

1reaction
Fabicommented, Dec 20, 2016

They are not generated at all on build. I searched them but never found them, so I guess they are not generated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the build output directory - Visual Studio (Windows)
Type in the path to generate output to (absolute or relative to the root project directory), or choose Browse to browse to that...
Read more >
Build .NET Core console application to output an EXE
NET Core 2.0 only: First, add the runtime identifier of the target ... When set to true, dotnet will generate a very lean...
Read more >
Cannot debug net6.0-macos Apps - Developer Community
When I hit debug, the following error is shown in the Terminal: Possible reasons for this include: * You misspelled a built-in dotnet...
Read more >
Dotnet build quiet. 18. In this article. For more information, see ...
When you don't want to build the project and you have a specific target you want to run, ... Only the outputs created...
Read more >
Dotnet build linux. The answer you're looking for is basically
\n. . dotnet run --no-build. I set "myFolder" as the output folder. /MySolution. This engine, also known as MSBuild, provides an XML schema...
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