Search code examples
c#azurevisual-studio-2015database-first

Visual Studio 2015 version 3 freezes on editing Roles in Azure project


I'll preface this with the fact that I'm very new to Visual Studio, so I am prepared to hear that my problem lies in something I haven't read yet.

I have a database first project in Visual Studio 2015 v.3 that I am attempting to publish to an existing Azure account and resource group.

I have successfully converted it to an Azure project via the menu options: Build > Publish to Microsoft Azure.

I can successfully build both the local and the Azure projects without error, but whenever I attempt to edit the Roles in the Azure project to add the Azure connection string as per the tutorial found here, the program hangs up irretrievably. This makes my twelfth attempt to edit the Roles.

It took Visual Studio five tries to publish to Microsoft Azure using the menu options above.

To fix this, I have tried all of the following:

  1. Restarting my computer

  2. Restarting my Azure connection

  3. Restarting Visual Studio

  4. Confirming Visual Studio's connection to the Azure account I want to publish to

  5. Checking to be sure my Azure SDK (version 2.9.1) and Visual Studio (version 3) installations are the most recent versions and that the installation appears to be clean

  6. Removing the Azure portion of the project, cleaning and rebuilding the local solution, and reattempting to publish to Azure

  7. Cleaning and building both solutions before attempting to edit the Roles for the Azure portion of the solution

  8. Confirming that the resource group I am attempting to publish to does exist at the specified connection string and contains the necessary resources (in this case, a server and an SQL database)

  9. I am attempting to connect (for now) with HTTP and not HTTPS, as per other similar questions about Visual Studio 2015 freezing while publishing to Azure

  10. Confirming that I am able to connect remotely to Azure via Visual Studio (this is probably a gimmie, but it doesn't hurt to be specific)

I also notice that when I attempt to browse the Azure features on the menu to the left of the Visual Studio window, Visual Studio freezes (particularly if I click on the links for Data Factory, Mobile Services, Service Bus, and Virtual Machine).

Server Explorer is showing that I am logged in to Azure with the account I'm attempting to publish to.

I can reach, read, and edit the local database files. I can also run the local project without error.

The application was configured to use an IIS Web Server and uses SQL Express. It froze repeatedly while attempting to change configurations from the IIS Express and LocalDB default to IIS Web and SQL Express.

I do have the application backed up locally as well as via a private GitHub repo just in case I manage to bork it permanently trying to do this.

I would very much appreciate the help.

edited to add: I'm currently running Windows 10.

edited again to add: The task manager shows the load to memory and CPU during the period when Visual Studio is frozen to be less than 15%, the majority of which is not Visual Studio. It shouldn't be a hardware issue, but I did try closing the majority of the background services that were non-essential just in case there was some sort of conflict occurring.


Solution

  • Making this an answer instead of a comment because while it may be a silly oversight, there's bound to be someone who would benefit from the answer.

    The problem was that I was working from a local copy of a remote database. When it came time to push up to the remote, I deleted the local copy and data interface model, and reconstituted the model on the remote database, creating several connection strings in Web.config.

    When I attempted from there to publish, Visual Studio read the connection strings in the Web.config for the project and attempted to hunt down the local and over-write the remote database.

    Removing all other connection strings from the Web.config for the project removed many of the problems with freezing and hanging that I was experiencing (and made the project run faster by resolving the search for associated project resources.)

    Lesson learned: make sure you clean your Web.config file before attempting to push to remote.