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.

Azure Functions Script (.csx) support for .NET 6

See original GitHub issue

What problem would the feature you’re requesting solve? Please describe.

Any attempt I’ve made to target a framework other than netstandard2.0 in Azure Scripts yields cryptic warnings and errors when referencing Nuget packages, as detailed in this StackOverflow post.

Describe the solution you’d like

  • If frameworks outside of netstandard2.0 are not supported, the runtime should clearly indicate that with an error when the function.proj file sets an unsupported target.
  • If frameworks outside of netstandard2.0 are supported, then I need help understanding why I’m getting the errors I’m seeing, and what steps are required to get, say, .NET 6, working.
  • In either case, the documentation should be updated. (Do I need to file a separate issue here for that?

Describe alternatives you’ve considered

Lack of modern framework support makes me think I should be using Azure Function C# Libraries instead. Again, the documentation should make this limitation clear so developers don’t go down the csx road a ways before realizing it’s a dead-end.

Additional context

I’ve been getting the general impression that Azure Functions Scripts is a forgotten/stale technology. I’m frequently finding suggestions about how to do things like leverage IHttpClientFactory in Azure Functions (to avoid socket starvation and stale DNS problems), and how to leverage dependency injection in Azure Functions, only to discover that none of it works in Azure Functions Scripts. I’m wondering if I should recommend that our teams not bother with Scripts, even for relatively simple scripts.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
v-bbalaiagarcommented, Mar 1, 2022

Hi @j2jensen , Apologies for the confusion, I have updated the issue link in the above comment. We shall keep the issue open and will investigate this further and update you with the findings.

0reactions
chinazor-allencommented, Apr 1, 2022

Following. Would be nice to know the workaround for csx files using .NET 6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions C# script (.csx) developer reference
This article is an introduction to developing Azure Functions by using C# script (.csx). Azure Functions lets you develop functions using C# ...
Read more >
Develop C# class library functions using Azure Functions
Azure Functions supports C# and C# script programming languages. ... NET 6 will reach end of support on November 12, 2024. 2 Per...
Read more >
Creating Azure Functions with C# Script (.csx) - Albert Starreveld
Go to dev.azure.com, go to Project Settings, and make sure an Azure Resource Management Service Connection has been set up. Now create a...
Read more >
Azure Functions C# script (.csx) developer reference
Understand how to develop Azure Functions using C# script. conceptual ... Other target frameworks, such as net6.0 , aren't supported.
Read more >
Azure Functions: How to add extensions to In-portal CSX ...
Create a function app, with a new HTTP function (net6.0) · Add the "using Microsoft.Data.SqlClient;" dependency in run.csx · Add the extensions.
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