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.

Build does not honor the runtime setting

See original GitHub issue

Steps to reproduce

On X64 machine run:

dotnet build -c release -r win7-x86

Expected behavior

It should generate x86 assemblies

Actual behavior

Generates x64 instead

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview1-002702)

Product Information: Version: 1.0.0-preview1-002702 Commit Sha: 6cde21225e

Runtime Environment: OS Name: Windows OS Version: 10.0.14352 OS Platform: Windows RID: win10-x64

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
TheRealPiotrPcommented, Nov 15, 2016

We need to provide better UX around this in the CLI.

  1. If a project is Portable and will run against the active CLI then --runtime should not be permitted.
  2. If a project is Portable with RID-specific assets and those assets are not available for the current RID then we should fail gracefully
  3. If a project is Standalone and not targetting the current RID then we should fail gracefully

Ideally, we would also provide useful guidance e.g. The CLI on your path is a 32-bit CLI and you're trying to run a 64-bit application. Do {instructions} to run this application.

The interactions here are certainly confusing and we need to do more to communicate what is going on.

1reaction
ahumeniycommented, Jun 7, 2016

@piotrpMSFT It’s just like the linked issue. If I work in a machine with Windows 10 x64, the MSI for .NET Core SDK install the 64-bit tools and there’s no way to build the project into 32-bit. This happens at least when I create a ASP.NET Core project using the .NET Framework only and not .NET Core (I’m using a library not available for .NET Core, that’s why).

I tried adding the “win7-x86” runtime but it doesn’t work. It even creates the corresponding folder and put the binaries there put it’s all 64-bit. I also tried setting the architecture on Visual Studio but still builds 64-bit. When I copy the binaries to a x86 VM I get the error about program not compatible with the processor architecture.

I created a virtual machine running Windows 10 x86 and all development tools and the opposite happens there: The project builds only on 32-bit mode no matter what I do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BuildConfiguration and dependent msbuild properties are ...
When launching from VisualStudio with a launchSettings.json with Configuration netfx-Debug or netfx-Release selected, some msbuild ...
Read more >
Cannot set java.home in VS Code Maven project
According to the screenshot for the maven execution error, it seems like you are running maven command in terminal. That honors your system ......
Read more >
GitLab runner ignores the "runtime" configuration for ...
It is not correct for the GitLab runner to honor the runtime config for the job container but ignore it for the service...
Read more >
Building Linux System Appliances with KIWI Next ...
KIWI assumes systemd adoption to handle these locale settings, in case the build distribution does not honor /etc/locale.conf this is likely ...
Read more >
Building Docker Images with heroku.yml
The heroku.yml file is a manifest you can use to define your Heroku app. It allows you to: Build Docker images on Heroku;...
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