Shield MSBuild is a simple package that allows you to protect your .NET application without extra configurations or processes, it is added in the compilation process regardless of whether it is from Visual Studio, Amazon Web Services, Azure or any other provider.
You can install
ByteHide Shield MSbuild in three different ways, we recommend doing it the first or the second way.
If you want to protect several projects, you must install Shield in each of them (since they are compiled individually), if for example your project has many packages and you only want to protect one, install it only in that project. Installing Shield on all projects and only configure one can cause build errors.
From NuGet Packages Manager
Open the nuget package manager:
ByteHide.Shield.MSbuild in the manager search bar:
Select the latest stable version and click on install:
From Package Manager Console
In your visual studio window go to:
Tools > Nuget Package Manager > Package Manager Console
In the terminal type:
From the project file (.csproj)
Find the project where you want to install Shield and Double click (or open) on the project file:
An .xml file will open where the project configuration is located, there write:
<ItemGroup> <PackageReference Include="ByteHide.Shield.MSbuild"> <PrivateAssets>all</PrivateAssets> <IncludeAssets> runtime; build; native; contentfiles; analyzers; buildtransitive </IncludeAssets> </PackageReference> </ItemGroup>
The ItemGroup tag must always go inside the
Project tag and it does not matter if there are other
ItemGroup tags, you can have several at the same time.
After adding it, save the file and check that it has been installed correctly: