40 lines
1.8 KiB
XML
40 lines
1.8 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<OutputType>WinExe</OutputType>
|
|
<TargetFramework>net8.0-windows</TargetFramework>
|
|
<UseWindowsForms>true</UseWindowsForms>
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
|
<Nullable>enable</Nullable>
|
|
<AssemblyName>PlandentMstscScriptHook</AssemblyName>
|
|
<RootNamespace>Plandent.MstscScriptHook.Configurator</RootNamespace>
|
|
<Platforms>x64</Platforms>
|
|
<PlatformTarget>x64</PlatformTarget>
|
|
<PluginPayloadPath>$(MSBuildProjectDirectory)\..\artifacts\x64\$(Configuration)\PlandentMstscScriptHook.dll</PluginPayloadPath>
|
|
</PropertyGroup>
|
|
|
|
<!-- Beim normalen Visual-Studio-Debugging wird die lokal installierte .NET-8-Runtime benutzt.
|
|
Dadurch werden keine win-x64 Runtime-Packs von NuGet benötigt. -->
|
|
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
|
|
<SelfContained>false</SelfContained>
|
|
<PublishSingleFile>false</PublishSingleFile>
|
|
<DebugType>portable</DebugType>
|
|
</PropertyGroup>
|
|
|
|
<!-- Nur das Release-Publish erzeugt die verteilbare self-contained Single-File-EXE. -->
|
|
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
<SelfContained>true</SelfContained>
|
|
<PublishSingleFile>true</PublishSingleFile>
|
|
<PublishReadyToRun>false</PublishReadyToRun>
|
|
<DebugType>embedded</DebugType>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<EmbeddedResource Include="$(PluginPayloadPath)" LogicalName="PlandentMstscScriptHook.Native.PlandentMstscScriptHook.dll" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="CheckNativePlugin" BeforeTargets="CreateManifestResourceNames">
|
|
<Error Condition="!Exists('$(PluginPayloadPath)')" Text="Native Plugin-DLL fehlt: $(PluginPayloadPath). Zuerst Plugin bauen oder build-release.ps1 verwenden." />
|
|
</Target>
|
|
</Project>
|