Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
318 stars 53 forks source link

Azure Function with embedded files cannot be compiled in Github Actions #1441

Open aitrailblazer opened 3 months ago

aitrailblazer commented 3 months ago

Describe the bug

I'm embedding files in Azure Function.

If the Azure function configuration Api.csproj contains:

<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>

Github Action returns the following:

---End of Oryx build logs---
Oryx was unable to determine the build steps. Continuing assuming the assets in this folder are already built. If this is an unexpected behavior please contact support.
[WARNING] The function language could not be detected. The language will be defaulted to node.
The function language version detected is unsupported or invalid. The following node language versions are valid: 12, 14, 16, 18. If you are not using Azure Functions, you can skip this check by removing the 'api_location' input from the workflow file.

Here is the Api.csproj

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
    <OutputType>Exe</OutputType>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>    
    <RootNamespace>Api</RootNamespace>
    <AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
  </PropertyGroup>