Microsoft Visual Studio 2005 (Vb.net) - vb.net

I'm doing my project in Vb.net. my project name is "Bellows". My front end is Vb.net. Back end is Ms Access.
i Create My project in Windows Application
i complete my project. i copy the .exe file from "E:\BellowNet(new)\Bellows\obj\Debug" and put the shortcut into my desktop. now it's running.
similarly i copied my Bellows.exe from another system desktop but it not running.
How i want to run my Bellows.exe from another systems (maximum 10 systems).
Note : In my system only having Microsoft Visual Studio 2005. Remaining system doesn't have.
I put bellows.exe from another system. in that system doesn't having E Drive. it showing this error
The application Filed to initialize properly(0xc0000135). Click Ok to terminate the application
Similarly I put bellows.exe from another system. in that system having E Drive.
if i click that Bellows.exe the login form is open.. and main form is open. in that main form wen i click button it show the error.
Unhandled exception has occurred in your application. If u click continue the application will ignore this error and attempt to continue. If u click Quit, the application will close immediately. Could not load file or assembly ‘ADODB, Version=7.0.3300.0, Culture=neutral, PublickeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified

Good practice to run your project on another systems is to create its setup file and then install it on to another systems on which you want to run your project and of course you need to install .NetFramework as well with the same version which you used to developed your project. How to create setup and how to add Serial Key for those steps refer my blog

It sounds like either the .Net Framework is not installed on your target system or that there's an app.config file (Bellows.app.config) that you need to copy over as well.
Another thing that concerns me is what your expectations are for the access database. Do you want all the workstations to share a common database? If so, I highly recommend you convert your app to use Sql Server Express Edition (free). Access is an in-process database engine, and like all such engines it doesn't behave well when shared. If you don't expect them to share the database, you probably want to make sure you copy that *.mdb file over to your target machines as well.
Finally, let me re-iterate the advice in other answers about using a Release build and/or deployment project.

What errors do you see?
It could be:
The other system does not have .Net
framework 2.0 installed
You copied only the exe from the dev machine without other required files from the Debug directory (e.g., app.config, supporting DLLs).

If you are going to copy and paste the exe file then the all Prerequiest should be installed on that machine like framework.So make a setup file which is easy and add all Prerequiest on the setup after that do setup on new machine..
Thanks

I can only guess, but try this suggestions.
The application Filed to initialize
properly(0xc0000135). Click Ok to
terminate the application
.NET framework is not installed on this machine. Install the runtime.
Could not load file or
assembly ‘ADODB, Version=7.0.3300.0,
Culture=neutral,
PublickeyToken=b03f5f7f11d50a3a’ or
one of its dependencies. The system
cannot find the file specified
ADO.NET drivers are missing. You need to install Microsoft Data Access Components
You can avoid this problems if you make an install procedure and do the proper install on every machine.

The appropriate .NET framework must be installed in each machine as well as the appropriate MDAC. You can add them as part of the installation package.
http://msdn.microsoft.com/en-us/library/ms994427.aspx
And if you want to make it even more easier for your clients to get hold of it; use ClickOnce to distribute it from a central server.
http://www.15seconds.com/issue/041229.htm

Related

WPF Desktop Application with MDF used locally for all local users

I am using Visual Studio 2013. I have all components installed on my machine needed to run this application I am questioning. I have not completed the application to deploy for testing but some questions arose before completion that I need addressed now; to prevent overhauling later.
Here's how it should work when deployed to clients.
Client installs application which runs on desktop not windows store in WPF.
The application is per user and runs for all users on the local machine.
Each user needs to read and write data to a database file but it needs to be the same MDF being used. Therefore each process of the application, no matter the user session, on the same machine, all interact with the same database / same data.
Question: When adding the database to the project where will it be installed by default? In the applications program folder along with program? If so what restrictions exist to read/write to the database and are there any? I have added no extra security on my side. The info isn't private or critical.
Question: Would end users need to install any sort of SQL in order for the application to do this? If so I can package it with the install but this seems like alot of overhead during install.
If the MDF is installed per user how do I change this to install it once for all users?
Before saying so, yes this needs to be a database and not a file. Reasons I need not describe. I have considered alternative but this is by far the best solution so please no alternatives.
When you add mdf file to your project and set properly the value of Copy to Output Directory, it will be copied to the bin directory of your project whenever you build the project. When you create setup project for your app project, it will be by default copied to the folder where your app is installed. You can either specify different location in your setup project or copy the file to the desired location during the first run of your app.
There are several suitable folders in Windows, one possible choice is %PROGRAMDATA% C:\ProgramData folder, but it is by default read only for non-admin users. If you do not worry about security, go for %PUBLIC% C:\Users\Public. It is completely accessible for all users within interactive group.
I recommend to package LocalDB with your project. It can be installed silently with one line of code, though only with admin privileges. For non-admin click-once install you would have to use SQL CE, which is quite different and uses sdf files.
I think you should do it this way: include a seed database MDF file in the application and copy it to a %PUBLIC%\YourApp folder when the application first launches. Optionally include LocalDB install in your setup project.

Publish vs. Release

I created a simple application in VB.net in Visual Studio 2013.
It's not a website or a web app, it's just a simple Calculator, I think I created it as a Windows Forms Application.
When I build the application in release mode, it builds and runs properly.
It puts the executable it built in: Documents\Visual Studio 2013\Projects\DataCalculator\DataCalculator\bin\Release
I can just send that executable alone to someone and the program works fine. So what is the purpose of all the other files?
Furthermore, there is a Publish button in the Build menu of VS2013. What does publishing the program do that the the release doesn't?
Also, when I click the publish button it asks me how the user will install the application. What if I don't want them to install it, I just want it to run from a simple click of the executable. So what is the purpose of publishing?
If by "all the other files" you mean .application, .manifest, .pdb, etc., they all have uses in various contexts. If your calculator is stand-alone, then it will only require the .NET Framework version you used to create it installed and the .exe itself.
I have used the Publish feature a few times - at a previous company - it's useful for 'transparent updates' to users. For example, the tools I created were published to a shared drive on the server along with the associated "other files". The users then installed the tool from the shared drive by clicking on the setup/install version, which creates a shortcut on their start menu/desktop/wherever. The beauty of this particular method, is that you can configure the application to automatically update when it is run; so I continuously improved the tools and every time a user ran one, it copied the newer exe to their PC and ran that, without any further updates/reinstalls from their perspective.
It worked quite well for small engineering tools, but I'm sure with larger/more complex applications with databases and backward-compatibility to worry about, it could cause headaches in many situations.
Release will only create an .EXE Application file which is executable in supported platforms, but database must be separately copied . where as publish will create a setup file along with database and the sub folders inside the project folder. It helps you to install your application in any computer which meets the requirements.
Click to refer Advantages and procedure for publish http://msdn.microsoft.com/en-us/library/vstudio/ms233806(v=vs.100).aspx

Deploying Smart Device Project into SD Card

Greeting,
I'm having difficulty deploying my Smart Device Project into the SD Card of my MC2180. My application uses Microsoft SQL Server Compact Edition v3.5, and it need to be deploy on a WinCE 6.0 device (MC2180).
Now the problem is :
1) If I do a normal deploy to my device, I can set it deploy the "Application" in my SD Card, BUT the SQL still install in my Program Files, by any chance if the device got a reset my "Application" won't work anymore because SQL is not there.
2) I can create a CAB File, BUT I don't know how to include my SQL installer.
What I want is to make a CAB that can install everything nicely, OR, make the program portable :)
Please advice what can I do :) I'm using Visual Studio 2008.
Regards,
Milo
You may try to extract and repackage files in the SQL compact cab, but this may be clumsy and still have some issues if those file must be placed in the Windows folder to be found from the loader and your device configuration does not support a folder for executables on the SD card. Usually the simplest solution is to install the cab file by launching wceload every time you app starts. You can suppress the UI using the /noui command line switch. Obviously you may add a check that verifies if the files are already in place (to avoid multiple installs that will be a time waste) and you'll also need to load classes/forms etc. that reference the SQLCE modules only after you've finished the installation.

How to share vb.net .exe from one system another system(min 6 systems)

I developed Vb.net project.
My project name is Lone.
My front-end is Vb.net Backend is Ms Access.
I completed my project.
Now I copy the Lone.exe and put shortcut into my system desktop.
Now I want to run that Lone.exe to all system.
I don’t no how to share that one.
Tell me how I want to run my project to all system.
Note: In my system only having Vb.net.
Remaining systems doesn’t installed vb.net.
You have to install the correct version of the .Net framework on all 6 systems, you don't need the whole VB.Net development environment, just the framework. This might already have been installed using Windows Update or similar, so this step might not be needed.
Just try googling download .net framework x.x where x.x is the version you need and you should find a link to download the correct version from Microsoft if needed.
After that just copy that executable to each system and run it.

VB.net app without installation

Is it possible to create a VB.Net application which users can just run without installing it first.
If not, is it possible in another .Net language.
If not, how IS it possible :)
PS: The application only has to run under Windows (>= XP).
If they have the .NET Framework installed (the version of it that you developed it), they only need the .exe. You can find the .exe file in the bin directory of your projects folder in your Visual Studio workspace.
If they do not have the framework installed, you'll need to produce an installation for them. It's extremely easy with Visual Studio by just creating a setup project in the same solution as your code.
As long as the user has the .net runtime installed, and your exe has any needed resources in the same folder (dll's, images, ect) theres no problem with that.
If you mean without installing the .net framework though, that won't be possible.
just build the program, and go into the (assuming the project name is app1) app1/app1/bin/debug/ dir. there should be a file there called app1.exe. this file is the compiled .exe from you project. any other computer will be able to run this without doing any installation (provided they have the .NET framework installed (it comes standard on any computer with an os > WinXP))
EDIT: If you were building with debug configuration, it would be app1/app1/bin/debug/, but if you were building with release configuration (which would probably be a better idea if you are distributing) the path would be app1/app1/bin/release/
If you mean running it without the .NET Framework, it used to be possible, but apparently the company's website is no longer in English so I have no idea what's happened to it.
EDIT: If you were building with debug configuration, it would be
app1/app1/bin/debug/, but if you were building with release
configuration (which would probably be a better idea if you are
distributing) the path would be app1/app1/bin/release/
I am developer and have no administration rights to live(production) network.
I had to find away to deploy an app without installation... and my app is self updating this cause other problems too....
The production network Computer check/monitors the file versions etc, so updating in the program files can not be done, where a MSI has been used for deployment.
Using this above I am able to copy and Run the App from the User Profile (where the user has full rights).
lets understand how program runs-
an .exe needs some function which are not inside the .exe, such as , for example substring() function. these predefined function resides in some .dll libraries.
when .exe is executed by user, .exe first finds the .dll and then the function inside that particular .dll.
.exe first looks within the current folder for that .dll
if not found then it searches that in PATHs. (PATH is Environment variable which value is a list of folders such as System32 etc.)
an .exe usually needs only 3 things - .exe itself, .dll which predefined function it is using, and some ActiveX controls(.ocx). apart from these 3, .exe only uses resources (such as icons etc).
lets focus on these 3(.exe, .dll, .ocx)
first you need to check what .dlls your .exe is using. you can easiely do this by using a dependency walker.
then make sure all these .dlls (that dependency walker is showing,or in other words- all these dlls whose functions your .exe needs) are either in current folder(in which your .exe resides) or in the PATHs.
if this step is done then your .exe has high chances to run whithout "installing".
the only problem is that some .dll and all of .ocx, needs to be registered first(means they have to have some kind of registry entry). they are not ready to use just by copying and pasting in current folder or PATHs.
but you can register these .dlls and .ocx's by using regsvr32 (with command line).
after that your .exe should not face any problem to run successfully.
hope you got the main concept.