Setting Up AP .Net Mock on Windows in a Development Environment
This section describes how to install Application Protector (AP) .Net on a Windows platform for development purposes.
Note: The Log Forwarder and RP Agent should not be installed in a development environment.
Verifying prerequisites
Ensure that the following prerequisites are met:
- A supported version of .NET Standard 2.0 is installed on the machine.
Extracting the AP .Net Setup Scripts and Package
To extract the setup scripts and package:
- Download the
ApplicationProtector_WIN-ALL-64_x86-64_NET-STD-2.0-64_<version>.zipfile to any location on the machine where you want to install the protector. - Extract the contents of the
ApplicationProtector_WIN-ALL-64_x86-64_NET-STD-2.0-64_<version>.zipfile.
The following setup files are extracted:ApplicationProtector_WIN-ALL-64_x86-64_NET-STD-2.0-64_<version>.zipsignatures/ApplicationProtector_WIN-ALL-64_x86-64_NET-STD-2.0-64_<version>.zip_10.0.sig
- Verify the digital signature of the signed AP .Net build.
For more information about verifying the signed AP .Net build, refer to Verification of Signed Protector Build. - Extract the contents of the AP .Net installation package again.
The following setup files are extracted:LogforwarderSetup_Windows_x64_<version>.exeRPAgentSetup_Windows_x64_<version>.exeAPDotNetSetup_Windows_x64_<version>.exeAPDotNetMockSetup_Windows_x64_<version>.exe
Installing AP .Net Mock on Windows in a Development Environment
This section describes how to install AP .Net Mock on a Windows platform for development purposes.
Important:
- Ensure that the following folders do not exist before installation:
-C:\Users\Administrator\.nuget\packages\dotnetprotector
-C:\Users\Administrator\.nuget\packages\dotnetprotectormocksetup- You can install only one environment at a time either production or development.
Using Windows Wizard
Run the
APDotNetMockSetup_Windows_x64_<version>.exeinstaller from the created directory.
The Select Destination Location screen appears.Set the installation directory to
C:\Program Files\Protegrity\sdk\dotnet.Click Next.
The Ready to Install screen appears.Click Install.
The Completing the Defiance AP DOTNET API Setup Wizard screen appears.Click Finish to exit the installer.
The AP .Net Mock is installed successfully.
The default installation directories for different platforms are given in the following table.
Table: Default Installation DirectoriesPlatform Directory Windows 64-bit C:\Program Files\Protegrity\sdk\dotnet\libAPI Docs C:\Program Files\Protegrity\sdk\dotnet\docVerify that
DotNetProtectorMockSetup.<version>.nupkgNuGet package for the AP .NET is installed in the<installation_directory>\dotnet\libinstallation directory.Install the NuGet Package.
a. In Visual Studio, open Solution Explorer.b. Right-click on Dependencies and select Manage NuGet Packages.
The NuGet Package Manager screen appears.c. Click the Settings icon next to the Package source list.
d. In the Options dialog box, click the ellipsis next to the Source field.
e. Browse to and select the
C:\Program Files\Protegrity\sdk\dotnet\liblib directory.f. Enter a name for the package source, for example APDotNetMockLib and click Update.
Thelibdirectory path appears in the Package sources list.g. Click OK to close the dialog box.
h. In the Package source list, select the newly created source.
i. Click Browse, locate the
DotNetProtectorMockSetuppackage.The DotNetProtectorMockSetup package appears in the list of packages.
j. Click Install.
The DotNetProtectorMockSetup package is installed.
- Run the Program.
After installation, run your application to verify integration.
For more information about installing a NuGet package, refer to Install and manage packages in Visual Studio using the NuGet Package Manager.
- Run the Program.
Using Silent Mode
This section describes how to perform a silent installation of AP .Net Mock using command-line parameters.
Silent installation allows you to install AP .Net Mock without user interaction, making it suitable for automated deployments and scripting.
To view usage of the AP .Net Mock installation, use the -help parameter during silent installation.
APDotNetMockSetup_Windows_x64_10.0.0+0.g8606.exe -help
To specify the directory for the AP .Net Mock installation, use the -dir parameter during silent installation.
APDotNetMockSetup_Windows_x64_10.0.0+0.g8606.exe -dir C:\Users\Administrator
Note:
-diris a mandatory parameter for silent installation.
Uninstalling Application Protector .Net Mock on Windows in a Development Environment
This section describes how to completely remove AP .Net Mock from a Windows platform used for development.
To uninstall the .Net Mock from the development environment:
Navigate to the Installation Directory.
a. Go toC:\Program Files\Protegrity\sdk\dotnet.Run the Uninstall Utility located in the directory.
Delete the Installation Directory.
a. After uninstallation, delete theC:\Program Files\Protegrity\sdkfolder.Uninstall the NuGet Package.
a. Open Visual Studio and go to Manage NuGet Packages for Solution.
b. Browse and select theDotNetProtectorMockSetuppackage.
c. Click Uninstall.The AP .Net Mock Setup is uninstalled from the development environment.
Thedotnetprotectorpackage will be deleted from the NuGet Package Folder during the unintallation process.
Feedback
Was this page helpful?