How to create a single setup.exe using visual studio 2010? - c#

When I am publishing my project, it creates a folder named "Application Files" and two files named "ProjectName.application" and "setup.exe". But I am not expecting this. When I publish my project/solution it will create a single setup.exe and no ohter folder and files will create there.

The app.application manifest file and setup.exe are the so-called smart client deployment model. AFAIK, you can provide a link to app.application on a webpage and .NET aware browsers are able to download necessary files from the manifest.
If you need a setup package that end users can click-and-install, you should use a setup creator like the one VS 2010 suggests - InstallShield Express.

Related

Visual studio 2022 WinForm publish folder

i have created a WinForm application and i tried to publish it but i have many questions about this publish process.
Why does Visual studio create the app folder in C:\Users\'Username'\AppData\Local\Apps\2.0 ?
Is there a way install the app .exe in another folder such as "ProgramFiles"?
How does this publish thing really work, is there a documentation about it?
What is the AppName.application file that is created after publishing?
I am worried about this because i want to create a Themes folder and i don't want the app folder to be so deep into the folder tree.
The app folder in C:\Users'Username'\AppData\Local\Apps\2.0 is a system folder, it is used to hold temporary data for .Net Framework apps installed on your PC.
you have nothing to worry about with that folder . . .
You can install the .exe and publish the solution in the folders that you want,
you can do it by using ClickOnce deployment to a folder.
Here is a Microsoft documentation how to use it.

Migrate asp.net core React-Redux WebApp from VS2017 to Visual Studio Code?

I tried loading the solutions folder in Visual Studio Code however the build configurations are all wrong and I wasn't able to figure out how to tell VS Code which project to run.
To further complicate things I 'deleted' the folder structure in VS Codes solution explorer and now I can't see the folder structure when I try and load the same folder directory.
VSCode doesn't support the .sln files the same way as VS. It is a directory based editor first of all, not a full IDE. For example, the VSCode Explorer is used to browse, open, and manage all of the files and folders in your project (workspace).
All workspace settings are stored inside your workspace in a .vscode folder and only apply when the workspace is opened. Settings defined on this scope override the user scope. It may help to think about workspace as a root folder that was used to open the project in VSCode.
In general, to be able to build, debug and run the application in VSCode, you need to configure build task and launch configuration.
VS Code provides a conception of
tasks to allow actions like project building. Tasks are defined in task.json file;
launch configuration so you can run/debug app. Launch configs are described in launch.json.
VSCode looks for this files also in your workspace's .vscode folder.
During the configuration process, if you need to specify a path to something in your project, it is common practice to define it as a relative path to this workspace folder by using ${workspaceRoot} variable.
If you install C# for Visual Studio Code (powered by OmniSharp) extension, it helps you to generate appropriate configurations for .NET Core projects.

Visual Studio Setup Project to target Public Documents folder

I'm using the extension Visual Visual Studio 2017 Installer Projects from Microsoft team to create an MSI Installer for a Visual Studio's desktop appliction. I've successfully created a SetUp Project and set all the necessary properties in the File System Editor of the SetUp project (Short Cut to dekstop, Program File's menu etc). The installer need to deploy an XML file to the Public Documents folder on the target computer. Question: how to target the Public Document Folder on the user's computer where the installer will install the app?
Background: This installer is built for an MS Office VSTO Add-In for WORD and it's deployment is done through Windows Installer (not through ClickOnce). And according to a licensing management system their XML Configuration file need to be deployed to the application directory that will not be our add-in's directory, but the directory of the application that loads the add-in. A recommended location for the XML file in this case would be a public folder such as the Public Documents folder on Vista and later versions of Windows.
I just clicked through the UI of VS2017 installer projects. I don't see a way to specify the public documents folder. You can add a user-defined folder (right click "file system" > add special folder > user defined folder) but it's limited to predefined properties of Windows Installer which doesn't include the public documents folder.
If you only need to install into a common folder but don't require it to be the public documents folder, you could use the CommonAppDataFolder as an alternative. Specify that for DefaultLocation of user-defined folder.
Otherwise you could possibly write a custom action that calls SHGetKnownFolderPath(FOLDERID_PublicDocuments,...) and assigns the result to a property. Then specify that property for DefaultLocation of user-defined folder. Here is a tutorial for writing a VB custom action for installer projects.
Though I strongly suggest to get rid of installer projects altogether and use the WiX toolset instead which provides much more flexibility. It comes with a nice Visual Studio extension too. WiX already defines the property WIX_DIR_COMMON_DOCUMENTS that is initialized to the path of public documents folder. Example.

Deployment issues regarding some resources

I am having a issue regarding my deployment of my software in Visual Studio 2012. First of all I am not able to install the "InstallShield Limited Edition" through VS12 so I am currently testing out Advanced Installer instead.
Mys issue comes due to the fact that in my program I am fetching a .pdf file and modifying it and later on showing them to the user. These PDF:s is in the programs resources folder but does not follow with the installer, so my application crashes since it cannot find this. The same is for my .chm file (help file)?
My customer is using XP and when I try to publish the software directly from VS12 it works on my computer, Windows 8, but not on his computer. The application won't even start for him.
So how can I deploy my pdfs to the installer file, or why is this not accomplished already?
It seems that the PDF and CHM files are not imported automatically in the project. What type of project have you created in VS?
To add those files in the setup use the "Edit in Advanced Installer" button from the Advanced Installer VS extension and go to Files and Folders page. There you should add the two files in the desired folder and save the project.

Delete specific files after installation using visual studio setup project

I have this problem. I want to build an installer for my c# solution, that will be placed in a folder with other installation folders and files that are needed to be copied to the installed folder. So that is easy, I just copy them to the folder I create using the folder structure I want.
Now, I want also to install another program and run a .exe file I've created to unzip some files for me. For that I need to copy 2 .exe files and 2 dlls (for the exes) to the folder to which I am installing and create 2 custom actions that will use them. That I've managed to do.
After that I want to delete those 4 extra files, as the user does not need them and shouldn't even be aware they are there. How to do so? I couldn't find a way in the built in setup project preferences + I do not know how to make a custom installer class.
A bonus question, is how to make the other installer (one of the .exe files is just a plain installer) install quietly to any path? I do not want the user to see an installer pop out of my program installer.
Thanks!
Some commercial setup authoring tools support temporary files. They are extracted when the installation starts and automatically removed when the installation ends. They are never registered with Windows Installer.
You can find a list of setup tools here:
http://en.wikipedia.org/wiki/List_of_installation_software
Regarding the prerequisite, it depends on its setup package. You can install it silently only if it supports this through its command line.
Don't. You will get a ton of problems with Windows Installer trying to automatically repair your applications and such things. You might be able to solve the problem with a more advanced installer creator, such as WiX.

Categories

Resources