Archived

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

Cannot add strong-named IceBox assembly reference to VS2010 C# projects

Using:
* Windows 7 (32- and 64-bit)
* Visual Studio 2010 SP1
* Ice 3.4.2 from the official installer

The IceBox assembly cannot be added to a C# project via the "Add Reference" dialog in Visual Studio, but all other Ice assemblies can. With the default dialog it doesn't appear at all in the .NET assemblies list, and with the enhanced dialog from Productivity Power Tools it appears but it is reported as being incompatible with the target .NET framework version, regardless of what that is.

Trying to add the DLL file directly produces the same error as above. Editing the project file XML to add the strong-named assembly reference then reloading the project results in an unresolved reference.

However, I have discovered that if icebox.exe, which is in the same directory as IceBox.dll, is moved, renamed or replaced with one I built from source then the strong-named assembly reference will work. It appears that icebox.exe masks IceBox.dll.

The "Ice Configuration" dialog from the Visual Studio add-in can add IceBox as a file reference, but that isn't valid if Ice is installed in different locations on different build machines (e.g. 32-bit versus 64-bit).

Comments

  • xdm
    xdm La Coruña, Spain
    Hi Paul,

    As you found this is caused by IceBox.dll and icebox.exe being in the same directory.

    The easy workaround is to move icebox.exe to other directory in your PATH.

    When you build from sources icebox.exe don't cause a conflict, as in that case icebox.exe has not digital signature and Visual Studio don't consider it as a possible strong name reference.

    The "Ice Configuration" dialog from the Visual Studio add-in can add IceBox as a file reference, but that isn't valid if Ice is installed in different locations on different build machines (e.g. 32-bit versus 64-bit).
    That is because when Visual Studio found the possible conflict , it adds a HintPath, and that don't work well with Ice installed in different locations. Once you have moved icebox.exe to a different directory, adding IceBox dll will not require a HintPath, and will work well with Ice installed in different locations.

    We will make sure this get fixed with the next Ice release, let me know if you need further help with that.
  • Thanks, I look forward to the next version. :)