Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions sdk/Sdk/Targets/Microsoft.Azure.Functions.Worker.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,27 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
</Target>

<!-- This target is used to set up the run arguments for the function app, supporting `dotnet run` -->
<Target Name="_FunctionsComputeRunArguments" BeforeTargets="ComputeRunArguments">
<PropertyGroup>
<Target Name="_FunctionsComputeRunArguments" BeforeTargets="ComputeRunArguments" DependsOnTargets="_FunctionsCheckForCoreTools">
<PropertyGroup Condition="'$(FuncExists)' == 'true'">
<RunCommand>func</RunCommand>
<RunArguments>host start $(RunArguments)</RunArguments>
<RunWorkingDirectory>$(OutDir)</RunWorkingDirectory>
</PropertyGroup>
</Target>


<Target Name="_FunctionsCheckForCoreTools">
<Exec Command="func --version" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="FuncExitCode" />
</Exec>
<PropertyGroup>
<FuncExists Condition="'$(FuncExitCode)' == '0'">true</FuncExists>
</PropertyGroup>
</Target>

<Target Name="_FunctionsComputeRunArgumentsWhenFuncNotExists" BeforeTargets="ComputeRunArguments" DependsOnTargets="_FunctionsCheckForCoreTools">
<Error Text="Azure Functions Core Tools is missing. Please install it and try again. Visit https://aka.ms/azfunc-coretools-not-installed for more details." Condition="'$(FuncExists)' != 'true'" />
</Target>

<!-- These two targets set up the main sequence of targets we want to run and when we want to run them. -->
<Target Name="_FunctionsBuildExtension"
AfterTargets="CoreCompile"
Expand Down
1 change: 1 addition & 0 deletions sdk/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Write `worker.config` and `functions.metadata` only if contents have changed. (#2999)
- Updates the generated extension csproj to be net8.0 (from net6.0)
- Setting _ToolingSuffix for V10.0 TargetFrameworkVersion. (#2983)
- Enhanced error message for missing Azure Functions Core Tools in the user's environment. (#2976)

### Microsoft.Azure.Functions.Worker.Sdk.Generators 1.3.5

Expand Down