469,613 Members | 1,354 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

FileNotFoundException on local class instantiation

Hi, I am running VS .Net 2005.
I have an application in which one of the classes are having a member that
is an instance of a class defined in a managed C++ dll. As soon as I try to
create an instance of the local class I get a FileNotFoundException not
telling much more than the file cannot be found.
I have made the below code that reproduces this behaviour. What I don't
understand is that the debugger is reporting that the FileNotFoundException
was unhandled and it marks it to be at the Test() call (marked by comment
below).
If I remove the CmmSuperLog instantiation it gives no error.
I do have a reference to the Managed C++ dll in the project and intellisense
works fine while coding.
Anyone have any suggestions?
Best regards,
Peter

using System;
using System.Collections.Generic;
using System.Text;
using SuperLog;
using System.IO;

namespace ConsoleApplication2
{
class Program
{
public static void Test()
{
try
{
CmmSuperLog log = new CmmSuperLog("TESTING");
}
catch (FileNotFoundException e)
{
Console.WriteLine("oops");
}
}

static void Main(string[] args)
{
Test(); // <-- the debugger tells me that this is where the unhandled
FileNotFoundException is
}
}
}
Apr 12 '06 #1
0 1222

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Chris Aitchison | last post: by
7 posts views Thread by Drew McCormack | last post: by
8 posts views Thread by Peter Kirk | last post: by
4 posts views Thread by Neelesh Bodas | last post: by
23 posts views Thread by mark.moore | last post: by
2 posts views Thread by A.J. Bonnema | last post: by
28 posts views Thread by cpluslearn | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.