Skip to content

Commit

Permalink
Add AOT target for Key Vault SDK
Browse files Browse the repository at this point in the history
Resolves Azure#38500
  • Loading branch information
heaths committed Sep 14, 2023
1 parent cdd2c88 commit e5b3f52
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<PublishAot>true</PublishAot>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<IsClientLibrary>false</IsClientLibrary>
</PropertyGroup>

<ItemGroup>
<TrimmerRootAssembly Include="Azure.Security.KeyVault.Secrets" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="../../../core/Azure.Core/src/Azure.Core.csproj" />
<ProjectReference Include="../src/Azure.Security.KeyVault.Secrets.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project>

<PropertyGroup>
<TargetFrameworks Condition="'$(TargetFramework)' != ''">$(TargetFramework)</TargetFrameworks>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\Directory.Build.targets"
Condition="'$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))' != ''" />

<!-- Canonicalize NoWarn: https://github.com/dotnet/runtime/issues/91965 -->
<ItemGroup>
<_NoWarn Include="$(NoWarn)" />
</ItemGroup>
<PropertyGroup>
<NoWarn>@(_NoWarn)</NoWarn>
</PropertyGroup>

<!-- Disable targets not necessary for samples -->
<Target Name="ValidateTargetFrameworks" />
<Target Name="VerifyProjectReferencesReferences" />

</Project>
4 changes: 4 additions & 0 deletions sdk/keyvault/Azure.Security.KeyVault.Secrets/aot/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

System.Console.WriteLine("Hello, world!");

0 comments on commit e5b3f52

Please sign in to comment.