Skip to content

Commit

Permalink
Merge pull request #71007 from dibarbet/dev/dibarbet/executables
Browse files Browse the repository at this point in the history
Fix building executables for language server
  • Loading branch information
dibarbet authored Dec 13, 2023
2 parents 1f296ff + 2d59c8e commit 8c38000
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!--
By default since this is an Exe project and we build on windows, we'll get a .exe as output from a platform neutral build.
However, we really only want an executable if we're building for a specific platform (aka have a runtime identifier).
So if we don't have a platform, tell the build not to output a .exe file because we're building platform neutral bits.
-->
<UseAppHost Condition="'$(RuntimeIdentifier)' == ''">false</UseAppHost>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand All @@ -21,6 +14,15 @@
<IsPackable>true</IsPackable>
<!-- Our outer Pack task (defined in PackAllRids.targets) invokes Pack passing in a PackRuntimeIdentifier to produce one package per RID; from that we can set everything else. -->
<RuntimeIdentifier Condition="'$(PackRuntimeIdentifier)' != '' and '$(PackRuntimeIdentifier)' != 'neutral'">$(PackRuntimeIdentifier)</RuntimeIdentifier>

<!--
By default since this is an Exe project and we build on windows, we'll get a .exe as output from a platform neutral build.
However, we really only want an executable if we're building for a specific platform (aka have a runtime identifier).
So if we don't have a platform, tell the build not to output a .exe file because we're building platform neutral bits.
-->
<UseAppHost Condition="'$(RuntimeIdentifier)' == ''">false</UseAppHost>

<PackageId>$(AssemblyName).$(PackRuntimeIdentifier)</PackageId>
<!--
Publish the platform specific executables before any of the pack related targets run.
Expand Down

0 comments on commit 8c38000

Please sign in to comment.