473,396 Members | 1,918 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.

Deploying c# executables that uses dll's.

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
20 6132
<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
> > 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
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
<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
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
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
> > > 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
<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
> > 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

"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
> 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
<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
> > 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
> 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
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
> 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
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
> 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
> 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
> >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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Shashank Date | last post by:
VB Gurus, I have developed a VB 6.0 application on WIN XP Pro which I am trying to deploy on another machine on the network which is running Win 2000 Pro. I am using the "Package & Deployment...
0
by: Tomas Vera | last post by:
Hello All, I've developed a Commerce Server application and am having deployment problems. The issue is not Commerce Server specific, so I'll ask here, since questions get answered here. The...
4
by: Ben | last post by:
Hi, I have a project that uses the c runtime libraries a bit of opengl and nothing else. If I build the .exe for release using Visual Studio 6 I can copy the .exe onto Win98,NT and 2K/XP and run...
10
by: Gerben van Loon | last post by:
Hi there, hope someone can help me on this: I'm planning to deploy several ASP.NET projects to a production server. Normally I used the "Project / Copy project" option in VS.NET, but to this...
2
by: Kenneth Jonsson | last post by:
I have an COM server in an assembly. When it is deployed on a target computer it needs to be registred with RegAsm. I created a custom action in the deploy project, starting RegAsm with the...
0
by: Dave | last post by:
Hello The application I'm building an installer for uses dlls which were developed originally in C. Since the application itself is developed in C#, these dlls were wrapped using SWIG....
11
by: moondaddy | last post by:
I have a .net 2.0 smarclient app and am trying to deploy it to IIS where users can access it from. I created an application folder in IIS where I'm trying to deployee to. 1) When the...
3
by: Boris | last post by:
We have a native Windows DLL (let's call it native.dll) we developed a .NET interface for (let's say managed.dll). When a .NET application now uses the ..NET interface to talk to the Windows DLL we...
5
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
Using VS2005: We have created custom class projects that output to DLL files. In our App, we add these to the list of Solution References and include them in the code. When the App...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.