Error in running built programs on other drives

Hi everyone,

I am using Visual basic .NET 2005 express beta. I can build a project and then run the exe file in the same location as the installed VB but if I copy it to other drives in a server then I cannot run it there.

Does anyone have ideas to fix this?

Cheers

[271 byte] By [N2H] at [2008-3-1]
# 1
1. Have you installed the .NET framework on the machines where you're trying to run your exe ?
2. Have you copied any dlls, etc that exist in the directory with your exe, and which your app may require ?
cgraus at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 2
Thanks for your reply.

I have checked my computer and see the Microsoft .NET framework 2 Beta 2 and Microsoft .NET framework 1.1 installed.

I thought that when we build projects to executable files, we can run it independently in any computers so I didnt copy other files with it (I am quite new to VB.NET version so I may be wrong). But the only one dll file in that project I can find is My Project.Resources.Designer.vb.dll but the exe file is still not working.

Any other reasons for that? Thanks

N2H at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 3
we can run it independently in any computers
No - if you import any dlls you need to include them, you may also need the .config file, and you certainly need the .NET framework that you compiled against to be on the target machine.

How are you running it - are you copying it to a network share and then trying to run from there on your dev machine ? Or are you copying to another machine and trying to run it from there ? And what's the error ?


cgraus at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 4

Hi,

I downloaded VB.NET, installed it once in my computer and I use it till now so I think I may not install additional services or other supports other than it.

I copy the exe file into from my computer drive to others in my company server and try to run from my computer or from other computer on the server. It all cannot run. The error massage is not specific to VB as follows:

Conductorblowout (my program name) has encountered a problems and needs to be close. We are sorry for the inconvenience. and then something telling to send a report to Microsoft.

I think in the server, there is no .NET framework installed. Is that also part of the reason?

I am just a layman in IT and quite new to .NET version but I usually write small programs to make our job faster and easier. I'd like to build projects to exe files so that other people can run it from other computers or at home so what should I do?

Cheers

N2H at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 5
Hi, I believe your only problem is to authorize the assembly to be run from a remote storage.
For security reason .NET is enabled only to run assemblies from local location, you copied the file to a shared drive and this is not safe, by default.

Please try run '.NET Wizards' from 'Administrative Tool' group and run 'Trust and Assemply': a wizard will popup, you have just to complete it (I used it a few motnh ago, but I remember it was very easy) and I guess your software will then work.

Ciao

Luca

LucaMauri at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 6

LucaMauri wrote:

Please try run '.NET Wizards' from 'Administrative Tool' group and run 'Trust and Assemply': a wizard will popup, you have just to complete it (I used it a few motnh ago, but I remember it was very easy) and I guess your software will then work.

I believe I have the same problem. I can run my program locally, but if I copy it to a server, and try to run it via a shortcut on another PC, it does not even load.

Both PCs in question have .net 2 installed.

I have found the .net wizards Luca refers to, but I um unsure what to do with them. When I click on "Trust an Assembly", I select make changes to this computer, and then I am prompted for an assembly path. When I enter the path to my exe file, and hit next it reports "Unable to load assembly S:\Applications..."

Where am I going wrong?

Zustiur.

Zustiur at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...