How to Create Installer for my Project - c#

Hi guys i have a c# project that i want to create an installer.I want the installer to do the following:
Copy all the files that my application is using to a user chosen path (copy the files to the chosen path).
Ask for a specific Path(my c# program requires Google Drive Application to be installed and need its path)
Create Folders and Text files in that Path.
Please help me guys thanks.

Project Setup & Install was dropped after Visual Studio 2010. You'll either have to go the WiX route, or if you have Visual Studio 2013, you can create an InstallShield Limited project. There are several alternatives as well, just do a search.
Here's a link to a page that gives a video walkthrough of how to create an application installer with InstallShield Limited from Visual Studio 2013:
http://learn.flexerasoftware.com/content/IS-EVAL-InstallShield-Limited-Edition-Visual-Studio

Related

Visual Studio Publish Installs Program But I Can't Find the Files

I have VS community edition and I can't find my installed files. I go to the properties window of my start up project and click down to Publish. My publishing folder location is j:\projectinstall. My installation folder is \c\program files (x86)\TestProject\ (For some reason, VS doesn't allow destinations such as c:\program files (x86)) I run publish then run the install on another workstation. Everything works fine -- I get a shortcut on the desktop and I double click it and the file runs. The problem is that it's like the files don't exist. I can't find file location, there is no target. I do a search on my hard drive and the files are just not there. Any help would be greatly appreciated. I tried it with VS 2015 and 2017.
I found the file under c:\users..\appdata\localapps... but I don't want it published into some buried folder. Please help.
The problem is that the VS Community Edition doesn't come with the proper tools to make an installer. I found a free installer program online: Inno Setup

Is it possible to work on a ASP.NET application on Visual Studio 2015 and VS Code? [duplicate]

How do I open I a Visual Studio Code folder in Visual Studio 2015?
If I open it as a "Web Site", it tries to treat the node_modules directory as part of the project's normal JavaScript files and hits an error when the path exceed the maximum path length.
But I can't open it as any other project type unless I first create a project of that type and then move all the VS Code files into that folder.
Should I be trying to open it as a web site?
Or should I create a new project and then copy the files + folders into it?
Is there any advantage to having it as a project?
If I do create a project, it makes it difficult to work together with someone who is just using VS Code?
And if I use a project, which project type should I select?
Finally folder view has arrived in VS 2017 :)
You can find more details in here.
Currently there is no way to open a folder directly with Visual Studio.
Why? Because Visual Studio and Visual Studio Code only shared their name, not the idea behind it. To extend Jenny O'Reilly answer:
Visual Studio Code is a folder oriented editor
This means VSC has the same Point-of-View to your Project as the File Explorer.
Visual Studio (not Code) is a solution oriented integrated development environment (short IDE)
Instead every Project in Visual Studio needs a *.sln Solution-File as Root Component. From this point Visual Studio looks at your Project. An example would, if you copy File in your Project Folder, they wouldn't be recognized from Visual Studio. You have to add them first to your sln File, to see them. It also allows the developer to combine multiple projects (*.csproj,..) into one single Solution to build.
This means the idea behind these two editors is completely different.
Visual Studio (not code) Project-types for Web
There are Node.js Tools for Visual Studio
This will provide Node.js built-in project templates
Visual Studio 2015 comes with TypeScript templates
Workaround 1
A workaround would be a Blank Solution in which you set up your Visual Studio Code Project.
Workaround 2
Another trick would be the answer to this question. You can open your Project Folder as a Website Project.
File -> Open Website -> File System and choose the folder
Update
As you mentioned, there will be errors because Visual Studio tries to build the solutions. For the next few readers of this response, the work around for this (as John Pankowicz writes in the comment) is:
Right-click Web Site in Solution Explorer -> Property Pages -> Build -> Uncheck "Build Web Site as part of solution"
Update 2
(Thanks to JC1001 for this update)
The next version of Visual Studio (Visual Studio "15") will support opening a folder. This is mentioned in the Visual Studio Blog.
Also like in Visual Studio Code, there will be a prompt command for opening Folders. Right now you can use this in the preview version:
devenv /command “file.openfolder FOLDER_PATH”
In the future you will be able to use:
devenv FOLDER_PATH
Opinion
Personally I wouldn't recommend Visual Studio (not code) for HTML/Website projects without server-side-development, because I don't see any features. Even the intellisense suggests to me sometimes bad HTML Code (it's not the IDE's fault).
After all web projects are still text files. You can easily control group projects like this with Version Control. Visual Studio Code even provides an integrated Git support.
Visual Studio Code does not create "project files" that you can open in Visual Studio 2015. Basically, when you open up a Node website in Visual Studio, you need to re-create the folder structure in VS2015 and create a "project file".
I haven't seen any better ways of doing this, but will be happy when we can open a folder just as easilly as we can with VSCode
I'm sure it's not the best way but..
Open an existing .sln with notepad, change the names, save as [name of your project].sln.
Open with Visual Studio.

How to copy Visual studio 2010 projects to use in other system?

I have developed a website using Visual studio 2010. Now one of my friend needs that website/project to copy in his system for further development. But whenever i copy from default VS project folder, it is not running in other system( Installed same version of Visual studio). I have done same with VS 2008 and it was working fine.
Follow the below steps :
image 1:
Copy the entire project folder (must Copy the entire project )
Open Visual Studio in Admin Mode
Open the solution file (you can see in the image 1 -project file)
Re-Build the Solution
How to copy from root folder of project :
Just right click the project and find options.
Note : Visual Studio 10 - Framework = 4.5 ,previous versions will not have the same framework so tools and references should be taken care of.They will not load if framework is different.
Probably the full path to the solution folder should be the same on both computers.
It is always recommended to use tools like Github.
These help to maintain a version of the files and all the organizations use some kind of version-ing system
https://www.unleashed-technologies.com/blog/2014/08/01/what-github-and-how-can-it-benefit-your-development-team
So following this practice will help you later when you will start developing professionally
and the tool is free :)

Change Published Project Install Directory in Windows8.1

I am trying to change the default installation directory of my projects when I publish them but I seem to have no choice over where the published setup.exe actually puts the program. It seems after setup.exe running and application installed, all the processed files are under the folder of C:\Users\{username}\AppData\Local\Apps\2.0\ (Something like that, I dont remember the exact directory as it is very long). This is not what i want as I installed the program in the C:\Program Files\ but all the log files go to the C:\Users\{username}\AppData\Local\Apps\2.0\. This is really really annoying.
The application I published is C# Windows Form Application
And I have looked through online and found that somebody suggested to create an MSI package for C# Windows Application Using a Visual Studio Setup Project instead of publishing the program:
Publish Windows form application how change the installation path
It is supposed that the above website can solve this problem. Are there any other suggestions to solve this redirection problem after publishing the C# Windows Form Application? Thank you.
When you use the Publish funtion in Visual Studio, you are creating click-once publication. This type of deployment has relatively fixed rules and not everything can be configured. It allways installs into an obfuscated folder under windows user profile. It is similar to the fact, that you cannot change location where windows-store modern apps are installed under Windows 8.1.
You can create MSI setup project for your app - but in Visual Studio 2012 this type of project is missing and it was re-introduced againg in Visuals Studio 2013. There you can specify install folder. You can also use Install Shield Lite with Visual Studio 2012.
You wrote:
This is not what i want as I installed the program in the C:\Program
Files\
It is not possible to install ClickOnce application using Publish button in Visual Studio into C:\Program Files\.
If you have just problem with the location of your log files, you need to specify a different folder within your application code. Make sure that user, who is running your app, has write access to that folder - it should be in some user's profile folder or in a public folder. Avoid %ProgramFiles% as a folder for your log files - it is not a good practice.
Instead of Application.StartupPath you should use path accessible to all users including non-admin, like:
Path.Combine(Environment.GetFolderPath(SpecialFolder.CommonApplicationData),"MyCompanyName")
You can use InstallShield to create installation wizards/Setup.
Here's the free version for Visual Studio

What Visual Studio Files do I need to give to WiX, and how can I get them?

I have Visual Studio Express 2012, and I'm looking to create an installation project for it, using WiX. I can't use the plugin because it's Express, so I'm using the candle and light approach.
I know how to make the wxs file I need, but my problem is that I'm not sure what files to include in the setup app (ex. the actual application file) and how to get Visual Studio to give me these files.
Any help will be appreciated.
Thanks.
-tradeJmark
You need to build your project in the Release configuration, which will create .exe and perhaps .dll files in bin\Release.
Do you have another machine? I happen to know that WiX works nicely with the free Visual Studio Integrated Shell.

Categories

Resources