forked from Altinn/altinn-studio
/
Altinn.Platform.Authorization.Functions.csproj
66 lines (56 loc) · 2.94 KB
/
Altinn.Platform.Authorization.Functions.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Tests\**" />
<EmbeddedResource Remove="Tests\**" />
<None Remove="Tests\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.3.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.3.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0-beta1" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.2-mauipre.1.22102.15" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.0" />
<PackageReference Include="Altinn.Common.AccessTokenClient" Version="1.0.5" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
<!--
The Azure Functions Host will remove a large list of runtime assemblies in order to reduce build size. This is performed in the ExtensionsMetadataGenerator in the buildtask
"RemoveRuntimeDepencies" introduced in https://github.com/Azure/azure-functions-host/commit/1ed2a54159eb3c9aaff11a9289be2bf1ce91dcb5#diff-8924132f0d2b330a1888e0f17c5fcdb4R27
This however breaks Altinn.Common.AccessTokenClient, which requires a newer version of Microsoft.IdentityModel than is used by the runtime host.
Using the (undocumented) flag _FunctionsSkipCleanOutput preserves these assemblies, allowing for different versions to be used.
See also:
https://github.com/Azure/azure-functions-host/issues/5894
https://github.com/MicrosoftDocs/azure-docs/commit/f2fe4497b0b8926b06619c4431e5f21acc261ee8
https://github.com/MicrosoftDocs/azure-docs/pull/77460#issuecomment-1028234708
-->
<PropertyGroup>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug'">
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.376">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<AdditionalFiles Include="..\..\..\..\stylecop.json">
<Link>stylecop.json</Link>
</AdditionalFiles>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<CodeAnalysisRuleSet>..\..\..\..\Altinn3.ruleset</CodeAnalysisRuleSet>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
</Project>