Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore <version>

- Update `ContextReference` to no longer use a given invocation's cancellation token (#2894)
- Global usings added to match `Microsoft.NET.Sdk.Web` (#2934)

### Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.Analyzers <version>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
***********************************************************************************************
Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore.props

WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.

***********************************************************************************************
-->
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">


<ItemGroup Condition="'$(Language)' == 'C#' AND ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')">
<!-- Based on https://github.com/dotnet/sdk/blob/main/src/WebSdk/Web/Targets/Sdk.Server.props -->
<Using Include="System.Net.Http.Json" />
<Using Include="Microsoft.AspNetCore.Builder" />
<Using Include="Microsoft.AspNetCore.Hosting" />
<Using Include="Microsoft.AspNetCore.Http" />
<Using Include="Microsoft.AspNetCore.Routing" />
<Using Include="Microsoft.Extensions.Configuration" />
<Using Include="Microsoft.Extensions.DependencyInjection" />
<Using Include="Microsoft.Extensions.Hosting" />
<Using Include="Microsoft.Extensions.Logging" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
</ItemGroup>

<ItemGroup>
<None Include="Targets\**">
<Pack>true</Pack>
<PackagePath>build</PackagePath>
</None>
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Microsoft.Azure.Functions.Worker (metapackage) <version>

- `AZURE_FUNCTIONS_` environment variables are now loaded correctly when using `FunctionsApplicationBuilder`. (#2878)
- Global usings added for `Microsoft.Azure.Functions.Worker` and `Microsoft.Azure.Functions.Worker.Builder` (#2934)

### Microsoft.Azure.Functions.Worker.Core <version>

Expand Down
9 changes: 9 additions & 0 deletions sdk/Sdk/Targets/Microsoft.Azure.Functions.Worker.Sdk.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
<CompilerVisibleProperty Include="TargetFrameworkIdentifier" />
<CompilerVisibleProperty Include="FunctionsExecutionModel" />
</ItemGroup>

<ItemGroup Condition="'$(Language)' == 'C#' AND ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')">
<!-- Based on https://github.com/dotnet/sdk/blob/main/src/WebSdk/Worker/Targets/Microsoft.NET.Sdk.Worker.props -->
<Using Include="Microsoft.Extensions.Configuration" />
<Using Include="Microsoft.Extensions.DependencyInjection" />
<Using Include="Microsoft.Extensions.Hosting" />
<Using Include="Microsoft.Extensions.Logging" />
</ItemGroup>

<!--
***********************************************************************************************
Import the Publish Props
Expand Down
2 changes: 1 addition & 1 deletion sdk/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Microsoft.Azure.Functions.Worker.Sdk <version>

- <entry>
- Global usings added to match `Microsoft.NET.Sdk.Worker` (#2934)

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

Expand Down
7 changes: 7 additions & 0 deletions src/DotNetWorker/DotNetWorker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,11 @@
<ProjectReference Include="..\DotNetWorker.Grpc\DotNetWorker.Grpc.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="Targets\**">
<Pack>true</Pack>
<PackagePath>build</PackagePath>
</None>
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions src/DotNetWorker/Targets/Microsoft.Azure.Functions.Worker.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!--
***********************************************************************************************
Microsoft.Azure.Functions.Worker.props

WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.

***********************************************************************************************
-->
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup Condition="'$(Language)' == 'C#' AND ('$(ImplicitUsings)' == 'true' or '$(ImplicitUsings)' == 'enable')">
<Using Include="Microsoft.Azure.Functions.Worker" />
<Using Include="Microsoft.Azure.Functions.Worker.Builder" />
</ItemGroup>

<!--
***********************************************************************************************
Import the Publish Props
***********************************************************************************************
-->
<Import Project="$(MSBuildThisFileDirectory)Microsoft.Azure.Functions.Worker.Publish.props" Condition="Exists('$(MSBuildThisFileDirectory)Microsoft.Azure.Functions.Worker.Publish.props')" />

</Project>
4 changes: 2 additions & 2 deletions test/Resources/Projects/FunctionApp01/FunctionApp01.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<SdkVersion>1.17.2</SdkVersion>
<SdkVersion>2.0.0</SdkVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="$(SdkVersion)" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion test/SdkE2ETests/TestUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static async Task RestoreAndBuildProjectAsync(string fullPathToProjFile,

// Build
outputHelper.WriteLine($"[{DateTime.UtcNow:O}] Building...");
dotnetArgs = $"build {projectNameToTest} --configuration {Configuration} -o {outputDir} -p:SdkVersion={SdkVersion} {additionalParams}";
dotnetArgs = $"build {projectNameToTest} --no-restore --configuration {Configuration} -o {outputDir} -p:SdkVersion={SdkVersion} {additionalParams}";
exitCode = await new ProcessWrapper().RunProcess(DotNetExecutable, dotnetArgs, projectFileDirectory, testOutputHelper: outputHelper);
Assert.True(exitCode.HasValue && exitCode.Value == 0);
outputHelper.WriteLine($"[{DateTime.UtcNow:O}] Done.");
Expand Down
Loading