Archived

This forum has been archived. Please start a new discussion on GitHub.

visual Studio & ice 3.0 & Global Assembly Cache

We have three installations of VS 2003 and/or VS2005 with both VCPP and C# projects.

In all the installations, the ICE assemblies do not show up in the Add Reference dialog box on the .NET tab. This is a change from earlier versions where you could add references to the ICE assemblies in the global assembly cache.

Now one must browse to the installed file, e.g. C:\Ice-3.1.0\bin\icecs.dll to add a reference. This defeats the purpose of having the global assembly cache.

Further, to maintain platform compatibility, we standardized on Ice 3.1.0 for now. One computer was at Ice 3.1.1. The uninstall (thru Add/Remove programs) deleted the files, but did not remove the entry from the GAC. That left both 3.1.0 and 3.1.1 in the GAC, but only 3.1.0 was installed on the machine.
At this point, 3.1.0 was uninstalled, and both 3.1.0 and 3.1.1 were manually uninstalled from the GAC thru the .net Frameworks manager. Then Ice-3.1.0-VC80.MSI was run again to install on the computer.

I believe this led to the following error in the provided Ice demo files:
...\Ice-3.1.0\DemoCS\Ice\Callback. Opened in Vs2005, compiled but at runtime produced the following exception:
{"Could not load file or assembly 'icecs, Version=3.1.1.0, Culture=neutral, PublicKeyToken=1f998c50fec78381' or one of its dependencies. The system cannot find the file specified.":"icecs, Version=3.1.1.0, Culture=neutral, PublicKeyToken=1f998c50fec78381"}

Note that at this point, Ice 3.1.1 was no longer installed or in the global assembly cache, nor referenced in the project -- only 3.1.0 exists on the machine.

Larry O'Heron
250 E. River Rd
Rochester NY 14612

Comments

  • How about using this alternative

    http://weblogs.asp.net/jdanforth/archive/2003/12/16/43841.aspx

    or

    http://weblogs.asp.net/rmclaws/archive/2003/11/15/37743.aspx

    CommonAssemblies directories make the live much easier when working with multiple machines. Just synchronize the directories and everything will be fine.

    Stephan
  • Stephen,

    Thank you. That is food for thought and I will review the material.

    I was interested in hearing from the folks at ZeroC why we used to be able to see the Ice reference from the GAC and no longer can. My thought is that they are building the .msi files differently now.

    I also need an understanding of why their demo code refs the non-existent 3.1.1 assembly.

    Larry O'Heron
  • Before we can provide assistance you must first fill in your signature information as described in our support policy notice.
  • visual Studio & ice 3.0 & Global Assembly Cache

    I have editted my signature again.

    I look forward to your response.

    Larry O'Heron
  • Further, to maintain platform compatibility, we standardized on Ice 3.1.0 for now. One computer was at Ice 3.1.1. The uninstall (thru Add/Remove programs) deleted the files, but did not remove the entry from the GAC. That left both 3.1.0 and 3.1.1 in the GAC, but only 3.1.0 was installed on the machine.
    At this point, 3.1.0 was uninstalled, and both 3.1.0 and 3.1.1 were manually uninstalled from the GAC thru the .net Frameworks manager. Then Ice-3.1.0-VC80.MSI was run again to install on the computer.

    I believe this led to the following error in the provided Ice demo files:
    ...\Ice-3.1.0\DemoCS\Ice\Callback. Opened in Vs2005, compiled but at runtime produced the following exception:
    {"Could not load file or assembly 'icecs, Version=3.1.1.0, Culture=neutral, PublicKeyToken=1f998c50fec78381' or one of its dependencies. The system cannot find the file specified.":"icecs, Version=3.1.1.0, Culture=neutral, PublicKeyToken=1f998c50fec78381"}

    The exception indicates that an assembly that the binary depends on can no longer be found by looking the standard assembly locations (such as the current directory and the GAC).

    From your description, it sounds like you were using both VS 2003 and VS 2005 on the same machine? If so, VS 2003 and 2005 have different and incompatible assemblies and APIs. In fact, you cannot use VS 2003 to link with .NET 2.0, and you cannot use VS 2005 to link with .NET 1.1.

    The error message indicates that the code was looking for the 3.1.1 version of the Ice assembly. In turn, that indicates that it was compiled against that version of Ice.
    Note that at this point, Ice 3.1.1 was no longer installed or in the global assembly cache, nor referenced in the project -- only 3.1.0 exists on the machine.

    The message clearly indicates that the binary depended on 3.1.1. So, whatever you ran was compiled at a time where 3.1.1 was still installed on the machine.

    Note that, if you compile something with 3.1.0, then uninstall 3.1.1 and run the old binaries, things will still work because 3.1.1 installs policy files that indicate to the .NET run time that 3.1.1 is backward compatible with 3.1.0, so a binary compiled against the 3.1.0 assemblies will execute using the 3.1.1 assemblies. However, this doesn't work in the other direction: Ice minor releases are backward compatible, but not forward compatible.

    If VS does not show the Ice assemblies when you browse the GAC with the "Add Reference" dialog, that indicates that the assemblies are indeed not in the GAC. (You can verify this by starting up Windows Explorer and navigating to C:\Windows\assembly.)

    Cheers,

    Michi.
  • The paragraph below was the key to solving the problem. I reinspected the entire GAC and subsequently discovered the policies pertaining to ICE. When I manually removed the policies, I made sufficient progress to believe that I've isolated the problem.

    That still leaves 2 issues.
    1) ICE 3.1.1, on uninstall, should (but does not) remove itsself from the GAC, and especially it should remove the policies.
    2) ICE does not show up on the Add Reference .NET tab on three different machines. That is sufficient for me to believe that something is not correct with the install package.
    Thanks for the response on the policies

    ---
    Note that, if you compile something with 3.1.0, then uninstall 3.1.1 and run the old binaries, things will still work because 3.1.1 installs policy files that indicate to the .NET run time that 3.1.1 is backward compatible with 3.1.0, so a binary compiled against the 3.1.0 assemblies will execute using the 3.1.1 assemblies. However, this doesn't work in the other direction: Ice minor releases are backward compatible, but not forward compatible.
    ---
  • Thanks for the detailed report! I agree, there is something wrong with the way the assemblies are installed--they should show up in the "Add Reference" dialog. We'll have a look at this for the next release, thanks!