Archived

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

IceBox Hello Sample VS 2010 FileNotFoundException

Hello,

I was hoping someone here could help me with this. When I try to load an IceBox service assembly I get a FileNotFoundException.

My Setup:
Windows 7 Ent x64
VisualStudio 2010
Ice 3.4.1

Config:

Environment:
Path=<Ice Install Dir>\bin\x64;<Ice Install Dir>\bin\;%PATH%

IDE:
New C# project (DiceBoxServer), Ice project config turned on and set to use Ice and IceBox.
Added the following files to the project.
<Ice Install Dir>\<extracted demos.zip dir>\democs\IceBox\Hello
Hello.ice
HelloI.cs
HelloServiceI.cs
config.icebox (updated to use new assembly name)
config.service (modifed by removing :sll from Hello.Endpoints, and put # in front of ssl config section)

Then when I attempt to launch via the following command:
iceboxnet --Ice.Config=config.icebox
I get the following error:


!! 2/3/2011 15:51:12:814 iceboxnet.exe: error: IceBox.FailureException
reason = "ServiceManager: unable to load service 'DiceBoxServer.dll:HelloServiceI': unable to load assembly: Dice
BoxServer.dll"
at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Ice-Build\VC9\Relea
se\cs\src\IceBox\ServiceManagerI.cs:line 726
at IceBox.ServiceManagerI.run() in c:\Ice-Build\VC9\Release\cs\src\IceBox\ServiceManagerI.cs:line 404
Caused by: System.IO.FileNotFoundException: Could not load file or assembly 'DiceBoxServer.dll' or one of its depende
ncies. The system cannot find the file specified.
at IceBox.ServiceManagerI.startService(String service, String entryPoint, String[] args) in c:\Ice-Build\VC9\Relea
se\cs\src\IceBox\ServiceManagerI.cs:line 726

Any help will be greatly appreciated!
Jon

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Do you have a file named DiceBoxServer.dll in the directory where you run iceboxnet.exe? Is the IceBox C# demo from your Ice distribution working fine?

    Cheers,
    Benoit.
  • I have my path set to point to the bin folder for the Ice install, so the exe is not in the same dir as the dll. I run the command from the directory the dll is located in.

    Yes, the demo IceBox server does work, and it is being launched in the same manner.
  • xdm
    xdm La Coruña, Spain
    Hi,
    I have my path set to point to the bin folder for the Ice install, so the exe is not in the same dir as the dll. I run the command from the directory the dll is located in.

    The assemblies that DiceHelloServer.dll depends on also need to be in the same directory of DiceHelloServer.dll.
  • According to .NET Reflector DiceBoxServer.dll has the following dependencies.

    Ice 3.4.1.0 (is in same dir as DiceBoxServer.dll)
    IceBox 3.4.1.0 (is in same dir as DiceBoxServer.dll)
    mscorlib 2.0.0.0 (is in the GAC)
    mscorlib 4.0.0.0 (is in the GAC)
    System 4.0.0.0 (is in the GAC)

    One thing that kinda throws me is the double mscorlib reference...

    I also did another test. This time I used VisualStudio 2008, I followed the same steps, and still get the same exception message.

    Now .NET Reflector shows these references for that version dll.
    Ice 3.4.1.0 (in same dir as dll)
    IceBox 3.4.1.0 (in same dir as dll)
    mscorlib 2.0.0.0 (in GAC)
    System 2.0.0.0 (in GAC)
  • xdm
    xdm La Coruña, Spain
    Hi,

    Can you attach a demo that reproduce the issue, i just did the changes you describe in comment 1 and it worked for me.

    Jose
  • Here you go, this is the VS 2010 project mentioned in my first post.

    Attachment not found.

    I'm also attaching the debug version of my built binary.

    Attachment not found.

    Hope you are able to repro!
  • xdm
    xdm La Coruña, Spain
    Hi,

    The problem is that currently iceboxnet.exe is unable to load .NET 4.0 assemblies, we will provide a fix in next release.

    If you are not using .NET 4.0 features. The easy solution is change Framework Target to 3.5 and it will work.

    If you need to use .NET 4.0, building iceboxnet.exe with VS2010 will probably solve the issue, but i have not tested this yet.

    Thanks for reporting the problem
    Jose
  • Oh, I was unsure which version of the runtime to use, I was unable to locate it in your documentation. And since the docs did say you could use VS2010 (which targets 4.0 by default), I figured that it supported 4.0. And to be quite honest, I have been struggling with the documentation from the get go.

    I switched it over to 3.5 (which I thought I tried before...), and it now loads with no exceptions! Thank you for your help!