How to omit System.CommandLine locale files from build output #2508
|
I have a .NET Framework WinForms app which is available in the |
Answered by
KalleOlaviNiemitalo
Jan 7, 2025
Replies: 2 comments
|
Simple workaround: <ItemGroup>
<PackageReference Include="System.CommandLine" PrivateAssets="all" GeneratePathProperty="true" />
</ItemGroup>
<Target Name="CopySystemCommandLineAssemblyOnly" AfterTargets="Build">
<Copy SourceFiles="$(PkgSystem_CommandLine)/lib/netstandard2.0/System.CommandLine.dll" DestinationFolder="$(OutputPath)" />
</Target> |
0 replies
|
Set the SatelliteResourceLanguages property https://learn.microsoft.com/dotnet/core/project-sdk/msbuild-props#satelliteresourcelanguages I'm not sure it works in an old-style csproj file. But it certainly works in a .NET SDK project that targets .NET Framework. |
0 replies
Answer selected by
YoshiRulz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Set the SatelliteResourceLanguages property
https://learn.microsoft.com/dotnet/core/project-sdk/msbuild-props#satelliteresourcelanguages
I'm not sure it works in an old-style csproj file. But it certainly works in a .NET SDK project that targets .NET Framework.