Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2006

Tip: Looking for answers? Try searching our database.

app won't run after adding an empty class

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave Calkins - 20 Nov 2006 14:59 GMT
I'm wriiting an MFC C++ application which uses a third party C# .NET API via
a DLL.  The app runs fine.  If I add a new, empty C++ class, and compile/link
it refuses to run, complaining about not being able to load an assembly.  
Removing the class from the project and doing a rebuild all gets it working
again.  Its as though I've hit a threshold?  Any ideas?

- I'm using Visual Studio 2005
- Although my code is MFC native C++, the third party API DLL uses .NET and
their code is written in C#; my app has the /clr flag enabled
- Since it runs before adding the new class, I don't think its a
config/settings issue; the new class isn't even used, its just added to the
project and is an empty class with only a constructor/destructor
- in the past we've had similar issues which required using the delay load
DLL options; I tried listing the third party API DLL and the DLLs it uses as
delay loaded and this didn't help
- I also setup DEVPATH to point to my project directory where the exe and
DLLs are

I don't know, but suspect that I've hit some sort of threshold which is
preventing load/initialization from working.  The project isn't all that
large.  I've tried adding a dialog class, an empty C++ class, and a C++ class
with some code in it.

Note that the failure to initialize occurs before the app code even runs,
i.e. its in the lower level startup code and complains that it can't load a
needed assembly.

Any ideas?
Oleg Starodumov - 21 Nov 2006 07:43 GMT
> I'm wriiting an MFC C++ application which uses a third party C# .NET API via
> a DLL.  The app runs fine.  If I add a new, empty C++ class, and compile/link
> it refuses to run, complaining about not being able to load an assembly.
> Removing the class from the project and doing a rebuild all gets it working
> again.  Its as though I've hit a threshold?  Any ideas?

Which assembly could not be loaded?
Have you tried Fusion log to see why it could not be loaded?

http://www.grimes.demon.co.uk/workshops/fusWSFive.htm

--
Oleg
[VC++ MVP http://www.debuginfo.com/]
David Lowndes - 21 Nov 2006 07:50 GMT
>I'm wriiting an MFC C++ application which uses a third party C# .NET API via
>a DLL.  The app runs fine.  If I add a new, empty C++ class, and compile/link
>it refuses to run, complaining about not being able to load an assembly.

What's the exact error message you get?
Do you get any more information if you try to debug it in the IDE
(output window)?

It seems so unlikely that adding/removing an empty class that's not
being used would make any difference - are you telling us the whole
story?

Dave

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.