Converts the Launcher Service + Agent from net8/win-x64 self-contained to net48 framework-dependent, and makes Tesla.Contract net48-only (drops multi-targeting). Both consumers (Console + Launcher) are now a single TFM. Code changes for net48 (the only net8/netstandard2.1 APIs in use): - RandomNumberGenerator.Fill -> RandomNumberGenerator.Create().GetBytes (3x) - TcpListener.AcceptTcpClientAsync(ct) -> AcceptTcpClientAsync() + stop-on-cancel - byte[].AsSpan().SequenceEqual -> Linq SequenceEqual (no System.Memory) (2x) - PipeStream.Write(byte[]) / WriteAsync(byte[],ct) -> explicit (buf,0,len[,ct]) - Math.Clamp -> Math.Max/Min The generic host (Microsoft.Extensions.Hosting 8.x + UseWindowsService) runs on net48 unchanged. build.bat/install.bat updated for the folder-of-DLLs deploy; solution platform reverted x64 -> AnyCPU. RESULT — package size: ~3.7 MB on disk / 1.58 MB zipped, vs ~213 MB / 91 MB for the net8 self-contained build (~50-58x smaller). net48 ships in Win10/11 so no runtime prerequisite. 73 tests green; NOT re-validated on a live pod. Spike branch for evaluation — do not merge without a pod re-test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
49 lines
2.3 KiB
XML
49 lines
2.3 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<!-- net48 only: both consumers (Console and Launcher) target .NET Framework 4.8.
|
|
(Was multi-targeted net48;net8.0-windows while the Launcher was on net8.) -->
|
|
<TargetFramework>net48</TargetFramework>
|
|
|
|
<!-- CRITICAL: the output assembly MUST be named TeslaConsoleLaunchLib at
|
|
version 1.0.0.0. BinaryFormatter embeds the assembly name in the wire
|
|
stream and the Console resolves the wire types by that simple name, so
|
|
renaming the assembly would change the protocol. This is a pure
|
|
refactor that keeps the bytes identical. -->
|
|
<AssemblyName>TeslaConsoleLaunchLib</AssemblyName>
|
|
<RootNamespace>Tesla.Net</RootNamespace>
|
|
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
|
<FileVersion>1.0.0.0</FileVersion>
|
|
<Version>1.0.0.0</Version>
|
|
|
|
<Nullable>disable</Nullable>
|
|
<ImplicitUsings>disable</ImplicitUsings>
|
|
<LangVersion>latest</LangVersion>
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
<!-- Decompiled-style source: designer-ish fields, BinaryFormatter on net6. -->
|
|
<NoWarn>$(NoWarn);SYSLIB0011</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<!-- net48 reference assemblies so the project builds without a full targeting pack,
|
|
plus System.Text.Json (built into the net8 shared framework, a package on net48). -->
|
|
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
|
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
|
|
<PackageReference Include="System.Text.Json" Version="8.0.5" />
|
|
</ItemGroup>
|
|
|
|
<!-- The TCP/OFB client (Client/**) is net48-only: it depends on the crypto-stream
|
|
handshake in TeslaSecureConfiguration.dll. The Launcher (net6) is the SERVER
|
|
end of this protocol and never references these classes, so they are excluded
|
|
from the net6.0-windows build (which carries only the wire data types). -->
|
|
<ItemGroup Condition="'$(TargetFramework)' != 'net48'">
|
|
<Compile Remove="Client\**\*.cs" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
|
|
<!-- Source-built secure-config (PodConfigurationServer.NegotiateCryptoStreams),
|
|
emitting assembly TeslaSecureConfiguration. net48-only, same as Client/**. -->
|
|
<ProjectReference Include="..\SecureConfig\Tesla.SecureConfig.csproj" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|