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.

Publishing to win10-arm or win8-arm doesn't generate an exe file for a Console application

See original GitHub issue

Steps to recreate issue First I created a dotnetcore 2.0 console app, and added nodes for the RuntimeFrameworkVersion and RuntimeIdentifiers to the csproj file, as shown in the csproj file below.

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

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <RuntimeFrameworkVersion>2.0.0-preview1-002111-00</RuntimeFrameworkVersion>
    <RuntimeIdentifiers>win10-arm;win10-x64</RuntimeIdentifiers>
  </PropertyGroup>

</Project>

Then restore and build this project (using “dotnet restore” and “dotnet build”). Now publish with the target of win10-arm using “dotnet publish -r win10-arm” Look in the netcoreapp2.0/win10-arm/publish for the output executable.

Actual Behavior After restoring and building, when I run “dotnet publish -r win10-arm”, there is not a ConsoleApp.exe file in the netcoreapp2.0/win10-arm/publish directory - there’s only a ConsoleApp.dll file. I’ve tried this for win8-arm as well with the same results.

Everything builds fine in both win10-arm and win10-x64 configurations using “dotnet restore” and “dotnet build” - no errors.

When I run “dotnet publish -r win10-x64”, as expected there is a ConsoleApp.exe file in the netcoreapp2.0/win10-x64/publish directory.

Expected behaviour I think the expected behaviour is to see a ConsoleApp.exe in the netcoreapp2.0/win10-arm/publish directory when I publish and target win8-arm or win10-arm. Dotnet core used to create an executable file - I’m running my application on the “Windows 10 IoT Core” framework on the Raspberry Pi 3, and have used a generated ConsoleApp.exe file for .net core apps on the Pi. There’s not an option to run “dotnet ConsoleApp.dll” on Pi running Windows 10 IoT Core.

Jeremy

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
eerhardtcommented, May 24, 2017

@jeremylindsayni - yes! We would be more than happy to review a PR to add an ARM test to the SDK. That’s a great idea.

Welcome aboard!

1reaction
eerhardtcommented, May 23, 2017

Looks like the issue is with our RID graph and win10-arm not importing win-arm correctly.

win10-arm => win81-arm => win8-arm, however it ends there.

https://github.com/dotnet/corefx/blob/master/pkg/Microsoft.NETCore.Platforms/runtime.json#L59-L61

I think

        "win8-arm": {
            "#import": [ "win8" ]
        },

should be

        "win8-arm": {
            "#import": [ "win8", "win-arm" ]
        },

@ericstj @weshaggard @gkhanna79 - is there a specific reason for this? Or is this just an oversight?

If this is an oversight, I can open a PR for this in master, and get shiproom approval for 2.0.

@jeremylindsayni - the workaround for now is instead of using win10-arm to use win-arm as your RID.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NET Core console application is not creating an EXE file
I'm trying to publish a .NET Core console application following this tutorial, but when I publish, I don't get an executable file in...
Read more >
I can't create single .EXE console application with .NET 5.0
When I compile a project a lot of .dlls are included (even with single file options in csproj) Using .NET 4.8 a single...
Read more >
How to publish .NET console app to single independent . ...
I've tried "dotnet publish -r win-x64 --self-contained true" and many other combinations of options and they all produce a /bin folder with an...
Read more >
Publishing A Single EXE File In .NET Core 3.0
Publish the project from the current directory · Build the project to run on Windows 64 bit machines · Build in release configuration...
Read more >
Self-Contained Single-File does not produce a single file
I have a small .Net 5 console application with no dependencies on third party components. I have set it up to publish as...
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