Skip to content

Commit

Permalink
fix debug symbols in release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryptoc1 committed Dec 19, 2023
1 parent 1ff45ac commit 60b0da0
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/Sdk/Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
<ThunderWebsiteUrl Condition=" '$(ThunderWebsiteUrl)' == '' ">$(PackageProjectUrl)</ThunderWebsiteUrl>
</PropertyGroup>

<!-- NOTE: enforce optimizations in release mode -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<IncludeSymbols>false</IncludeSymbols>
<Optimize>true</Optimize>
</PropertyGroup>

<ItemGroup>
<Content Include="$(PluginChangelogFile)" Condition=" '$(PluginChangelogFile)' != '' AND Exists('$(MSBuildProjectDirectory)\$(PluginChangelogFile)') ">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
Expand Down Expand Up @@ -82,20 +90,6 @@ $(PluginInfoTypeAccessModifier) class $(PluginInfoTypeName)
<Copy SourceFiles="$(_GeneratedManifestPath)" DestinationFiles="$(PublishDir)manifest.json" SkipUnchangedFiles="true" Condition=" Exists('$(_GeneratedManifestPath)') " />
</Target>

<Target Name="PrepareForPluginCompile" BeforeTargets="Compile;CoreCompile">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
</PropertyGroup>

<!-- NOTE: enforce optimizations in release mode -->
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<IncludeSymbols>false</IncludeSymbols>
<Optimize>true</Optimize>
</PropertyGroup>
</Target>

<Target Name="PrepareForPluginPublish" BeforeTargets="PrepareForPublish">
<PropertyGroup>
<_PublishDir>$(PublishDir)</_PublishDir>
Expand Down

0 comments on commit 60b0da0

Please sign in to comment.