How to omit System.CommandLine locale files from build output #2508
-
I have a .NET Framework WinForms app which is available in the |
Beta Was this translation helpful? Give feedback.
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> |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
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.