473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1378

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Aitchison | last post by:
Hello, I am attempting to have a class that I have written serialize so that it can be both passed as a parameter or return value for a webservice, and also be serialized to disk using the...
7
by: Drew McCormack | last post by:
I have a C++ template class which contains a static variable whose construction registers the class with a map. Something like this: template <typename T> class M { static Registrar<M>...
8
by: Peter Kirk | last post by:
Hi, when I run my c# program I get this error: An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll. Additional information: File or assembly...
1
by: Brian | last post by:
I've looked through the previous posts on this one and have verified permissions and location of my Dlls, but I am still getting an exception when I try to Load an assembly. The directory where...
4
by: Neelesh Bodas | last post by:
Hello all, Is there a way to pass an object of local type to a template? template <class T> int fun(const T& x) { return 1; } int bar() { enum Color { Red, Green, Blue}; Color c;
23
by: mark.moore | last post by:
I know this has been asked before, but I just can't find the answer in the sea of hits... How do you forward declare a class that is *not* paramaterized, but is based on a template class? ...
13
by: Jake Barnes | last post by:
I saw this sentence: "The last stage of variable instantiation is to create named properties of the Variable object that correspond with all the local variables declared within the function." ...
2
by: A.J. Bonnema | last post by:
Hi all, I just started using Python. I used to do some Java programming, so I am not completely blank. I have a small question about how classes get instantiated within other classes. I have...
28
by: cpluslearn | last post by:
Hi, I have a local class inside a function template. I am able to wrap any type in my local class. Is it legal C++? What type of class is Local? Is it a class template or regular class? Thanks...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.