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

Question: .NET 6 In-Process Function runs fine on Azure .NET 8 Isolated ?! #2670

Closed
Chrissie opened this issue Aug 22, 2024 · 2 comments
Closed
Labels
area: migration Items related to migration from the in-process model

Comments

@Chrissie
Copy link

Chrissie commented Aug 22, 2024

What version of .NET does your existing project use?

.NET 6

What version of .NET are you attempting to target?

.NET 8

Description

If I build an Azure Function with the In-Process model, on .NET 6, I am able to run it on .NET 8 Isolated in Azure.
I don't understand why this works, I thought the Isolated-Worker would not accept existing In-Process Functions?
Can someone explain why this works? I can't find any source or reference which states that this should work.

Steps:

  • Have an existing Azure Function on Azure
  • Create an empty Azure Function, In-Process, .NET 6.0, Http Trigger in Visual Studio
  • run dotnet publish -o Publish
  • Zip deploy using Azure CLI az functionapp deployment source config-zip
  • Make sure the Azure Function App Configuration has FUNCTIONS_WORKER_RUNTIME with value dotnet-isolated. If not, change it.

Project configuration and dependencies

  • Empty .NET 6 In-Process Azure Function Project with HttpTrigger
  • .csproj:
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.4.0" />
  </ItemGroup>
  <ItemGroup>
    <None Update="host.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>
    <None Update="local.settings.json">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
      <CopyToPublishDirectory>Never</CopyToPublishDirectory>
    </None>
  </ItemGroup>
</Project>
  • Azure
    image

Link to a repository that reproduces the issue

No response

@Chrissie Chrissie added the area: migration Items related to migration from the in-process model label Aug 22, 2024
@Chrissie Chrissie changed the title Question: .NET 6 In-Proceses function runs fine on Azure .NET 8 Isolated ?! Question: .NET 6 In-Process Function runs fine on Azure .NET 8 Isolated ?! Aug 22, 2024
@cjaliaga
Copy link
Member

Explained as part of this PR in the section Why it works in 4.34 . This behavior will be removed in the future.

@satvu
Copy link
Member

satvu commented Oct 17, 2024

Closing as answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: migration Items related to migration from the in-process model
Projects
None yet
Development

No branches or pull requests

3 participants