-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathNodeApi.DotNetHost.csproj
More file actions
46 lines (39 loc) · 1.88 KB
/
NodeApi.DotNetHost.csproj
File metadata and controls
46 lines (39 loc) · 1.88 KB
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Microsoft.JavaScript.NodeApi.DotNetHost</AssemblyName>
<RootNamespace>Microsoft.JavaScript.NodeApi.DotNetHost</RootNamespace>
<IsPackable>true</IsPackable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Reflection.Emit" Condition="$(NetStandard)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NodeApi\NodeApi.csproj" GeneratePathProperty="true" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<None Pack="true" PackagePath="\" Include="..\..\README.md" />
</ItemGroup>
<Target Name="PublishNativeHost" BeforeTargets="Pack"
Condition=" '$(NoPublish)' != 'true' "
>
<!--
Publish the AOT native binary (for the current RuntimeIdentifier) so that it can be packed.
It's necessary to use <Exec/> here rather than a recursive <MSBuild/> task because
PublishAot modifies properties/targets which would not be re-computed by the task.
-->
<Exec Command="dotnet publish $(MSBuildThisFileDirectory)..\NodeApi\NodeApi.csproj -c $(Configuration) -f $(AotTargetFramework) --self-contained -p:PublishAot=true" />
</Target>
<Target Name="NpmPack"
AfterTargets="Pack"
Outputs="$(PackageOutputPath)node-api-dotnet-$(PackageVersion).tgz"
>
<PropertyGroup>
<NodeApiPackScript>$(MSBuildThisFileDirectory)..\node-api-dotnet\pack.js</NodeApiPackScript>
<RuntimeIdentifierList Condition=" '$(RuntimeIdentifierList)' == '' ">$(RuntimeIdentifier)</RuntimeIdentifierList>
</PropertyGroup>
<Message Importance="High" Text="node $(NodeApiPackScript) node-api-dotnet $(Configuration) $(RuntimeIdentifierList)" />
<Exec Command="node $(NodeApiPackScript) node-api-dotnet $(Configuration) $(RuntimeIdentifierList)" />
</Target>
</Project>