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.

x64 version of dotnet when x64 platform is set in portal

See original GitHub issue

In Azure portal, I set platform to x64 in the application settings. Then added "platform": "x64" under “buildOptions” in aspnet-core app’s project.json file (along with win7-x64 RID). Our app is targeting SDK "1.0.0-preview2-003121". After the deployment, I received HTTP Error 502.5 - Process Failure. On Kudu’s CMD, I ran the executable under d:\home\wwwroot and received:

An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

searched this error on related repos, which led me to: https://github.com/aspnet/KestrelHttpServer/issues/1118 suggesting that we need to have dotnet.exe x64 in PATH before x86. Unfortunately, we don’t have x64 bit available on Azure websites (dir "D:\Program Files" vs dir "D:\Program Files (x86)").

To overcome this shortcoming, I have installed dotnet x64 at D:\home\site\deployments\tools like:

cd D:\home\site\deployments\tools

curl -O https://dotnetcli.azureedge.net/dotnet/Sdk/1.0.0-preview2-003121/dotnet-dev-win-x64.1.0.0-preview2-003121.zip

unzip dotnet-dev-win-x64.1.0.0-preview2-003121.zip

It would be very much appreciated if, in addition to x86 dontet-cli, we receive x64 counterpart installed (with all the SDK versions available for x86) out of the box, so we don’t need to install in every App Service (we have seven dedicated services for the affected app). Also, if possible, would be nice if this transition in PATH (dotnet-x64 before dotnet-x86 and viceversa) happen when we change the bitness in portal.

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
am11commented, Dec 2, 2017

It’s crazy

That it is. We get OOTB installation of x86 & x64 variants when it comes to Ruby, Python, node.js and many other frameworks, but for .NET Core it’s only x86. If there is an issue in having both on the system, then it should be only x64 instead or user should have a choice. In Azure Portal -> AppService -> Settings, if we change the architecture to x64, it has no impact on .NET Core (dotnet-cli remains x86)…

workaround

My initial workaround (see top comment) was do download dotnet-sdk in x64, and put it in PATH as per Kudu documentation; D:\home\site\deployments\tools directory. The direct download links to the SDK are available in release notes, f.ex: https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.3.md

0reactions
Oceanswavecommented, Jan 7, 2018

Came across this trying to run a .net core Azure Function with x64 dependencies. Thanks to OP for describing a workaround, but the fact that this is still an issue is aggravating.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change Azure App Service to 64-bit
Steps to deploy: Set platform to 64-bit in portal; Ensure the project targets 64-bit by including the following in the csproj:.
Read more >
Install .NET on Windows
On an Arm-based Windows PC, all Arm64 versions of .NET are installed to the normal C:\Program Files\dotnet\ folder. However, when you install ...
Read more >
Deploy ASP.NET Core apps to Azure App Service
The platform architecture (x86/x64) of an App Services app is set in the app's settings in the Azure Portal for apps that are...
Read more >
dotnet command - .NET CLI
Prints out a list of the installed .NET runtimes. An x86 version of the SDK lists only x86 runtimes, and an x64 version...
Read more >
Download .NET 5.0 (Linux, macOS, and Windows)
NET 5.0 downloads for Linux, macOS, and Windows. .NET is a free, cross-platform, open-source developer platform for building many different types of ...
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