VS 2013 hangs when publishing website to Azure cloud service - c#

I have a website in C# Visual Studio 2013, which was developed by another developer and is hosted on Azure cloud service. Whenever I make any changes and try to publish, Visual Studio hangs and I can't publish it. It is not showing any error message. Besides that I can successfully deploy it by building it, but as it's taking too much time and also costs money to client (as VS Team Services only provides monthly 60 minutes of free build, after that clients get charged for extra minutes). I am using following steps for publishing and it's works fine but after publishing starts Visual Studio hangs and is unresponsive.
The steps to publish the website are as follows:
1) Open the solution in visual studio.
2) Right click on the azure project in the solution explorer, and select publish.
3) The first step in the wizard is to sign in, make sure to select your credentials.
4) The next step is settings, make sure environment is set to production and build configuration is set to release, then click next.
5) The final step is a summary, simply click the publish button.
I am very new to Azure so let me know if I need to make any setting during set up my project.

I hit the same problem after installing the 2.8 SDK and tools. After checking out these answers I still had the problem, but found a solution.
Right click the Azure project in the VS2013 solution explorer, open project properties. Go to the application tab, and there's an "Upgrade" button to upgrade the project to the latest SDK. That did the trick for me.

It sounds like you are doing the right steps to deploy using the wizard. However I don't have enough information to know what would cause this to hang. There are some documentation details about the wizard that might help? https://msdn.microsoft.com/en-us/library/azure/hh535756.aspx
There are other ways to deploy to Azure, which may solve the issue. You can for example download a publish settings profile, and use this to deploy instead of the wizard. Details here: http://blogs.msdn.com/b/avkashchauhan/archive/2012/05/10/downloading-windows-azure-publish-settings-subscription-configuration-file.aspx
Or you can deploy continuously from Git - https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/#Step75
Both solutions will require some tinkering in the Azure portal or getting in with PowerShell but there's a lot of ways to deploy.

Doing these two things fixed it for me, not sure which:
Clean build
Server Explorer > (Had to re-enter Azure credentials)
VS2013 update 5.

A related post found here..
https://social.technet.microsoft.com/Forums/virtualization/en-US/4e51b1f0-91c3-4ce9-9a15-a8d10f912c5b/publish-cloud-service-causes-visual-studio-2013-to-hang-crash?forum=windowsazuredevelopment
One user was able to get past the publish freezing by doing the following..
So I did a line-by-line comparison between all of the files in that
new project and everything in my existing one and found only two
possible things wrong:
1) The version stamps (dates, really) in my
files were not upgraded to reflect the latest version of the Azure
tools. I manually changed those in my existing project to match the
garbage test project's date stamps.
2) My XML files had some empty
sections that did not exist in the new project's files, so I simply
removed those empty sections.
3) Beyond that, I also deleted my *.user
file.
Specifically, I was able to remove schemaVersion="2014-06.2.4" from my ServiceConfiguration and ServiceDefinition files and it fixed the issue.
My guess is that your installed sdk version is different than the specified schemaversion.

I tried all above methods none worked for me. So this is for people who already tried above and still couldn't make it work.
=> Publish in Release mode :-)
Yes I was trying to publish in Debug mode which was causing it to hang till death ;-)

Related

Unable to build project after new windows install

I recently bought a new computer. After getting everything setup, I installed visual studio community 2019 and gitkraken and cloned down my project(which was building and running fine prior to changing computers) and I'm running into an issue. It's a game dev project using MonoGame.
These are the errors that I'm receiving currently. I've tried multiple versions of MonoGame including 3.0, 3.5, and 3.7. I've attempted to reinstall redistributables, I've cloned into multiple directories, I've attempted building a different project(a fork of the same project that I've worked on more recently on my previous pc). I have a friend that works on the project with me, he was able to clone into a new directory and build immediately. I've attempted building the content package in the MGCB manually and am also running into an issue where it's not finding a specific font file(that i've verified is installed on my computer, and also tried dropping in the correct directory for building, but have had no luck there. However, I feel like this is a separate issue, but it may provide some insight to someone who is more experienced than I.)
Ideally, this project should clone down and build just fine on a fresh install. It always has before, but there's something going on here that I'm not sure about. I've tried several different things and have hit a wall. There isn't much online about this specific issue that I've seen, so if anyone has any ideas I'm all ears. Thanks.
I figured out the issue. It was something simple as usual, a product of my own stupidity. When I first downloaded the font, I extracted and right click > install. So the font was installed on the PC. I spent a couple days on this issue, and at some point when trying to reinstall the font there was a new option that hadn't been there before called 'Install for all users' with the shield icon next to it. Previously, I'd only had the option to 'Install' without the shield icon. Not sure exactly what the difference is between these two options showing up, but once I clicked 'Install for all users', the issue was solved. So I guess initially the font was only installed for my specific user account. I'm not sure why this is an issue or why the option to install for everyone wasn't available previously, but this is what solved the problem.
Change the Build Action on the "Content-> Content.mgcb" file to "none" or "ignore"(I can't remember which). This will allow the game to build successfully.
Here is a temporary work around to allow you to continue development:
If the XNB files are not properly building in the Pipeline tool, you can copy them(from an older build or compile them on another machine) into the output directory, Content directory under the directory containing the .exe file, manually.

VS2015/ASP not updating iis express files

I have an issue which I believe is IIS Express related. I am making a Web App with ASP Web Forms(I know I should be using MVC, but for this project, Web Forms was specified as required). Whenever I build it opens the url http://localhost:53605 and loads the website. The problem is the copy is showing is old, this started happening yesterday, I haven't installed any updates to VS or Windows.
Things I have tried:
Disabling Chome Cache
Using another browser
Change the IIS Express build url (This works, for ONE build and then it's back to the same issue)
Delete the /bin & /debug folders
Does anyone have a solution to this? I can just change the build URL everytime, but anyone who had made an ASP Web App will you rebuild 100's of times a day...
Thanks
If IE setting is OK, then set vs setting
Go to Tools-Options
Under Projects and solution ->
Build and Run select "Always build" under "On Run, when projects are out of date"
For Chrome VS debug, refer

How to deploy a compiled application without Visual Studio?

When I open a sample Blinky application in Visual Studio, compile and run it, it gets automatically deployed to the target configured WindowsIoT device. After that, on Windows 10 machine where I compile it, the application binaries are located in the bin sub-folder of the project folder as one would expect.
I would like to automate the deployment, so that I could run deployment code
without Visual Studio, specify target device and the binaries location and it would deploy it. I cannot find any API that allows
to deploy apps to Windows IoT, how do I do that?
This shiny Windows IoT stuff is a new area, and there is not a lot of info available apart from the samples and the getting started page. Any pointers are appreciated.
Update: As noted in comments, once one start thinking of mass production, they will probably need to conciser ICD. This, is not, however the problem I'm trying to solve currently. I would like to figure out how I can provide Over-the-Air updates to my UWP application running on Raspberry Pi and Windows IoT. I also would you like to know how I can automate build / deployment in general, but that may be automatically solved if I have a proper OTA solution.
There is a set of instructions on how to do it, which can be found in the same github repo you are linking in your question, but in a different folder. Note, that you need an appx for these instructions to work, and it's not created by the solution build by default.
This page provide (non IoT specific) instructions on using VS to build the appx. And this blog post talks about the command line tool that can be used for making appx.
Note, that the last two links are also talking about publishing an application to app store, so you'll need to make some mental adjustments around that.

Cannot Publish Project to Azure, Publish Option Not Available

i'm just starting to play around with azure, I'm going through the tutorial for XamarinIOS. When I get to the step to publish, I cant even get the publish option available when I right click its just not there. Im using Visual Studio Ultimate 2013.
Heres the link to the tutorial.
http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-xamarin-ios-get-started/
I get all the way to Publish your mobile service step.
I do get a warning when I build, look below.
Warning 1 Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190.
You need to make sure you have downloaded the PublishSettings file first before you can deploy. This is shown in Step 2 of the "Publish your mobile service" on the page you linked to. If you don't have this file the publishing framework won't know where to deploy your mobile services code to.

Can't add Connected Service to a MVC Project targeting .Net 4.5.1

I'm trying to get started with a MVC project that consumes the Office 365 API. I have a MVC project targeting .Net 4.5.1 ready. When I try to add a Connected Service, I can't seem to find that option in Visual Studio.
The extension is installed and I've restarted VS, as mentioned.
I've tried the same with a Windows Store App for Windows 8.1 and got the same result.
I found an answer to a similar question under the Office 365 API Tools page's "Q and A" section provide by Michael Zlatkovsky (MSFT), he suggests:
Close Visual Studio 2013
In Windows Explorer, navigate to C:\Users\\AppData\Local\Microsoft\VisualStudio\12.0\Extensions\
There should be a list of folders there, with names like "qsn5xrd4.5al" (each installation will have different names). Find
the folder that has "Microsoft.Office365ApiTools.dll" within it.
Once you've identified the correct folder, find the file "Microsoft.VisualStudio.ConnectedServices.Contracts.dll", and either
delete, move, or rename it. This particular file is not needed for
the add-in to run, but its presence can cause the issue on certain
machine configurations.
Re-open Visual Studio and try again.
and in case it didn't solved the problem:
try deleting
"C:\Users\\AppData\Local\Microsoft\VisualStudio\12.0\ComponentModelCache"
(I would recommend moving it to the desktop or otherwise making a
backup, just in case). This should flush the cache, and force VS to
re-load the add-in -- now with loading
"Microsoft.VisualStudio.ConnectedServices.Contracts.dll" from its
central location.

Categories