I have a WPF project in Visual Studio 2017 that correctly publishes if I go on the project properties and publish it from there it does so just the way I want, but when I run msbuild /target:publish it creates an unwanted .exe file.
Furthermore, there's another option I enabled on Visual Studio which is in the Deployment tab called "deployment web page", which I just put "clickonce.htm".
So, when I publish using Visual Studio I get these files:
Application Files
clickonce.htm
[ProjectName].application
setup.exe
And when I use MSBuild:
Application Files
[ProjectName].application
[ProjectName].exe
setup.exe
How can I make it so that MSBuild outputs the same as Visual Studio?
Related
I am creating an installer for a WPF .NET 5.0 project using the 'Visual Studio Installer Projects' extension.
My output after building is an appName.msi file and a setup.exe file that installs prerequisites followed by the msi file.
Having two separate files is not an acceptable solution since the user will not be able to choose the correct file to click on.
How can I make a setup.exe file that includes the msi file (msi packed into the exe) with Visual Studio Installer Projects?
Or if there is any other solution that ends up with a single file for installation that would also be fine.
For the software at work we have multiple projects in a solution. Most of the project we can just build the solution and then publish artifacts of the web project that we need. API and Auth projects are slightly different though. Our currently deployment process is manual and for the API (STARS.API.csproj) and Auth (STARS.Auth.csproj) project when would go into Visual Studio 2017 and right click the project and click publish, select a profile and then publish. Once that is done we take the Publish Output and drop those files on our server.
We are trying to move to a automated process through TFS and I am using the Visual Studio Build task in a build definition. However when I try to run this through TFS, an error saying that the publish profile cannot be found:
Validating PublishProfile(TFSProfile.pubxml) settings. C:\Program
Files (x86)\Microsoft Visual
Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Web\Microsoft.Web.Publishing.targets(4368,5):
Error : The value for PublishProfile is set to 'TFSProfile.pubxml',
expected to find the file at
'C:\agent_work\4\s\STARS\Source-dev\STARS.Web\Properties\PublishProfiles\TFSProfile.pubxml'
but it could not be found.
It is looking for publish profile in a different project folder.
Visual Studio Build Task:
I feel that I can approaching this completely wrong. I am just trying to replicate the process on publishing the project through Visual Studio 2017 manually.
Please let me know if you require more information.
I suggest you start using the pre-defined build variables. $(Build.SourcesDirectory) will map to C:\agent_work\4\s, and from there you can create a full path to the TFSProfile.pubxml, where ever it might be in your source tree. Use this full path in the MB Build Arguments, PublishProfile property, e.g.
/p:PublishProfile=$(Build.SourcesDirectory)\STARS\Source-dev\STARS-API\TFSProfile.pubxml
Another problem you may have is that in the Solution field you are not specifying a solution (.sln) but a project (.csproj). I suspect that MSBuild is picking up the solution associated with that csproj, and building the whole solution, which is why it is looking for a publish profile in STARS.Web. Have you created a publish profile for STARS.API?
I have an installer project I created using Visual 2012's built-in InstallShield Limited Edition Wizard.
I have a need to modify this project on a new computer. The source code was saved and obtained via Team Foundation Server.
So far, I've opened the solution in Visual Studio 2015, installed the Visual Studio Installer Projects Extension, and I'm still receiving the (incompatible) message along with the collapsed message "The application is not installed" for the installer project specifically. All other projects + project types compile, and run fine.
Any thoughts on what I'm missing?
The two are separate tools and require a separate installation of InstallShield LE in order to open the project, because this was an InstallShield project to start with. The Windows Installer extension is something separate.
This was happening because InstallShield wasn't installed. For my purposes, I was using InstallShield LE 2015 in both cases. To resolve, I installed InstallShield using method described below.
Choose items in the following order from the main menu in Visual Studio 2015:
File > New > Project
Other Project Types
Setup and Deployment
Enable InstallShield Limited Edition
OK
Download Now
This brings up a browser window where asking you to enter some details and the InstallShield website will provide a serial and installer.
The process above is described in MSDN.
After which, upon opening the solution with the project in question, should open with a prompt from InstallShield asking for activation. Choose appropriate response, and you will encounter a installer project with its structure similar, if not identical, to the structure in VS 2012.
So It's the first time I'm trying to deploy an ASP.NET MVC application to a Windows host.
I set the compile mode to "Release" in Visual Studio 2015 and I compile it but don't know which folder(s) to zip and upload to server...
I see an obj folder in project directory that has two folder inside it. "Debug" and "Release". I'm not sure about them though.
On the other hand in project directory root, there is a folder with the same name as project, inside it I can see controllers so I'm pretty sure that folder is not a "Release" build.
My host is running Plesk and IIS 8.
What should I do?
You should use the Publish wizard of visual studio. As a shortcut --> Right click on the MVC project and click publish. You will find many option here.
Make sure you configure your publish profile in release mode if you are publishing on server
I have built a custom menu command (Launch Application1) using Visual studio SDK-13(using C# extensibility) which pops up in the 'Tools' menu of Visual studio.
Now, when I run this project a new instance of Visual studio opens up and 'Launch Application1' is shown under the 'Tools' menu of that visual studio.
The output is a '.dll' file and not an '.exe' but I want to have an installer for this, so that a simple installation can deploy this into any visual studio environment permanently. Please help!
The output of a visual studio extension - in your case a custom menu command is always a dll file, with the dll file visual studio also creates a VSIX file which is a Zip file and contains the dll and some other manifest files.
The VSIX file can directly be distributed for installation on other systems, If the correct version visual studio is installed, the extension will be installed with that.
For basic stuff you can use the VSIX as your redistributable. If you want to have a proper MSI file you can try WiX installer.