Setting Up AP .Net Mock on Windows in a Development Environment

Learn about installating AP .Net 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:

  1. Download the ApplicationProtector_WIN-ALL-64_x86-64_NET-STD-2.0-64_<version>.zip file to any location on the machine where you want to install the protector.
  2. Extract the contents of the ApplicationProtector_WIN-ALL-64_x86-64_NET-STD-2.0-64_<version>.zip file.
    The following setup files are extracted:
    • ApplicationProtector_WIN-ALL-64_x86-64_NET-STD-2.0-64_<version>.zip
    • signatures/ApplicationProtector_WIN-ALL-64_x86-64_NET-STD-2.0-64_<version>.zip_10.0.sig
  3. 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.
  4. Extract the contents of the AP .Net installation package again.
    The following setup files are extracted:
    • LogforwarderSetup_Windows_x64_<version>.exe
    • RPAgentSetup_Windows_x64_<version>.exe
    • APDotNetSetup_Windows_x64_<version>.exe
    • APDotNetMockSetup_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

  1. Run the APDotNetMockSetup_Windows_x64_<version>.exe installer from the created directory.
    The Select Destination Location screen appears.

  2. Set the installation directory to C:\Program Files\Protegrity\sdk\dotnet.

  3. Click Next.
    The Ready to Install screen appears.

  4. Click Install.
    The Completing the Defiance AP DOTNET API Setup Wizard screen appears.

  5. 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 Directories

    PlatformDirectory
    Windows 64-bitC:\Program Files\Protegrity\sdk\dotnet\lib
    API DocsC:\Program Files\Protegrity\sdk\dotnet\doc
  6. Verify that DotNetProtectorMockSetup.<version>.nupkg NuGet package for the AP .NET is installed in the <installation_directory>\dotnet\lib installation directory.

  7. 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\lib lib directory.

    f. Enter a name for the package source, for example APDotNetMockLib and click Update.
    The lib directory 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 DotNetProtectorMockSetup package.

    The DotNetProtectorMockSetup package appears in the list of packages.

    j. Click Install.

    The DotNetProtectorMockSetup package is installed.

    1. 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.

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: -dir is 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:

  1. Navigate to the Installation Directory.
    a. Go to C:\Program Files\Protegrity\sdk\dotnet.

  2. Run the Uninstall Utility located in the directory.

  3. Delete the Installation Directory.
    a. After uninstallation, delete the C:\Program Files\Protegrity\sdk folder.

  4. Uninstall the NuGet Package.
    a. Open Visual Studio and go to Manage NuGet Packages for Solution.
    b. Browse and select the DotNetProtectorMockSetup package.
    c. Click Uninstall.

    The AP .Net Mock Setup is uninstalled from the development environment.
    The dotnetprotector package will be deleted from the NuGet Package Folder during the unintallation process.


Last modified : January 19, 2026