all groups > dotnet clr > july 2006 >
You're in the

dotnet clr

group:

MFC exe Crashes with /clr option


MFC exe Crashes with /clr option Jacquie
7/14/2006 10:50:52 AM
dotnet clr:
I have a MFC app that was developed with VC++ 2003 7.1 . I have now
upgraded to VC++ 2005 8.0. Eventually I plan on using a Windows Form
Control and hosting it on existing dialog.

1) First I compiled the project in 2005 and fixed a few errors and am
able to compile/run with seemingly no problems

2) I turned on the /clr option and fixed what ever problems and now am
able to compile with no errors

2a) now when I run I get a crash. My project settings are:

<Tool
Name="VCCLCompilerTool"
Optimization="0"

AdditionalIncludeDirectories="&quot;$(SolutionDir)\common\include&quot;;&quot;$(SolutionDir)\DataRecorder&quot;;&quot;$(BOOST_INC_MSVC)&quot;"
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_SCL_SECURE_NO_DEPRECATE;"
GeneratePreprocessedFile="0"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
RuntimeTypeInfo="true"
UsePrecompiledHeader="1"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Debug/pdr2.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
BrowseInformation="1"
WarningLevel="4"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>


The error from the crash is:

First-chance exception at 0x7c81eb33 in Data Recorder.exe: Microsoft
C++ exception: [rethrow] at memory location 0x00000000

An unhandled exception of type 'System.IO.FileLoadException' occurred
in Unknown Module.

Additional information: Could not load file or assembly 'Data Recorder,
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its
dependencies. Failed to grant minimum permission requests. (Exception
from HRESULT: 0x80131417)



I have tried placing try/catch blocks around the CWinApp::InitInstance,
CWinApp::InitApplication, and CWinApp::Run and I don't think the
program ever reaches any of these functions.

If anyone can help me, please do.
Thanks in advance for the help.
Re: MFC exe Crashes with /clr option Jacqui
7/14/2006 11:09:32 AM
I forgot to mention that my MFC app is located on a remote computer
(intranet) and I'm running it from my computer.


[quoted text, click to view]
AddThis Social Bookmark Button