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

Update template 'Logic app with custom code project', '.NET Framework' to default to net48 #1294

Open
MrRosendahl opened this issue Feb 10, 2025 · 0 comments

Comments

@MrRosendahl
Copy link

MrRosendahl commented Feb 10, 2025

Describe the Bug

Please update the template to use net48.

Plan Type

Standard

Steps to Reproduce the Bug or Issue

  1. Open Visual Studio Code
  2. Azure Logic Apps: Create new logic app workspace...
  3. When prompted select: "Logic app with custom code project"
  4. Select: ".NET Framework"
  5. Enter a function name and namespace
  6. Select stateful workflow and enter a stateful workflow name

Workflow JSON

Screenshots or Videos

No response

Additional context

Resulting csproj file:

  <PropertyGroup>
    <IsPackable>false</IsPackable>
    <TargetFramework>net472</TargetFramework>
    <AzureFunctionsVersion>v4</AzureFunctionsVersion>
    <OutputType>Library</OutputType>
    <PlatformTarget>x64</PlatformTarget>
    <!-- Please replace 'LogicAppFolder' with the name of your folder that contains your logic app project. -->
    <LogicAppFolder>LogicApp</LogicAppFolder>
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
 </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.WebJobs.Core" Version="3.0.39" />
    <PackageReference Include="Microsoft.Azure.Workflows.WebJobs.Sdk" Version="1.1.0" />
    <PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.2.0" />
    <PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1" />
    <PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
  </ItemGroup>

<Target Name="Task" AfterTargets="Compile">
    <ItemGroup>
        <DirsToClean2 Include="..\$(LogicAppFolder)\lib\custom" />
      </ItemGroup>
      <RemoveDir Directories="@(DirsToClean2)" />
 </Target>
 
  <Target Name="CopyExtensionFiles" AfterTargets="ParameterizedFunctionJsonGenerator">
    <ItemGroup>
        <CopyFiles Include="$(MSBuildProjectDirectory)\bin\$(Configuration)\net472\**\*.*" CopyToOutputDirectory="PreserveNewest" Exclude="$(MSBuildProjectDirectory)\bin\$(Configuration)\net472\*.*" />
      <CopyFiles2 Include="$(MSBuildProjectDirectory)\bin\$(Configuration)\net472\*.*" />
    </ItemGroup>
    <Copy SourceFiles="@(CopyFiles)" DestinationFolder="..\$(LogicAppFolder)\lib\custom\%(RecursiveDir)" SkipUnchangedFiles="true" />
    <Copy SourceFiles="@(CopyFiles2)" DestinationFolder="..\$(LogicAppFolder)\lib\custom\net472\" SkipUnchangedFiles="true" />
    <ItemGroup>
        <MoveFiles Include="..\$(LogicAppFolder)\lib\custom\bin\*.*" />
    </ItemGroup>

   <Move SourceFiles="@(MoveFiles)" DestinationFolder="..\$(LogicAppFolder)\lib\custom\net472" />
    <ItemGroup>
       <DirsToClean Include="..\$(LogicAppFolder)\lib\custom\bin" />
     </ItemGroup>
       <RemoveDir Directories="@(DirsToClean)" />
  </Target>
 
  <ItemGroup>
      <Reference Include="Microsoft.CSharp" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="bin\$(Configuration)\net472\" />
  </ItemGroup>
</Project>```
@MrRosendahl MrRosendahl changed the title Update template "Create new logic app workspace" "Logic app with custom code project" to default to net48 isolated worker Update template "Create new logic app workspace" "Logic app with custom code project" to default to net48 Feb 10, 2025
@MrRosendahl MrRosendahl changed the title Update template "Create new logic app workspace" "Logic app with custom code project" to default to net48 Update template "Logic app with custom code project" .NET Framework' to default to net48 Feb 10, 2025
@MrRosendahl MrRosendahl changed the title Update template "Logic app with custom code project" .NET Framework' to default to net48 Update template 'Logic app with custom code project', '.NET Framework' to default to net48 Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant