Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building executables for language server #71007

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were checking for the RuntimeIdentifier before it got set. Moved this below and now it works.


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