PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Creating a strong-named .NET assembly from a WINDEV project
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
Before creating a .NET assembly, all the elements required by this assembly must have been developed in a WINDEV project.
Creating a strong-named .NET assembly from a WINDEV project
To create a strong-named .NET assembly:
  1. Create a ".snk" file.
    • The snk file contains the "public key/private key" pair used to digitally sign the assemblies created by a company. In most cases, the same snk file is used to sign all the products of a company.
    • This file must be kept secret in order to prevent a third party from signing its own assemblies with the same signature.
    • To generate an ".snk" file, you must use the generator supplied with the .NET SDK (sn.exe file). The following command line must be used to generate a snk file: "sn.exe -k MySNKFile.snk"
    • An example file is supplied with WINDEV, in the "Programs\Data\Example.snk" directory of the setup directory of WINDEV. This file is used to test the generation of strong-named assemblies.
      Note: this file being distributed with WINDEV, it does not allow you to identify in a unique way the generated assemblies.
  2. In the wizard for generating .NET assemblies, specify the location of the snk file that was created beforehand.
  3. The strong-named assembly can be copied to C:\Windows\Assembly (also called GAC).
Notes:
  • If you are using a version 2.0 of the framework to compile your assembly, WINDEV creates no link between the generated assembly and the DLLs required to run it. Therefore, these DLLs will not be copied with the assembly into the GAC directory. These DLLs must be found in a directory accessible by PATH.
  • From Windows Vista, if the UAC is enabled, you may get an error such as "Access denied" during the copy into the "C:\Windows\Assembly" directory. In this case:
    • run the "command prompt" program (cmd.exe) as administrator.
    • use the "gacutil" tool. Example: gacutil.exe -I "c:\My Projects\My Project\Exe\MyAssembly.dll"
  • If these DLLs are copied, then wdxxxnet.dll should also be copied into the GAC.
Minimum required version
  • Version 9
Comments
Click [Add] to post a comment