-
Notifications
You must be signed in to change notification settings - Fork 148
/
Copy pathcsharp-example-extension.csproj
36 lines (31 loc) · 1.78 KB
/
csharp-example-extension.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
<Project Sdk="Microsoft.NET.Sdk">
<!-- Common settings for all target frameworks and platforms -->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net5.0</TargetFrameworks>
<RootNamespace>csharp_example_extension</RootNamespace>
<LangVersion>latest</LangVersion>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<!-- Disable PDB file creation for Release configuration -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugSymbols>false</DebugSymbols>
<DebugType>None</DebugType>
</PropertyGroup>
<!-- Include Lambda Extension hook script into the output for AnyCPU builds, since they depend on a preinstalled .NET Core Runtime -->
<ItemGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<Content Include="extensions/csharp-example-extension">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<!-- This is x64 specific - result is published as a single self-contained file, so that it doesn't need .NET runtime to be preinstalled on the VM -->
<PropertyGroup Condition=" '$(Platform)' == 'x64' ">
<PublishTrimmed>true</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
</PropertyGroup>
<!-- Custom step for moving self-contained executable into extensions folder, so that Lambda Extensions runtime can invoke it directly -->
<Target Name="RenameExtensionHook" AfterTargets="Publish" Condition=" '$(PublishSingleFile)' == 'true' ">
<Move SourceFiles="$(PublishDir)/csharp-example-extension" DestinationFiles="$(PublishDir)/extensions/csharp-example-extension" OverwriteReadOnlyFiles="true" />
</Target>
</Project>