By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,006 Members | 1,238 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,006 IT Pros & Developers. It's quick & easy.

Deploying c# executables that uses dll's.

P: n/a
Back in the Old days, I compile a C++ executable, copy the dll's used by
this executable to the same folder. Go to another computer, copy that folder
locally, double click on the exe file and off we go....

Today, I have a C# .NET executable, I copied the used .NET dll into the same
folder. Went to the other computer copied the folder locally. I double click
on the exe file and a lot of errors that looks like Access violations except
it is caled differently.

The Microsoft slogan is no more dll-hell, but this is for me a real dll
hell. :-(

So the question now is: how can I make the exe install/register/whatever
this dll when it discovers that it is not installed yet.
One sollution is probaly to create a setup project, another is somehow
manually add this dll, but I wish not to bother any users with these
additional steps.

I see a lot of examples for web deployment, on the Internet, but so far
nothing usefull for normal executables.

And also interesting, why does the exe startup code not have an check if the
..NET frame work is installed or net?
Back in the Old days, the exe at least told you that you needed Windows in
order to run this executable (Stub) but the .NET executables today gives
some wierd error like a missing mscoree.dll or something even scary. And it
scares the hell out of me every time I meet another computer that has no
..NET framework installed.

Any tips are welcom. :-)

(I am using C# 2002 version)
Nov 15 '05 #1
Share this Question
Share on Google+
20 Replies


P: n/a
<Ol**********@skyscan.be> wrote:
Back in the Old days, I compile a C++ executable, copy the dll's used by
this executable to the same folder. Go to another computer, copy that folder
locally, double click on the exe file and off we go....

Today, I have a C# .NET executable, I copied the used .NET dll into the same
folder. Went to the other computer copied the folder locally. I double click
on the exe file and a lot of errors that looks like Access violations except
it is caled differently.
And what *exactly* is it saying? Without knowing the answer to that,
it's hard to say what's wrong.
And also interesting, why does the exe startup code not have an check if the
.NET frame work is installed or net?


The way that the file is linked would make that quite tricky, I think.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2

P: n/a
> > Today, I have a C# .NET executable, I copied the used .NET dll into the
same
folder. Went to the other computer copied the folder locally. I double click on the exe file and a lot of errors that looks like Access violations except it is caled differently.


And what *exactly* is it saying? Without knowing the answer to that,
it's hard to say what's wrong.


Here it comes in a message box, I have no clue what goes wrong.
----------
Title: appl-name - Commom Language Runtime Debugging Services
Message: Application has generated an exception that could not be handeled.
Process id=0x3ec (1004), Thread id=0x3a4(932)
Click OK to terminate the application
Click CANCEL to debug the application
----------

The machine is Win2000. On my machine where I develop (win2000) this thing
works perfect.
I believe that it is because he does not find the .NET dll I also created
and distributed.
The odd thing is that this dll is actually at the same location of the exe.
If this was a normal dll and exe
then this would work perfect.

Nothing is wrong in the code since I only start up the form without doing
fancy stuff.
At the very least I should have a form with a menu item, some labels and
some buttons.
But it crashes even before I see any form at all. Mysterie, mysterie,
mysterie...
And also interesting, why does the exe startup code not have an check if the .NET frame work is installed or net?


The way that the file is linked would make that quite tricky, I think.

But far more user friendly.
But someone that starts to execute this program without the .NET installed
will probably panic and call IT.
The last thing I want to do is keep telling people at the phone that they
need to install .NET first and try again.

Nov 15 '05 #3

P: n/a
What do you mean .Net dll, have you installed .Net framework on the target
machine? When making a C# program you just compile the program into a .exe
file. Any dll files that belong to .net framework is installed on the
computer when you install .net framework. No need to include it, but you
do need to have .net framework installed.

Also, C# 2002 uses framework v1.0. I'm not sure if the latest framework
installers also install v1.0 or only v1.1 (2003 version). You may have to
install framework 1.0 (don't worry it won't overwrite anything v1.1).

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 15 '05 #4

P: n/a
<Ol**********@skyscan.be> wrote:
And what *exactly* is it saying? Without knowing the answer to that,
it's hard to say what's wrong.
Here it comes in a message box, I have no clue what goes wrong.
----------
Title: appl-name - Commom Language Runtime Debugging Services
Message: Application has generated an exception that could not be handeled.
Process id=0x3ec (1004), Thread id=0x3a4(932)
Click OK to terminate the application
Click CANCEL to debug the application
----------


Right. That does indeed look nasty. Does it happen on other machines as
well?
The machine is Win2000. On my machine where I develop (win2000) this thing
works perfect.
I believe that it is because he does not find the .NET dll I also created
and distributed.
The odd thing is that this dll is actually at the same location of the exe.
If this was a normal dll and exe then this would work perfect.
It should work fine with .NET as well.
And also interesting, why does the exe startup code not have an check if the .NET frame work is installed or net?


The way that the file is linked would make that quite tricky, I think.

But far more user friendly.
But someone that starts to execute this program without the .NET installed
will probably panic and call IT.
The last thing I want to do is keep telling people at the phone that they
need to install .NET first and try again.


Well, the same was true for Visual Basic apps - you had to have the
right version of the runtime for that, too.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #5

P: n/a
Hi,

<Ol**********@skyscan.be> wrote in message
news:3f***********************@reader0.news.skynet .be...
Back in the Old days, I compile a C++ executable, copy the dll's used by
this executable to the same folder. Go to another computer, copy that folder locally, double click on the exe file and off we go....

Today, I have a C# .NET executable, I copied the used .NET dll into the same folder. Went to the other computer copied the folder locally. I double click on the exe file and a lot of errors that looks like Access violations except it is caled differently.
You need to have the framework installed on that machine, otherwise you will
get an error and the bad part is that it does not say that you need to
install the framework :(

The Microsoft slogan is no more dll-hell, but this is for me a real dll
hell. :-(
I think that you are mixing two different things, dll-hell mean that you can
have several versions of the same dll in the system and that you do not need
to register those dll as you had to do in the non .net era

It has nothing to do with the install of the framework on the computer.
So the question now is: how can I make the exe install/register/whatever
this dll when it discovers that it is not installed yet.
One sollution is probaly to create a setup project, another is somehow
manually add this dll, but I wish not to bother any users with these
additional steps.

I see a lot of examples for web deployment, on the Internet, but so far
nothing usefull for normal executables.


You have to distribute the installer to the users, not the copy of the
directory, if you do a search in google you will find a lot of post saying
how to do that,
take a look at this link:
http://msdn.microsoft.com/library/de...otnetfxexe.asp
One thing I have to agree with you, and I really hope they improve it in the
next version and is that it should exist an option in the setup project
template to check for the framework. now you have to check it manually , as
well as checking the correct version of mdac. ( this you also need to have
in account )
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Nov 15 '05 #6

P: n/a
It is my first .NET program that I want to install on a different machine.
It works perfect on my machine. And it worked perfect on other machines
before I used this new dll I created.
installers also install v1.0 or only v1.1 (2003 version). You may have to
install framework 1.0 (don't worry it won't overwrite anything v1.1).
The complete .NET framework was instaled before I started to test.
So that is not the problem.
What do you mean .Net dll, have you installed .Net framework on the target
machine? When making a C# program you just compile the program into a ..exe file. Any dll files that belong to .net framework is installed on the
computer when you install .net framework. No need to include it, but you
do need to have .net framework installed.


I was refering to Some.dll that I created in C++ as managed code dll to be
used in my C# .NET program.
It works fine on my machine. But I compiled both the dll and the exe code.

One problem seems to be the "Test.exe.config" file that was missing in my
setup project.
It would have been nice if I had some messagebox saying that he failed to
locate some configuration file.

I already lost half my hair today. ;-)
Nov 15 '05 #7

P: n/a
> > > And what *exactly* is it saying? Without knowing the answer to that,
it's hard to say what's wrong.
Here it comes in a message box, I have no clue what goes wrong.
----------
Title: appl-name - Commom Language Runtime Debugging Services
Message: Application has generated an exception that could not be handeled. Process id=0x3ec (1004), Thread id=0x3a4(932)
Click OK to terminate the application
Click CANCEL to debug the application
----------


Right. That does indeed look nasty. Does it happen on other machines as
well?


Yes, XP and Win2000.

So I am now busy trying to create a setup that also installs this dll and
..config file.
But when I install on the other computers using this setup then I get this
new error.

****************************
----------------------------------
************** Exception Text **************
System.IO.FileNotFoundException: File or assembly name SkyscanLibBase, or
one of its dependencies, was not found.
File name: "SkyscanLibBase"
at ctRepair.Form1.LoadDatasetInformation()
at ctRepair.Form1.menuItem2_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

=== Pre-bind state information ===
LOG: DisplayName = SkyscanLibBase, Version=1.0.1354.27798, Culture=neutral,
PublicKeyToken=83aac2de47135ecf
(Fully-specified)
LOG: Appbase = C:\Program Files\Skyscan\Tools\CtRepair\
LOG: Initial PrivatePath = NULL
Calling assembly : ctRepair, Version=1.0.1355.22235, Culture=neutral,
PublicKeyToken=83aac2de47135ecf.
===

LOG: Safe mode is set (applyPublisherPolicy=no).
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\ machine.config.
LOG: Post-policy reference: SkyscanLibBase, Version=1.0.1354.27798,
Culture=neutral, PublicKeyToken=83aac2de47135ecf
LOG: Attempting download of new URL file:///C:/Program
Files/Skyscan/Tools/CtRepair/SkyscanLibBase.DLL.
-------------------------------------
****************************

The odd thing is that on "file:///C:/Program
Files/Skyscan/Tools/CtRepair/SkyscanLibBase.DLL" the dll exists.
SkyscanLibBase.dll is the real name of the used dll.

I am probably doing something wrong, the question is what.
The dll is clearly not registered in this .NET framework, but why?
It should work fine with .NET as well.

In theorie: yes. ;-)

PS: I call this dll-hell since it is a dll and I have a hell of a time. ;-)
Anyway, I have at least a lot of fun, trying to install a simple .NET
program.
I hope these issues will get resolved by the time I have a commercial
release version.

Nov 15 '05 #8

P: n/a
<Ol**********@skyscan.be> wrote:

<snip>
LOG: DisplayName = SkyscanLibBase, Version=1.0.1354.27798, Culture=neutral,
PublicKeyToken=83aac2de47135ecf
(Fully-specified)
LOG: Appbase = C:\Program Files\Skyscan\Tools\CtRepair\
LOG: Initial PrivatePath = NULL
Calling assembly : ctRepair, Version=1.0.1355.22235, Culture=neutral,
PublicKeyToken=83aac2de47135ecf.


Those version numbers look like they may well be the problem. If you've
got fully-qualified version numbers, it may be looking for the exact
same version, and failing to find it.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #9

P: n/a
> > LOG: DisplayName = SkyscanLibBase, Version=1.0.1354.27798,
Culture=neutral,
PublicKeyToken=83aac2de47135ecf
(Fully-specified)
LOG: Appbase = C:\Program Files\Skyscan\Tools\CtRepair\
LOG: Initial PrivatePath = NULL
Calling assembly : ctRepair, Version=1.0.1355.22235, Culture=neutral,
PublicKeyToken=83aac2de47135ecf.


Those version numbers look like they may well be the problem. If you've
got fully-qualified version numbers, it may be looking for the exact
same version, and failing to find it.


I think that you have pointed me to the correct direction. :-)
I am checking this out right now.

thanks. :-)
Nov 15 '05 #10

P: n/a

"Morten Wennevik" <mo************@hotmail.com> wrote in message
news:oprvm9qcj9ge0n9a@localhost...
What do you mean .Net dll, have you installed .Net framework on the target
machine? When making a C# program you just compile the program into a ..exe file. Any dll files that belong to .net framework is installed on the
computer when you install .net framework. No need to include it, but you
do need to have .net framework installed.
I think he's referring to a custom DLL that he developed in C# that his
application depends on. However, it sounds like it should work as is. DLLs
in the application directory are found automatically. I bet the culprit is
an incorrect version of the framework.
Also, C# 2002 uses framework v1.0. I'm not sure if the latest framework
installers also install v1.0 or only v1.1 (2003 version). You may have to
install framework 1.0 (don't worry it won't overwrite anything v1.1).


I'm pretty sure they are seperate installations
Nov 15 '05 #11

P: n/a
> I think he's referring to a custom DLL that he developed in C# that his
application depends on. However, it sounds like it should work as is. DLLs
in the application directory are found automatically. I bet the culprit is
an incorrect version of the framework.

Also, C# 2002 uses framework v1.0. I'm not sure if the latest framework
installers also install v1.0 or only v1.1 (2003 version). You may have to install framework 1.0 (don't worry it won't overwrite anything v1.1).


I'm pretty sure they are seperate installations

I just did install 1.0, but no solution.

I also checked these versions, but

SkyscanLibBase, Version=1.0.1354.27798
ctRepair, Version=1.0.1355.22235

But I do not think that these versions have anything to do with the problem.
If I understand the version numbers correctly then ctRepair has
Version=1.0.1355.22235 and expects SkyscanLibBase with
Version=1.0.1354.27798

My ctRepair assembly file these settings

[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("..\\..\\Skyscan.snk")]
[assembly: AssemblyKeyName("")]

Today I give up.
Maybe some time in te future I wish to try again.
One thing that I might do is to move to C# v2003 to see if this corrects the
problem.

Thanks all for the feed-back. :-)

Nov 15 '05 #12

P: n/a
<Ol**********@skyscan.be> wrote:
I just did install 1.0, but no solution.

I also checked these versions, but

SkyscanLibBase, Version=1.0.1354.27798
ctRepair, Version=1.0.1355.22235

But I do not think that these versions have anything to do with the problem.
If I understand the version numbers correctly then ctRepair has
Version=1.0.1355.22235 and expects SkyscanLibBase with
Version=1.0.1354.27798


Look at ctRepair with ildasm - in the manifest it should say which
version it's expecting.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #13

P: n/a
> > SkyscanLibBase, Version=1.0.1354.27798
ctRepair, Version=1.0.1355.22235

But I do not think that these versions have anything to do with the problem. If I understand the version numbers correctly then ctRepair has
Version=1.0.1355.22235 and expects SkyscanLibBase with
Version=1.0.1354.27798


Look at ctRepair with ildasm - in the manifest it should say which
version it's expecting.

I checked at my home computer and there it installed without troubles.
When I copied the folder and the execute ctRepair (before using any
installer) then the program started up without problems, but gave an error
once I used a function found in this SkyscanLibBase.dll.

Then I installed the software using the installer and it worked perfectt!
The dll was known.

So far I can tell that computers that have VC++ .NET installed have no
problems to run the program, but computers that never had VC++ .NET
installed have this big problem not finding the dll.
One thing comes to mind is that the DLL build in VC++ 2002, is build with
MFC as dll, not static.
Could this be the cause of it? And where can I find this mfc dll? Up untill
now I always used static linking of mfc.
But in order to build the .NET managed dll, I had to build with mfc in a
dynamic library.

Thanks for any feed-back. :-)
Olaf
Nov 15 '05 #14

P: n/a
> So far I can tell that computers that have VC++ .NET installed have no
problems to run the program, but computers that never had VC++ .NET
installed have this big problem not finding the dll.
One thing comes to mind is that the DLL build in VC++ 2002, is build with
MFC as dll, not static.
Could this be the cause of it? And where can I find this mfc dll? Up untill now I always used static linking of mfc.
But in order to build the .NET managed dll, I had to build with mfc in a
dynamic library.

Just checked, it appears that the .NET framework 1.0 comes with MFC 70
installed
and the 1.1 comes with MFC71 installed. So back to the drawingboard. :-(

Today I give up searching to solve this problem. Maybe some other time.

(I love the .NET framweork though)
Nov 15 '05 #15

P: n/a
Is this library a .NET assembly, or are you accessing it via pinvoke or com
interop?
<Ol**********@skyscan.be> wrote in message
news:3f***********************@reader1.news.skynet .be...
SkyscanLibBase, Version=1.0.1354.27798
ctRepair, Version=1.0.1355.22235

But I do not think that these versions have anything to do with the problem. If I understand the version numbers correctly then ctRepair has
Version=1.0.1355.22235 and expects SkyscanLibBase with
Version=1.0.1354.27798
Look at ctRepair with ildasm - in the manifest it should say which
version it's expecting.

I checked at my home computer and there it installed without troubles.
When I copied the folder and the execute ctRepair (before using any
installer) then the program started up without problems, but gave an error
once I used a function found in this SkyscanLibBase.dll.

Then I installed the software using the installer and it worked perfectt!
The dll was known.

So far I can tell that computers that have VC++ .NET installed have no
problems to run the program, but computers that never had VC++ .NET
installed have this big problem not finding the dll.
One thing comes to mind is that the DLL build in VC++ 2002, is build with
MFC as dll, not static.
Could this be the cause of it? And where can I find this mfc dll? Up untill now I always used static linking of mfc.
But in order to build the .NET managed dll, I had to build with mfc in a
dynamic library.

Thanks for any feed-back. :-)
Olaf

Nov 15 '05 #16

P: n/a
> Is this library a .NET assembly, or are you accessing it via pinvoke or
com
interop?


First of all, this is all new for me, so maybe I make mistakes.
But anyway, the installation should be straight forward for simmple users.

The dll is a is a VC++ 2002 managed class wrapper from unmanaged VC++ 2002
code.
The program that uses this dll is pure C#.

50% of our computers have no problem with the installation, the other 50%
refuses to find the dll.
Strange. The program starts up, but the very moment that I call one of the
dll functions I am in trouble.
I would compare this with the "undefined dynamic link error" you might have
with old style dll

I stop searching for the problem here, there are more important things to do
right now.
Maybe some othe time I will find the cause.

Thanks for any feed-back.
Olaf

Nov 15 '05 #17

P: n/a
Ok, ok, I wanted to stop searching, but this part of the .NET exception
seems to be interesting:
The location of SkyscanLibBase.DLL is exactly at this position that the
"LOG: Attempting download of new URL" is pointing too.
So why does he not recognize this dll as the correct dll?

-------
LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\ machine.config.
LOG: Post-policy reference: SkyscanLibBase, Version=1.0.1354.27798,
Culture=neutral, PublicKeyToken=83aac2de47135ecf
LOG: Attempting download of new URL file:///C:/Program
Files/Skyscan/Tools/CtRepair/SkyscanLibBase.DLL.
-------

50% of the computers finds this dll, the other 50% refuses. There seems not
to be any pattern, (e.g. virus scanner, FAT32, NTFS, VC++ installed, VC++
not installed, NET 1.0 installed). In all cases, after the setup installs
the software, the program gets started, I see the form.

And we are talking about a pure VC# 2002 compiled application here.
Also the setup is created with the VC# 2002. .

<Complete log file below>
********************************
********************************
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: File or assembly name SkyscanLibBase, or
one of its dependencies, was not found.
File name: "SkyscanLibBase"
at ctRepair.Form1.LoadDatasetInformation()
at ctRepair.Form1.menuItem2_Click(Object sender, EventArgs e)
at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
at System.Windows.Forms.MenuItemData.Execute()
at System.Windows.Forms.Command.Invoke()
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage (Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(M essage& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

=== Pre-bind state information ===
LOG: DisplayName = SkyscanLibBase, Version=1.0.1354.27798, Culture=neutral,
PublicKeyToken=83aac2de47135ecf
(Fully-specified)
LOG: Appbase = C:\Program Files\Skyscan\Tools\CtRepair\
LOG: Initial PrivatePath = NULL
Calling assembly : ctRepair, Version=1.0.1356.20065, Culture=neutral,
PublicKeyToken=83aac2de47135ecf.
===

LOG: Publisher policy file is not found.
LOG: Host configuration file not found.
LOG: Using machine configuration file from
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\ machine.config.
LOG: Post-policy reference: SkyscanLibBase, Version=1.0.1354.27798,
Culture=neutral, PublicKeyToken=83aac2de47135ecf
LOG: Attempting download of new URL file:///C:/Program
Files/Skyscan/Tools/CtRepair/SkyscanLibBase.DLL.

************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
ctRepair
Assembly Version: 1.0.1356.20065
Win32 Version: 1.0.1356.20065
CodeBase: file:///C:/Program%20Files/Skyscan/Tools/CtRepair/ctRepair.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.


Nov 15 '05 #18

P: n/a
> Back in the Old days, I compile a C++ executable, copy the dll's used by
this executable to the same folder. Go to another computer, copy that
folder locally, double click on the exe file and off we go....

Today, I have a C# .NET executable, I copied the used .NET dll into the
same folder. Went to the other computer copied the folder locally. I doubleclick on the exe file and a lot of errors that looks like Access violations
except it is caled differently.


I still have this problem when I try to deploy a .NET application that uses
dll's.

When I compile one exe then no big problems, but when the project consist of
multiple .NET dll files then on 50% of the machines I test, I get an error
like this or something similar.

http://www.obaeyens.com/Skyscan/DOTN...ntProblem1.htm

Any idea's how to discover why this happens so that I can fix he problem?
Nov 15 '05 #19

P: n/a
> When I compile one exe then no big problems, but when the project consist
of
multiple .NET dll files then on 50% of the machines I test, I get an error
like this or something similar.

http://www.obaeyens.com/Skyscan/DOTN...ntProblem1.htm

Any idea's how to discover why this happens so that I can fix he problem?


I recently discovered something that might explain the problems.
I appear to have 2 problems:

* I am missing a .config file that contains information about the used
dll's.
* I cannot run the code from a network driver directly, when I copy it to a
local folder then it just works.

This config file can be created using a mmc plugin, or can be done by hand.

The big questions are now:
* How to I configure this to run from a network drive.
* Do I need these in the config file?: mscorlib, System.Drawing,
System.Windows.Forms, System, System.Runtime.Serialization.Formatters.Soap,
Accessibility" publicKeyToken...
<?xml version="1.0"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Win32" publicKeyToken="83aac2de47135ecf" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SkyscanLibBase"
publicKeyToken="83aac2de47135ecf" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SkyscanVisBase"
publicKeyToken="83aac2de47135ecf" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.VisualC"
publicKeyToken="b03f5f7f11d50a3a" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Forms"
publicKeyToken="b77a5c561934e089" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Drawing"
publicKeyToken="b03f5f7f11d50a3a" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="mscorlib" publicKeyToken="b77a5c561934e089"
/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System" publicKeyToken="b77a5c561934e089" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity
name="System.Runtime.Serialization.Formatters.Soap "
publicKeyToken="b03f5f7f11d50a3a" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Accessibility"
publicKeyToken="b03f5f7f11d50a3a" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Nov 15 '05 #20

P: n/a
> >When I compile one exe then no big problems, but when the project consist
of multiple .NET dll files then on 50% of the machines I test, I get an error like this or something similar.

http://www.obaeyens.com/Skyscan/DOTN...ntProblem1.htm

Any idea's how to discover why this happens so that I can fix he
problem?
I recently discovered something that might explain the problems.
I appear to have 2 problems:

* I am missing a .config file that contains information about the used
dll's.

* I cannot run the code from a network driver directly, when I copy it to a local folder then it just works.


And a 3rd problem thing was some missing VC++ 2002 dll's.
--> mfc70.dll, msvcp70.dll and msvcr70.dll

One of the dll's I used was a VC++ 2002 dll that contains a mixture of
managed and unmanaged code.
In order to let this thing compile, I had to use the dynamic loaded MFC
dll's.

It would be nice if the JIT compile somehow tells me that some dl's are
missing in order to execute this program.
The error I got so far did not help me in any way to find these simple
sollutions.
In fact it added more to the confusion and took longer to find the
sollutions.
Nov 15 '05 #21

This discussion thread is closed

Replies have been disabled for this discussion.