Click here to Skip to main content
15,899,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created my first winform application using c# in visual studio 2015.It contain some database operation such as insertion,deletion ,updation.database is created as local dataset in visual studio.Then i publish the application.and worked fine in my computer but when i try to install on another computer i couldnt install the .net version .can you please help out.

What I have tried:

Itried to instal the .exe in more than 2 pcs.doesnt work
Posted
Updated 20-Sep-16 2:03am
Comments
Leo Chapiro 20-Sep-16 7:44am    
What is the error you get? You need to deploy the DB as well, you know that , don't you?
Member 12224528 20-Sep-16 8:01am    
When i trying to install the .exe .it download the framework and failed to install.
Muhammad Rehbar Sheikh 20-Sep-16 8:11am    
if you dont want to installed prerequisites while intsalling exe. try this
>>right click on exeName>>properties>>prerequisites>>uncheck create setup and program to install prerequisite components. and rebuild exe.
Member 12224528 20-Sep-16 10:04am    
When install without prerequisite it shows that "install framework 4.6.1",but when we install framework it seems error as" framework 4 or higher version is already installed".

1 solution

Programs compiled with Visual Studio can be targeted against a variety of .NET Frameworks. However, the many versions of Windows don't always have the most recent .NET versions installed.

Check which version of the .NET Framework your program is using by looking under the Application tab of your project properties. You should see a Target Framework drop down list, which will tell you what version of the framework other computers will need to have installed in order to run your program.

You have a few options to get your program working on other computers.
  • 1. Compile the program with a different, lower framework. (e.g. .NET 2 is often available on Windows XP, while .NET 4 is uncommon on this OS.) This will only work if you aren't using any features from later versions of .NET.
  • 2. Install the .NET framework you require on the client machine. Microsoft provides frameworks to download and install from http://www.microsoft.com/net/download
  • 3. Try creating a Windows Installer using the Setup Project template. Add a new project to your solution from the Setup and Deployment category. After setting up this project, you should have an installer to run on other machines.

after all you need to create your database on which you installed exe. and reset your connectioString (.exe XML Config file) depending upon installer pc.

if you dont want to installed prerequisites while intsalling exe. try this >>right click on exeName>>properties>>prerequisites>>uncheck create setup and program to install prerequisite components.
 
Share this answer
 
v3
Comments
Karthik_Mahalingam 20-Sep-16 9:15am    
use code block, when there is a code to highlight, else use plain text.
Member 12224528 20-Sep-16 15:31pm    
When install without prerequisite it shows that "install framework 4.6.1",but when we install framework it seems error as" framework 4 or higher version is already installed".
Muhammad Rehbar Sheikh 20-Sep-16 17:03pm    
because you are using VS2015. Uninstalled all the dot net frameworks from your computer, then uninstalled and reinstalled VS2015 Update1. then now select .Net Framework 4 as target framework.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900