More Publish/deploy exe from Visual Studio 2010 - c#

I got my app successfully published, ran the setup.exe just fine, but it lloks like the app was installed in an odd place, buried way down deep:
C:\Users\sndevfarmsvc\AppData\Local\Apps\2.0\HQ0721DB.Z4Q\8TDK6PMR.A39
Is this normal? In the publish section of the project in VS 2010 there is a place for installation folder, but that requires a URL....what if I want it always to install to c:\program files\ on whatever machine it is run on?
thanks,
Phil J.

Yes that's normal for a ClickOnce application.
The installation folder is the location where there application is installed from.
If you want to install into a different location you'll have to use a different installation program.

Related

Visual Studio 2017 fails to install offline with "Unable to download installation files"

So I've created an offline installed of VS 2017 Community on my laptop using this command:
vs_community.exe --layout "D:\Downloads\VS Community 2017" --lang en-US --add Microsoft.VisualStudio.Component.CoreEditor Component.WebSocket Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.NetCrossPlat Microsoft.VisualStudio.Workload.NetCoreTools Microsoft.VisualStudio.Workload.Node Microsoft.VisualStudio.Component.TypeScript.2.0
When I transfer the setup files onto my corporate PC (which is behind a firewall) and run the "vs_community.exe" setup file, all I get is this error. There's no way to bypass the corporate firewall or to make exceptions. How do I install VS 2017 offline? Am I missing something here?
Edit: I have installed VS 2017 on my laptop keeping the internet connection active. Then when I disconnect the internet on my laptop and try installing again, the installer launches! So perhaps there are some dependencies missing on my corporate PC that are now installed on my laptop?
Edit: The above command installs .NET, .NET core, Xamarin, Node.js, TypeScript and C++ for Mobile. The total downloaded size is 13.2 GB.
It worked!! All I had to do was install the certificates into the root CA! Something I missed noticing in the VS 2017 docs:
How to install from the offline installation folder
Install the certificates (They are in the "certificates" folder, which is in your Layout folder. )
Simply right-click each one and choose Install PFX.
Specify Local machine (not current user)
You can use an empty password
Run the installation file. For example, run:
c:\vs2017offline\vs_enterprise.exe
--- Microsoft Docs
Edit: Remember to install the certs using the Admin account on the PC, or it won't work...
Please try to follow this steps:
Right click on exe file.
Select "Properties".
Click on the "Digital Signatures" tab. Now you can see "signature list".
Select signature
Click on "Details" button.
Click on "View certificate" button
Click on "Install certificate" and follows installation wizard
All certificates within "signature list" should be installed. I use Windows 10.
Was doing this for VS Community 2017 and it would install everything and it does the core installation without any trouble. However, if i select to install the universal or .Net development portions it will install it almost completely, but it will fail on two files. It will say that it cannot download the files from the internet. The files exist in the installation directory and I even went and downloaded the files and placed them into the appropriate directories and it still thinks that it needs to download those two files preventing me from completing the installation process. If I just continue it will install everything else except those two files. I've tried this with a few different layout downloads in different forms (ISO, directory, etc) and same issue (so it isn't a bad download or anything, and I'm sure I did that all correctly). The two files are:
https://download.visualstudio.microsoft.com/download/pr/10983757/f8c877406947fdc71ed2dd9127d2f9fa/microsoft.codeanalysis.visualstudio.interactivecomponents.resources.vsix
https://download.visualstudio.microsoft.com/download/pr/11347028/25bedee219940beceecab91dac231235/microsoft.visualstudio.testtools.testplatform.legacy.core.resources.vsix
If I plug myself online and do a repair it will go grab those two files without having to grab everything else, but it kind of defeats the purpose. Don't expect a solution, but wanted to mention it because all the other problems are related to installing the certs and I can't find anything online about it failing on just a few files.
In my case it was related to CNG key isolation windows service, it was disabled, the solution mentioned in below link:
Visual Studio 2017 - Can't install
How i solved mine.
I downloaded the setup helper from Microsoft website (i downloaded the enterprise installer, because that's the offline installer version i have )
I ran the program, and it wanted to download the complete setup, so i cancelled it
I ran my offline installer (vs_Enterprise.exe)
Then it fixed the issue.
I disconnected the internet, and continued with the offline installation
I have the same issue after uninstalling SSDT for Visual studio 2017, Can't remove and reinstall or update visual studio 2017.
I just restart my machine and it's OK.
my be you have also to log in as an administrator ( it depends on your machine configuration and what you can do with you current account)
Edited to avoid misunderstand
Running the downloaded Visual Studio layout as administrator worked for me.
Maybe the VS_Version.exe try to normally download the files because it can't access to files in the layout (sometimes named backup), like me, in my job we have a lot of restrictions and when I ran the VS_version.exe tried to download and get the message error, but when I ran again the .exe as Administrator the installer started normaly, getting the files from the backup folder

Deploying Click once on production environment

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.

Changing the install directory for a C# program in Visual Studio 2013

I am kind of new to Visual Studio and have found no solutions online, so this may be a simple problem nobody has bothered to post about.
I am working with a system that requires certain browser settings on a very specific version of Internet Explorer and am trying to create a launcher that can be installed on all users of a domain computer that establishes all these settings and creates a simple IE window (to dissuade people from using it more than needed).
I have written this application, but when I run the installer it a) gives me no option to change the install directory, and b) does not give me the option to change the default install directory in the project properties.
Other sources continue to say to change the 'Install Folder URL' to something else, but whenever I change it to say '\\localhost\c$\A_File_Directory', nothing ever changes and it continues to install in an unknown location.
Any help would be appreciated (perhaps a location with in-depth examples for VS)
EDIT -- It seems there is no way to do what I am looking for through Visual Studio, so I think I will be just deploying the ClickOnce installer through Group Policy so it can run on a per-user basis. Thanks to all who helped!
As of VS 2010 the ClickOnce Installer does not let you choose where to install the application. It controls that. I have found it rather irritating and if you really need to control where something is installed you need to use a different installer.
Here's another answer for VS 2012
Settting the ClickOnce installation folder URL in Visual Studio 2012

How to run an installed file after installation?

I have a setup project in c#. i want that setup run 2 exe file from the installed files after installation. How can i set which file to be run after installation.
Any suggestion would be highly appriciated
Add a custom action as below...
After the install complete, it should run the application automatically.
Launching Your Application After Install using Visual Studio

Is there any point to the setup.exe file created by a setup project in Visual Studio?

I've created my first setup project using Visual Studio 2010. I've noticed that when I build the setup project it generates an MSI installer file and a setup.exe executable. However, I seem to be able to just right click on the MSI file and choose install to install my application rather than running setup.exe.
Does the setup.exe file that is generated do anything other than just fire up the MSI file? When distributing my application can I just provide the MSI file rather than the MSI file and the setup.exe file?
Kristopher Johnson is correct about the older machines, but it also does something else. When you are setting up the installer you can set dependencies and locations to download those dependencies. The Setup.exe does those dependency checks and launches the other MSI files in to install them. This is most often used to make sure Windows has the correct version of .NET or the C++ runtime installed.
If you do not have dependencies and you can guarantee .NET or the C++ runtime is installed then you do not need to distribute the setup.exe file.
Many (most?) users are accustomed to running the "SETUP" program to install something. That's why it's there. It's a good idea to provide it, unless you are certain that only technically knowledgeable users will be installing your application.
SETUP.EXE is also useful if somebody tries to install on an older version of Windows which doesn't have support for MSI files. In that case, it displays some sort of "You cannot install this program on this version of Windows" error message.
I believe (but could be mistaken) that it performs boot-strapping of the correct version of MSI.

Categories