[Bug 30707] New: Add support for .NET 4.0 assembly cache (.NET 4.0 Framework installer)

wine-bugs at winehq.org wine-bugs at winehq.org
Thu May 17 06:13:05 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=30707

             Bug #: 30707
           Summary: Add support for .NET 4.0 assembly cache (.NET 4.0
                    Framework installer)
           Product: Wine
           Version: 1.5.4
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: msi
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: focht at gmx.net
    Classification: Unclassified


Hello,

this is a bug covering Hans' patch http://source.winehq.org/patches/data/86357

'winetricks dotnet40' recipe currently contains 'gacutil' workaround/hack for
installing assemblies into .NET 4.0 GAC.
.NET's native fusion currently fails due to junction support (bug 10601) hence
all assemblies must be manually installed using 'gacutil' as post-installation
step.

Using Hans' patch and setting 'fusion=builtin' before running the .NET 4.0
installer gets .NET 4.0 assemblies installed into GAC.
The installer actually succeeds which is an improvement over the current
"workaround" recipe.

There is a difference though.
With Hans' patch all .NET 4.0 assemblies get installed into:

--- snip ---
$ pwd
/home/focht/.wine/drive_c/windows/assembly
...
$ ls */*
GAC_32/CustomMarshalers:
4.0.0.0__b03f5f7f11d50a3a

GAC_32/ISymWrapper:
4.0.0.0__b03f5f7f11d50a3a

GAC_32/Microsoft.Transactions.Bridge.Dtc:
4.0.0.0__b03f5f7f11d50a3a

GAC_32/Microsoft.VisualBasic.Activities.Compiler:
10.0.0.0__b03f5f7f11d50a3a
...
GAC_32/System.Web:
4.0.0.0__b03f5f7f11d50a3a

GAC_MSIL/Accessibility:
4.0.0.0__b03f5f7f11d50a3a

GAC_MSIL/AspNetMMCExt:
4.0.0.0__b03f5f7f11d50a3a

GAC_MSIL/Microsoft.Build:
4.0.0.0__b03f5f7f11d50a3a
...
--- snip ---

Starting with .NET 4.0 there exist two global assembly caches - the "public"
one and a "private" one for the Framework.

In previous versions, all .NET assemblies were installed into
"C:\\windows\\assembly".

With .NET 4.0 the assemblies are further split.
The "private" GAC for 4.0 is located in "c:\\windows\\Microsoft.NET\\assembly".

See: http://msdn.microsoft.com/en-us/magazine/dd727509.aspx

("Understanding The CLR Binder")

--- quote ---
In .NET Framework 4.0, the GAC went through a few changes. The concept of
placing assemblies into a global directory began in CLR v1.1. In case of .NET
Framework 1.1 (which had CLR v1.1) and .NET Framework 2.0 (which had CLR 2.0),
the GAC was split into two, one for each CLR. This avoided the leaking of
assemblies across CLR versions. For example, if both .NET 1.1 and .NET 2.0
shared the same GAC, then a .NET 1.1 application, loading an assembly from this
shared GAC, could get .NET 2.0 assemblies, thereby breaking the .NET 1.1
application.

The CLR version used for both .NET Framework 2.0 and .NET Framework 3.5 is CLR
2.0. As a result of this, there was no need in the previous two framework
releases to split the GAC. The problem of breaking older (in this case, .NET
2.0) applications resurfaces in Net Framework 4.0 at which point CLR 4.0
released. Hence, to avoid interference issues between CLR 2.0 and CLR 4.0, the
GAC is now split into private GACs for each runtime.

Tools such as GACUtil and Shfusion will behave exactly the same as they did in
pre–.NET Framework 4.0 scenarios. Also, the behavior of publisher policy
(explicitly mentioned, since it is required to install these policy files to
the GAC) will not change. The main change is that CLR v2.0 applications now
cannot see CLR v4.0 assemblies in the GAC.
...
--- quote ---

With the current 'winetricks dotnet40' recipe and help of .NET 4.0 'gacutil'
the assemblies live in "private" GAC:

--- snip ---
$ pwd
/home/focht/.wine/drive_c/windows/Microsoft.NET/assembly
...
$ ls */*

GAC_MSIL/UIAutomationProvider:
v4.0_4.0.0.0__31bf3856ad364e35

GAC_MSIL/UIAutomationTypes:
v4.0_4.0.0.0__31bf3856ad364e35

GAC_MSIL/WindowsBase:
v4.0_4.0.0.0__31bf3856ad364e35

GAC_MSIL/WindowsFormsIntegration:
v4.0_4.0.0.0__31bf3856ad364e35
--- snip ---

"public" GAC with no previous .NET versions installed:

--- snip ---
$ ls assembly/
PublisherPolicy.tme  pubpol1.dat  temp  tmp
--- snip ---

There are some problems when 'fusion' remains set to 'builtin' after
installation though that will be subject to other bugs.

If the .NET 4.0 'private' GAC location is fixed one can safely remove
'fusion=builtin' workaround after running the installer and have a functional
.NET Framework installation running with native mscoree/fusion.
This allows to get rid of 'gacutil' hack.

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the wine-bugs mailing list