How Can I Create Folders in the Installation Process? - c#

I haven't deployed the application yet. I'm new to this, how can i create folders under C:\Programs Files during installation? Should i put the snippet of creating folders in program.cs?
The application is Winform in C#

In Visual Studio, use the MSI Installer Wizard template to add an Installer to your solution.
Using this template you can set up the appropriate folders (also registry keys, start menu shortcuts etc.) to create when you deploy your project.
In Visual Studio 2008 this template is under Other Project Types->Setup and Deployment->Setup Wizard.

Use deployment (setup) project. it will create this folder for you

Add a Setup project to your Solution And then add Primary output and all the files needed.
From the Property windows of the setup project you can choose default location where to save
your projects which I usually do in my projects.
Refer this for more info http://msdn.microsoft.com/en-us/library/ms235317%28VS.90%29.aspx

I strongly recommend WiX over the visual studio deployment project. It has a bit of a learning curve, but it's worth learning it.

Related

Where is the .ebextensions folder in .NET for AWS elastic beanstalk Linux

I am trying to upload a .NET application using visual studio 2019. This uploads, however, I need to make config changes in the .ebextensions folder. This is not showing up in visual studio. Where is the .ebextensions folder in my .NET application?
In Windows explorer
It would be in the root of your project. I don't think it's created by default, so if it isn't there you need to create it. See the details of adding it to a .NET project here.
If you are looking for it via the Visual Studio Solutions Explorer, it probably won't show up unless you enable Show All Files.
You can find this option here:
Show All Files button in VS 2019 sidebar

How Can I Create a Setup File for multiple applications in Visual Studio?

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

How do I create a Shared Code project (.shproj)

How I add a .shproj to my Visual Studio solution and reference it from other projects?
I know that Visual Studio 2013 Update 2 added a new project type for "Shared Code." This type of project does not produce a dll itself. Instead the files from the Shared project are included as source files in the assemblies that reference it.
I know it exists because I have seen one in an open source project. However, looking through the project templates in Visual Studio I could not find a "Shared" project type.
Edit: According to the Visual Studio 2015 Preview documentation, VS 2015 adds templates for shared projects and a UI for managing the references, so the below should no longer be necessary after upgrading.
There does not seem to be a way to create one directly. It appears currently that Shared Code projects are automatically created when you create a Universal App project as shown in this introduction to creating a Universal App.
Therefore, to create one in your solution: Add a new project type "Blank App (Universal App)." Delete the Windows 8 and Windows Phone projects it created leaving only the Shared project.
Check out the Shared Project Reference Manager extension.
Note: make sure you have VS2013 update 2 or above for this to work.
An alternative to vossad01's approach is to create a shared code project, then open up the .csproj file and see what the project looks like in the .csproj. Visual Studio's csproj files are simply XML files so you can open, copy, and paste the shared code project into your own csproj.

MSM Merge Modules in Visual Studio 2013

Could someone please let me know where I might find resources for creating MSM files? While I am able to create MSI files using InstallShield, it seems that Visual Studio no longer supports Merge Module Projects, judging by the link below and the screenshot of my version of Visual Studio 2013 - http://msdn.microsoft.com/en-us/library/z6z02ts5(v=vs.80).aspx
To create a new merge module project:
On the File menu, point to Add, then click New Project.
In the resulting Add New Project dialog box, in the Project types pane, open the Other Project Types node and select Setup and Deployment Projects.
In the Templates pane, choose Merge Module Project.
For those still looking to use Merge Modules in Visual Studio; there is an official Microsoft extension for Visual Studio 2013 that lets you create Merge Module projects again.
Information on the extension, click here. The page leads to the Visual Studio Gallery where you can download the extension
Update 17 Sept 2015: an extension for VS2015 is also available here.
As discussed in the comments, Setup projects got removed from Visual Studio; a version of InstallShield was provided as their replacement. The standard alternative to InstallShield is WiX. WiX is somewhat arcane at first - it's a pretty thin layer over Windows Installer - but there are quite a few resources and examples out there.
Good resources for getting into WiX are http://wix.tramontana.co.hu/ and http://wixtoolset.org/documentation/manual/v3/. You can download the tooling from http://wixtoolset.org/

Setup project and IIS

I am creating a new Setup project using Visual Studio 2010.
I have an existing application which has a few .aspx files along with few other directories. The application has lots of other non-ASP.Net files such as exes and dll's.
I am not quite sure whether I should create a "Web" setup project or create a simple setup project instead?
I am looking for some advice on this.
Any kind of inputs are appreciated!
Thanks.
Be aware that those project types were removed in VS2012. Assuming you want to invest in this technology at all, the "Web" setup project handles IIS configuration. The "Setup" project is just file copying.
My input would be to go directly to Windows Installer XML or InstallShield Limited Edition.

Categories