Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectoryNotFoundException when running on UNC path #140

Open
mitbra opened this issue Jul 2, 2013 · 1 comment
Open

DirectoryNotFoundException when running on UNC path #140

mitbra opened this issue Jul 2, 2013 · 1 comment

Comments

@mitbra
Copy link

mitbra commented Jul 2, 2013

I've encountered a strange problem with running my application on a shared network drive where the application makes use of clrzmq.

Context

clrzmq pre-release 3.0.0-rc1 -- from NuGet.
libzmq version 3.2.2-rc2 bundled with clrzmq.
Windows 7 Professional 64-bit SP1.
.NET Framework 4.5
VS2012 WDExpress

Problem

The following code snippet draws out my exception:

namespace ConsoleApplication2
{
    using System;
    using ZeroMQ;

    class Program
    {
        static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += 
                Unhandled;

            var ctx = ZmqContext.Create(); // This is where it occurs
            Console.ReadKey();
        }

        static void Unhandled(
            object sender, UnhandledExceptionEventArgs e)
        {
            Console.WriteLine(e.ExceptionObject.ToString());
            Console.ReadKey();
        }
    }
}

To make it happen you will need the application to be on a UNC path. In my case it was \\myserver\subdirectory . If I attempt to run the executable like this I get the following exception.

\\myserver\subdirectory>.\bin\Testing\ConsoleApplication2.exe
System.TypeInitializationException: The type initializer for 'ZeroMQ.Interop.LibZmq' threw an exception. ---> System.IO.DirectoryNotFoundException: Could not find...

The exception message claims to be looking in a path that is not valid: \\myserver\subdirectory\subdirectory\bin\Testing\libzmq-x86-3.0.0.0.dll. Note the doubling of subdirectory.

The application works when using a drive letter -- for example: F:\bin\Testing.

Is this to do with the packaging of the binaries or something completely unrelated to this project?

@leticiativeronbt
Copy link

I'm having the same problem.
Version clrzmq.dll : 3.0.12310.0
Any news on this?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants