I'm developing a Windows app in Visual Studio 2013. When I use the publish feature, it creates a setup to install the app.
I don't want it to create a setup. I want it to build and deploy into a test environment, ready to be executed, without overwriting that environment's app.config. It would be great if I could configure multiple environments and choose which to be deployed.
I found https://msdn.microsoft.com/en-us/library/hh191495%28v=vs.120%29.aspx but it requires TFS. I wanna do it directly in VS.
To make it more clear, the best solution would me to type F6 - or any other shortcut - and have Visual Studio do the following:
build solution
copy exe and dlls to a specified folder
don't change destination's app.config
if possible, copy also source code so that debugger when opened is able to run thru it
It should be able to configure multiple profiles, so that it can send files to multiple test environments.
Related
I did the following steps to create a Windows Setup project:
Create a Windows Forms Application using Visual Studio
Install "Microsoft Visual Studio Installer Projects plugin"
Add a "Setup Project" to the solution
In the "Application Folder", add project output
(Steps 5 and 6 are optional)
By right clicking the Setup project and opening "Properties", select "Prerequisites"
Select "Download prerequisites from the same location as my application"
Build the solution.
After all these steps, I see many files (Setup.exe, Setup.msi, NETFX472 folder) in the Release folder. But I only want one simple self-contained setup file. So, users can run the setup file and install the application easily.
How can I make a simple and self-contained Setup file for my project?
I know it's possible, but I am looking for an easier and more efficient way to do it.
I know I can create another Windows Forms app called Setup which copies the project outputs to user's Program Files directory and copy the output files one-by-one. But I don't think that solution is elegant.
EDIT:
After more tries, I learned that Setup.exe is for installing dependencies (only .NET Framework 4.7.2 for my case) and then running Setup.msi. So, without Setup.msi file, Setup.exe is nothing and vice-versa.
Also, I want my program should work 100% offline (including setup). So, installer should include offline .NET Framework 4.7.2 installer.
What I don't want here is Setup.exe to only install dependencies. It should also install my program. So, it should do also whatever Setup.msi file does. Second thing I don't want is dependency installer as separate file (offline .NET Framework 4.7.2 installer in this case). It should also be embedded into Setup.exe.
I have a C# application and I have some applications like MySQL, MariaDB etc. that I use with my C# application.I want to make a SETUP file that contains my C# application's EXE file and other applications' (MySQL, MariaDB ..) setup files in one setup file.That setup file will install all of these applications with one setup file.
I have tried with Visual Studio Setup Wizard but I can't manage.Can I do that in Visual Studio?If I can, How can I do that?Should I download a visual studio extension?
You can create Setup by installing WIX tool and Install the Visual Studio extension and follow the WIX syntax
If you need to Include multiple EXE files in Setup you need to refer all the files that u needed in Setup.
If you need to install those setup then you need to create the custom action.
you can create a separate project for a custom action and added the references to the required binaries (ie the Binaries you previously mentioned in tags) and added the corresponding dll formed in the binary tag and called it via CustomAction
It's not clear if you've downloaded and installed the VS 2017 Installer Extension from here:
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.MicrosoftVisualStudio2017InstallerProjects
which lets you create Visual Studio installer projects (not the setup wizard). I suggest you search for tutorials on setup projects if you're totally unfamiliar with them, such as:
https://msdn.microsoft.com/en-us/library/cc766795.aspx
http://www.c-sharpcorner.com/UploadFile/1492b1/creating-an-msi-package-for-C-Sharp-windows-application-using-a-v/
https://www.red-gate.com/simple-talk/dotnet/visual-studio/getting-started-with-setup-projects/
In general you just drag and drop your files into (say) the Application Folder in the File System view; registry entries can be created using the Registry view. Prerequisites such as SQL runtime support. .NET runtime are added with the setup project's properties, choosing from the list of prerequisites.
This will give you a basic setup with little customization. There might be features you require that Visual Studio setups don't support, so something like WiX will give you a lot more functionality with a steeper learning curve if you've never created an MSI setup file before. I would search for a tool that fits your requirement, and this thread might help:
Best tool to create MSI
This is strange but I was not able to find a simple guide, supposedly of a trivial task.
I can publish my Click-once application on IIS through visual studio. Now I want to move the application to client side. There I don’t have visual studio.
No how do I change the server of my click once application which is hosted on my system to client system?
I was able to find many guides describing how to do it through visual studio in dev environment, but I was not able to find the guide on how to do it on production without visual studio
Any guide or steps will be very helpful
There are in principle two ways how to the create a ClickOnce publication.
Using Visual Studio publishing wizard as you do.
Using MAGE.exe or MAGEUI.exe
(in C:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\). - watch out that you use the right version.
But ClickOnce application consists of 1 file and 1 folder that can be copied.
So you just publish internaly to your server, and then just copy the .application file and appropriate one folder with latest version which resides under Application Files folder. You do not need to setup any extra publishing software, I think.
I made a little app with c# which I wanted to send to a friend to get an opinion. Problem is when I selected release configuration and click rebuild I get 7 additional files(3 dll's, 1 exes,...) along with the exe I want. Am I doing something wrong? I used to get single .exe files back when I used c++ with VS 2005.
You are not doing anything wrong. Its just that at release additional files are generated like AppConfig.xml for instange that holds your application settings, or a ClickOnce deployment package so that your friend can install the app. To get more used to c# you can start by googling articles about the differences between debug and release
Have you considered using the Click Once facility built into Visual Studio 2012?
Click Once Deployment - MSDN
Click Once will generate an installer that will that your friend can execute. It will automatcially download and install any dependencies (such as a specific .NET Runtime) if necessary.
To distribute referenced DLLs look at the following URL as it suggests the correct configuration settings:
How to: Specify Which Files Are Published by ClickOnce
It's been an horrible hour. Couldn't get Clickonce working for such a simple app. Moving just the 3 referenced dlls and the exe to another folder worked. Wix on the other hand...is difficult to say the least.
However, this allowed me to create a single setup file if not an exe in 10 mins. I sent a shortcut to the desktop which is more or less what I want.
I programmed an hour-sheet application and now I would like to publish it so people can install and run it.
I've tried the publish function of visual studio 2008 but this gives me a clickOnce application/installer that's really confusing, but it works when I run it, but when I export the installer to another pc it installs it crashes at the end of the install.
so I tried just coping the installed files but then the program crashes at startup.
Is there a simple way to compile the application to a simple standalone executable or maybe containing a separate folder containing the resources (images/classes)?
You can copy the executable from bin\Release and it should work.
If it uses any DLLs that are not part of the .Net framework itself, you'll also need to copy those. (Set Copy Local to true in the properties for each reference)
If it uses any other files, you'll need to copy them to the right place or embed them in the EXE or a DLL.
I would add Setup Project to your solution which will create a setup.exe.
Here's some of the links:
http://www.dreamincode.net/forums/index.php?showtopic=58021
http://msdn.microsoft.com/en-us/library/ms235317.aspx
This will make sure that the dlls and assemblies are deployed to appropriate place when you install your software. It will also make sure that it gets rids of files when you uninstall it.
you can find your .exe here Projectpath\bin\Debug you have to give .config file too