Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Web Deploy prompts for password when mode is Release, but not Debug

We have a web project set up to deploy the same project to a handful of azure websites. When deploying to these websites, deployment in Debug mode works as expected. However when trying to deploy the same project to a website in Release mode, we are always prompted for a password.

Have tried deleting the .pubxml and .pubxml.user files, but the issue persists. Why would it deploy OK in Debug mode, but prompt for a password in Release mode?

Note: most of these projects deploy to virtual directories marked as applications in these websites. Other projects deploy just fine in release and debug mode, it seems to be just one project we are having issues with.

like image 361
danludwig Avatar asked Jan 26 '15 14:01

danludwig


People also ask

How do I debug a project in Visual Studio?

In Solution Explorer, select the project. Select the Properties icon (or press Alt+Enter ). In the Configuration list, choose Debug or Release. In the side pane, choose Linker > Debugging, then select options for Generate Debug Info.

What is debug and release configuration in Visual Studio?

Set debug and release configurations in Visual Studio. Visual Studio projects have separate release and debug configurations for your program. You build the debug version for debugging and the release version for the final release distribution. In debug configuration, your program compiles with full symbolic debug information and no optimization.

How to debug the release version of my program?

The release configuration of your program has no symbolic debug information and is fully optimized. For managed code and C++ code, debug information can be generated in.pdb files, depending on the compiler options that are used. Creating.pdb files can be useful if you later have to debug your release version.

What is release mode in Visual Studio Code?

Release Mode. Developer use release mode for final deployment of source code on live server. Release mode dlls contain optimized code and it is for customers. Release mode has below features: More optimized code. Some additional instructions are removed and developer can’t set a breakpoint on every source code line.


Video Answer


2 Answers

Still not sure why this was only happening with one of the virtual directory applications on the site, but going to the azure portal and clicking "Reset your publish profile credentials" seems to have fixed it.

like image 130
danludwig Avatar answered Nov 15 '22 10:11

danludwig


This happend on VS 2017 when I tryied to update a setting in the profile. The next time I tried to publish, the password was wacked and it started prompting me.

I realized that deleting the profile from within the Publish UI in VS did not work either because all it does is remove the .Pubxml from the project without deleting it from the HD and Source control. Furthermore, if you don't delete the file manually, importing the setting whill leave you hanging; literally.

Again, the solution is to delete the file manually (both from the HD and from source control). Then importing it worked like a charm.

like image 39
RashadRivera Avatar answered Nov 15 '22 11:11

RashadRivera