Skip to main content
Version: 2023.4

11.1.  How to Exclude a Specific Assembly From Distribution


Once activated, assembly embedding and merging features change a set of assemblies that should be distributed with the obfuscated app. This change requires excluding the affected assemblies from the distribution. Eazfuscator.NET does most of this work automatically. However, in some cases, you may need to put extra effort into excluding the specific assemblies from being distributed.

11.1.2.¬†NuGet Package‚Äč

If you want to exclude a specific reference assembly from being distributed as a part of the NuGet package, you should mark the corresponding package or project references with PrivateAssets=all attribute as shown below:

Example 11.1. MSBuild project file



<!-- The assembly may come from a referenced NuGet package -->
<PackageReference Include="Contoso.Framework.DataAccess" Version="4.7.5" PrivateAssets="all"/>

<!-- or from a project -->
<ProjectReference Include="..\Contoso.QuickRun.Engine.Dal.csproj" PrivateAssets="all"/>




If you want to exclude a specific assembly from being distributed as a part of the product setup, you should consult the documentation of the setup authoring tool you use.