ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing and using .NET assemblies
  • 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 provided with WINDEV, in the "Programs\Data\Example.snk" directory of the installation directory of WINDEV. This file is used to test the generation of strong-named assemblies.
      Remark: 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).
Remarks:
  • 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 version required
  • Version 9
Comments
DOC and Download
https://docs.microsoft.com/pt-br/dotnet/framework/app-domains/install-assembly-into-gac

https://docs.microsoft.com/pt-br/dotnet/framework/tools/gacutil-exe-gac-tool

https://docs.microsoft.com/pt-br/dotnet/framework/app-domains/install-assembly-into-gac

DOWNLOAD
https://www.microsoft.com/en-gb/download/details.aspx?id=8279

INSTALLLOCATION
c:\Program Files\Microsoft SDKs\Windows\v7.1\
Boller
01 Jun. 2021
INFO
O gacutil vem com o Visual Studio, não com o VSTS. Faz parte do Windows SDK e pode ser baixado separadamente em http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en . Esta instalação terá gacutil.exeincluído. Mas primeiro verifique aqui

C: \ Arquivos de programas \ Microsoft SDKs \ Windows \ v6.0A \ bin
você pode tê-lo instalado.

Como @devi mencionado

Se você decidir pegar os arquivos gacutil da instalação existente, observe que no .NET 4.0 existem três arquivos: gacutil.exe gacutil.exe.config e 1033 / gacutlrc.dll
Boller
01 Jun. 2021

Last update: 08/31/2023

Send a report | Local help