Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rmi1974/587fbdee59bc32a96875fb31e0705100 to your computer and use it in GitHub Desktop.
Save rmi1974/587fbdee59bc32a96875fb31e0705100 to your computer and use it in GitHub Desktop.
How to validate Microsoft .NET Frameworks installation in WINEPREFIX #wine #debug #dotnet #winetricks

How to validate Microsoft .NET Frameworks installation in WINEPREFIX

Using .NET Framework Setup Verification Tool

To verify .NET Framework installation(s) in WINEPREFIX you can always use the .NET Framework Setup Verification Tool from Aaron Stebner (Microsoft) which checks for proper installation of .NET assemblies and registry entries.

Select the .NET Framework you want to verify and evaluate the log file manually if verification failed.

Using winetricks --verify

Winetricks has a builtin --verify function to automate running .NET Framework Setup Verification Tool from Aaron Stebner (Microsoft) after .NET Framework installation. Use it as follows:

winetricks -q --verify dotnet40

NOTE: Currently it's not possible to retroactively run --verify on existing installations. I've created Winetricks Issue #1506 to track this.

Manual checks

CLR bootstrapper: presence + bitness + size/date

$ find .wine/drive_c/ -iname "mscoree.dll" -exec file {} \;
.wine/drive_c/windows/syswow64/mscoree.dll: PE32 executable (DLL) (GUI) Intel 80386, for MS Windows
.wine/drive_c/windows/system32/mscoree.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows

$ find .wine/drive_c/ -iname "mscoree.dll" -exec ls -la {} \;
-rw-rw-r--. 1 focht focht 282112 Oct 24  2007 .wine/drive_c/windows/syswow64/mscoree.dll
-rw-rw-r--. 1 focht focht 448000 Oct 23  2007 .wine/drive_c/windows/system32/mscoree.dll

Check if GAC update/refresh is properly working by running both, 32-bit and 64-bit NGEN.

$ find .wine/drive_c/ -iname "ngen.exe" -exec file {} \;

.wine/drive_c/windows/Microsoft.NET/Framework64/v2.0.50727/ngen.exe: PE32+ executable (console) x86-64, for MS Windows
.wine/drive_c/windows/Microsoft.NET/Framework/v2.0.50727/ngen.exe: PE32 executable (console) Intel 80386, for MS Windows

32-bit NGEN

wine "c:\\windows\\Microsoft.NET\\Framework\\v2.0.50727\\ngen.exe" update /force

64-bit NGEN

wine "c:\\windows\\Microsoft.NET\\Framework64\\v2.0.50727\\ngen.exe" update /force

Example for looking up registry data 'Service Pack' value after .NET Framework 2.0 SP1 install:

$ wine reg QUERY 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727' /v SP

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727
    SP    REG_DWORD    0x1

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment