If the end user dont have .net 4.0 installed , i dont want them to go to a microsoft page to download manually and install it. I rather want them to just click "ok" and the setup goes to my website and downloads the webinstaller file and start installing automatically.
In my solution i have 2 project, 1 windows project and 1 setup project. I have noticed that if i go to properties on either of the projects and then Prerequisites, there i can choose between these 3 options :
Download prerequisites from the component vendor's website ( default )
Download prerequisites from the same location as my application
Download prerequisites from the following location ( with a textbox )
I should want the last option right? But do i link to a folder in my website and it will look there for the right "name" to install ? Then i have to add the installers to that folder?
And i dont know if i only should do this on the windows project or the setup project or both?
I am using visual studios default installer.
Really confused.
Thanky you.
If it is ok for you to distribute the .NET framework with the program you can use the instructions from the answer to this post:
silent .NET Framework install in setup project
The setup should install the .NET framework without requiring any user input.
I normally choose the second options.
Why? Because VS actually compiles a bootstrapper which gets sent to you Debug/Release folder. So all you need to do is copy that whole folder and burn to cd or usb and ship to your client.
Related
In my .Net Core App I want to create a setup file (.msi), but I struggle with the correct configuration.
When I simply take all files from my debug folder and put them inside my "Application Folder" it works, but that's not how Microsoft (I guess) and me want it to work.
Mainly I have two problems:
When I take the "Primary output" of my project and create a Shortcut to this, the Shortcut tries to start the .dll instead of my .exe file.
When I create the .msi file and install my project there is no "runtimes" folder and I manually need to create it inside my "Application Folder". Is there a way to automatically include it into my .msi?
Thanks for your advice!
I did some tests and I think I can reproduce your first problem. According to this document: Workflow changes for .NET Core 3.1, the correct output for .NET Core project seems changed. Though the document is for .NET Core 3.1, I think it also works for .NET Core 5.0.
So, please try to select Publish Items instead of choosing Primary output when you adding project output.
For the second problem, I am not very sure. Maybe Add > File.../Folder can work.
I suggest you also start a thread here: Microsoft Visual Studio Installer Projects - Q&A to ask this question.
If you want to be able to install the necessary run time for a framework-dependent .NET Core 3.1 app, you can do this using prerequisites.
Open properties dialog of your installer project.
open the Prerequisites dialog and Select prerequisites.
I just made my first C# application in Visual Studio 2012 and I want to export it in some way so other people could use it in they computers (including computers without Visual Studio 2012). How can I do it? I'm new at C# and I couldn't find anything that I could understand. Can someone explain or indicate some site with a good (and maybe didactic) explanation on how it works? I have only made C/C++ programs by now, and they I just needed the .exe file, but, based on what I could find, I need something else to send a C# program to others to use.
Sory for the bad English and thanks for those who help.
Right-click the project in VS 2012, and choose Publish... from the context menu. Publishing to a file lets you create an installer:
Choose a location in the file system to which you would like to save the installer
Click [Finish]
Wait for the publishing operation to complete
A Setup.exe installer file will be created at the location that you have selected in the first step of the publish wizard. Share the installer with the people to whom you would like to give your application.
After building your project, you will find an EXE file in bin\(Debug or Release)
Check also the .net framework that it is required in order for c# apps to run. You can find what framework your app is build in projext properties. If the target computer has an old os (XP) maybe the .net framework needs also to be installed
You need any computer that wants to run it to be windows, and running the correct version of the .net framework. If it's a program that's created with VS2012, that'll be .net 2.0 to 4.5.2. After that, you need to find the location of your program, and you can just copy the debug folder that you are currently running from, and your program will work.
I have an application I want to build and deploy via ClickOnce. But we want this to be a process that can be run outside of VS through scripts, for either test, business UAT or production environment.
Each separate environment requires a different .config file to be used and a different web server to be deployed on and for update location.
The application also has prerequisites of .NET runtime 3.5 and Crystal reports.
I have looked into using MAGE to create application and deployment manifests, and if I do a code BUILD, then use MAGE afterwards as per each environment, as well as having the script copy over the correct .config file, this creates what I think are the correct manifests for each environment at the time of running the script.
But what I'm struggling to do is include the prerequisites. If done through VS, you can specify a setup.exe package which gets built with the pre-reqs and deployed alongside the application and when you click on the download link, it installs the pre-reqs from setup.exe and then the application.
But how can I do this manually outside VS? I can build the setup.exe through VS with the right URl location but then how do I link the setup.exe to the application as a pre-req using MAGE to generate the manifests?
The problems we have are 1) The users do not have admin rights to download and install packages, only to install things via clickonce so the pre-reqs have to be installed under the click once security umbrella.
Thanks
ClickOnce and prereqs cause lots of confusion. The setup.exe that Visual Studio generates has nothing to do with ClickOnce. The only minor link between the two is that the setup.exe will launch the ClickOnce application once it finishes. That's it. So thinking users will be able to install your prereqs "under the clickonce security umbrella" is a mistake. If they are not an admin and a prereq install requires admin privileges, they won't be able to install it.
My advice would be to generate your setup.exe one time. You shouldn't need to keep doing it unless your prereqs keep changing. Use Visual Studio, generate the setup one time, then use Mage for the rest.
Edit
In general you make the setup.exe available and depend on the user to know if they need to run it or not. If they already have the prereqs and run the setup.exe, nothing bad happens. It sees that everything is installed then launches the app.
Usually you're going to direct users to run the setup.exe. The next time they want to launch the app they should use the start menu shortcut (assuming you didn't go with "Online Only"). I've found this to be the least confusing set of instructions for users.
Remember how Visual Studio does extra, non-ClickOnce stuff when you publish (like the setup.exe)? It also creates a simple html page that has links to both the ClickOnce manifest and the setup.exe and an explanation. It also has some javascript that checks the UserAgent string to determine if they have the .NET Framework installed. Again, this isn't ClickOnce. It's just something nice Visual Studio does for you. If you like it, use it. I kind of like skipping it and going with the run setup.exe to install then launch from the start menu.
codeConcussion is right, you can't ever actually have the prerequisites instill directly from ClickOnce. You should just generate it once and then you have it ready for your external ClickOnce tool.
There is an option other than Mage. You could use my companies tool, ClickOnceMore, as your ClickOnce build software. It's been designed for people who want to use ClickOnce but don't want to build with Visual Studio.
It can hook into the setup.exe generated from Visual Studio (details here) so should satisfy all your needs.
Why do you want to build setup manually if everything can be done via clickonce ?
You can select "Download pre-requisites from same location" option from prerequisites form if you want to include .netfx or crystalreports, download bootstrap packages for .netfx3.5 & crystalreports and add to folder (for windows 7) "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages" . The deployment project will automatically include netfx & other packages along with setup.exe.
hope this helps.
i want to distribute my C# program and i want to combine
FrameWork2.0 in my installation.
how i can do it - without download FW2.0 from the Web ?
i need that the FW2.0 will be part of my installation and when the
customer will install the program - the FW2.0 will be install (without internet)
thank's in advance
Open your setup project properties.
Click on the Prerequisites button.
Choose "Download prerequisites from the same location as my application".
Click Ok.
Rebuild the project.
Now the Framework 2.0 with other dependent packages should be created along with the setup in your project output folder.
Place .NET 2.0 Redist package into you install, see
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en
In my VS 2008 C# WinForm application, I've made the Install.msi and
Setup.exe on my application release folder.
The client can install the application on C:\Program Files\ by running the setup.exe.
But there comes a new question, when I made a new Install.msi and Setup.exe,
the client has to remove the application via Control / Add Remove Program,
then excute the Setup.exe.
How do we fix this problem so the client's update will be more convenient?
otherwise,
how to create simple exe file like vb exe.
Thanks for help.
There are a couple of things you need to do. In the Properties for the Setup Project:
Set the RemovePreviousVersions property to TRUE.
Set the VersionNumber of the Setup Project. When doing this, you will be prompted that you will need a new product code. Just click Yes.
The VersionNumber of the installer is what the installer uses to determine if the current version is greater than the installed version. If the current version is greater, it will uninstall the previous version, then install the new version.
When you are deploying an update of your application with a VS2008 Setup Project, you must change the version of the project.
When doing so, VS2008 will ask you that if you change the version of your application it will change the product code of your application.
Mading these changes, when you will install the application on your client computer, Windows will detect that your application is an update of the older one and he will automatically overwrite the data with the new application data.
Hope it helps!
Regards,
PL