Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for dot net core based functions that target x64 #651

Closed
Oceanswave opened this issue Jan 10, 2018 · 7 comments
Closed

Support for dot net core based functions that target x64 #651

Oceanswave opened this issue Jan 10, 2018 · 7 comments

Comments

@Oceanswave
Copy link

In the current Azure Functions preview, it's possible to create functions that target x64, including dotnet core based functions.

However, when attempting to deploy a x64-based function to Azure, the Azure Functions runtime invokes the x86-based dotnet executable, regardless of the platform architecture specified for the app service.

@jeffhollan
Copy link
Contributor

Thanks @Oceanswave - let me see what all is involved here and make sure we are tracking in the right repo.

/ cc @fabiocav @paulbatum to help with triage / milestones

@Oceanswave
Copy link
Author

Thanks for the eyes, @jeffhollan, let me know if I can help.

@flashfm
Copy link

flashfm commented Mar 28, 2018

Hi,
I found that netstandard 2.0 dll compiled with x64 target framework still does not work on Azure Functions 2.0 (beta) (I get HTTP 404), even if Platform is set to 64-bit in the Application Settings.
Is it expected now? Is there any workarounds or maybe any plans to fix this?

BTW:

  1. func start works locally with the same dll.
  2. Also, If I have AnyCPU dll which references x64-targeted dll (both netstandard 2.0), then I get "Could not find or load a specific file. (Exception from HRESULT: 0x80131621)" exception for the referenced dll, however locally func start still works

Thanks!

@paulbatum
Copy link
Member

We are in the process of deploying a release that has a fix for this issue.
https://github.com/Azure/azure-functions-host/releases/tag/v2.0.11946-alpha

I expect the release will be deployed globally by 8/3. If you want to try it out early, create a function app in West Central US and use that for your testing.

If you're having problems, first verify that you're getting 11946 or newer:
image

The platform switcher is here:
image

The following HTTP triggered C# function will demonstrate:

using System.Net;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;

public static IActionResult Run(HttpRequest req, TraceWriter log)
{    
    var is64bit = Environment.Is64BitProcess;
    log.Info($"Is x64: {is64bit}");
    return new OkObjectResult(is64bit ? "x64" : "x86");    
}

@eerhardt
Copy link
Member

@paulbatum @fabiocav - are there any instructions for getting x64 Azure Functions running locally in VS during F5?

@paulbatum
Copy link
Member

Hello, see this comment and the associated linked resource:
Azure/azure-functions-core-tools#117 (comment)

That should be enough to unblock you (if not being exact step by step instructions).

@mathewc mathewc closed this as completed Feb 20, 2019
@paulbatum
Copy link
Member

For further questions about x64 in local development scenarios, see #376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants