forked from Azure/azure-functions-host
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AssemblyLoadContext fix (Azure#7113)
- Loading branch information
Showing
8 changed files
with
172 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...PrecompiledTestProjects/ReferenceOlderRuntimeAssembly/Properties/serviceDependencies.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"dependencies": { | ||
"appInsights1": { | ||
"type": "appInsights" | ||
}, | ||
"storage1": { | ||
"type": "storage", | ||
"connectionId": "AzureWebJobsStorage" | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...piledTestProjects/ReferenceOlderRuntimeAssembly/Properties/serviceDependencies.local.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"dependencies": { | ||
"appInsights1": { | ||
"type": "appInsights.sdk" | ||
}, | ||
"storage1": { | ||
"type": "storage.emulator", | ||
"connectionId": "AzureWebJobsStorage" | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...arpPrecompiledTestProjects/ReferenceOlderRuntimeAssembly/ReferenceOlderRuntimeAssembly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Azure.WebJobs; | ||
using Microsoft.Azure.WebJobs.Extensions.Http; | ||
using Microsoft.Extensions.Hosting; | ||
|
||
namespace ReferenceOlderRuntimeAssembly | ||
{ | ||
public class ReferenceOlderRuntimeAssembly | ||
{ | ||
public static IHostingEnvironment StartupEnv; | ||
private readonly IHostingEnvironment _env; | ||
|
||
public ReferenceOlderRuntimeAssembly(IHostingEnvironment env) | ||
{ | ||
_env = env; | ||
} | ||
|
||
[FunctionName("ReferenceOlderRuntimeAssembly")] | ||
public IActionResult Run( | ||
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequest req) | ||
{ | ||
if (_env == null) | ||
{ | ||
throw new InvalidOperationException(); | ||
} | ||
|
||
return new OkResult(); | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...recompiledTestProjects/ReferenceOlderRuntimeAssembly/ReferenceOlderRuntimeAssembly.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<AzureFunctionsVersion>v3</AzureFunctionsVersion> | ||
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="4.0.3" /> | ||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.2.0" /> | ||
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.11" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Update="host.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="local.settings.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | ||
</None> | ||
</ItemGroup> | ||
</Project> |
11 changes: 11 additions & 0 deletions
11
test/CSharpPrecompiledTestProjects/ReferenceOlderRuntimeAssembly/host.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"version": "2.0", | ||
"logging": { | ||
"applicationInsights": { | ||
"samplingExcludedTypes": "Request", | ||
"samplingSettings": { | ||
"isEnabled": true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters