Windows Azure SDK 2.0 missing in cloud service? - azure

We just upgraded from the Windows Azure 1.7 SDK to 2.0.
This created a lot of problems in the codebase, but we got them ironed out and running locally.
Now when we try to publish to our cloud service machine in Azure, the worker role keeps trying to run but can't start.
My guess is that the cloud service machine is missing the 2.0 SDK.
Is there some way to install this manually on the remote machine? I can RDP and I've been looking around, but I can't seem to a) Verify which version it's trying to use and b) How to install a newer SDK.
I've found some errors about the worker role not running, but they're pretty uninformative.

The solution ended up being pretty simply, but I imagine other people will run into this problem.
We had 5-7 projects all referencing Azure SDK 1.8. Specifically these libraries:
Microsoft.ServiceBus
Microsoft.WindowsAzure.Configuration
Microsoft.WindowsAzure.Diagnostics
Microsoft.WindowsAzure.ServiceRunTime
Microsoft.WindowsAzure.StorageClient
If the project is a cloud service project, you need to right click on the project, go to properties, and upgrade the project. This changes the deployment when publishing. It will create the Azure VM based on the cloud service Azure SDK version. I missed that at first.
All the libraries above need to be upgraded to SDK 2.0 in all projects. Initially I missed some projects that were dependencies - and missing the Microsoft.ServiceBus library.
The last part was moving from Microsoft.WindowsAzure.StorageClient to Microsoft.WindowsAzure.Storage. I guess for SDK 2.0 they changed the library name, which has also introduced some breaking code changes.
After all that the cloud service now publishes correctly. Whew.

Related

Switching one Azure App Service's codebase for different one after .NET Core version rewrite

We have a .NET Core 2.1 Web App on Azure as an App Service. We deploy it to Azure via Visual Studio 2017's publish option (though it is also in a Git repo). It has a bunch of custom domains and SSL on all of them provided by Azure.
We've written a new version of the web app in .NET Core 3.1, in VS 2019. Identical functionality but written from the ground up rather than trying to upgrade the existing 2.1 version.
There's no staging version online as such - instead we develop on local machines and then just use test domains online that use the same service but where the environment is switched to use dev DBs and bucket locations etc, which is one of the reasons to write a new app rather than upgrade it, also, it just seemed cleaner and I saw that people had some issues when doing upgrades...
Is there an easy way to switch/publish the new web app/code into the current Azure App Service, to replace the old one? Or will I need to create a new App Service and then create all the custom domains, SSL etc there after removing them from the old one?
Or could I perhaps switch to git deployment and push the entire new project in over the old one - would that work or just create some kind of disaster?
There is usually no issue when pushing a new application version to your app service, even if it uses a new version of .NET Core.
You have to consider two things:
Windows AppService Plan: .NET Core 3.1 runtime has been rolled out worldwide, while the SDK has not (yet). When in doubt, use self-contained deployment.
Linux AppService Plan: You need to select the desired runtime version in the portal. Using e.g. Azure Pipelines you can set the runtime version at the same time as you publish the new version. Not sure how VisualStudio handles this.
As a general recommendation, you should follow silents suggestion of using slot deployments to have as little impact for your customers as possible. Each slot can have e.g. a different .NET runtime version, so you can test everything on the staging slots.

Updating Azure Cloud Service to OS family 6

I am using Azure DevOps to deploy a .Net Web Application. I wanted to update to the new Os Family which is based on Windows 2019 so i can Update my projects to .net framework version 4.7.2 as seen here. I have updated my cloud service configuration '.cscfg' file to osFamily="6" but when i try to deploy the app even though the Build succeeds i get this error when i reach the Release step in Azure pipeline:
The OS family 6 you are trying to deploy is not supported by the SDK package. The SDK package supported OS families:3,4,5,1,2,98,97. Please try to deploy to a different operating system. To do this specify a different osFamily and/or osVersion in your .cscfg file.
I am using the Hosted VS2017 agent.
According to the error information it indicates that the OS family 6 are not supported by Hosted VS2017 agent.
Based on the link you mentioned that Compatible SDK versions should be Version 2.9.6+.
So my workaround is that you could use the Self-host agent with latest Azure SDK installed. We could download the latest Azure SDK from this link.
or you could have a try to install the Azure SDK on the Host 2017 agent (without test)
You also could give your feedback to Azure Devops team.

How to deploy netbeans app in MS azure

I made this java project in netbeans (it has a gui and uses files serialization) I have searched in the web for ways to deploy netbeans applications on azure however it seems that only eclipse has that feature. Thus, I am wondering if there is any way or method to deploy a netbeans application on MS Azure?
Microsoft provides a plugin for Eclipse for packaging Java applications for deployment as Windows Azure cloud services. This plugin is not available for Netbeans.
An alternative would be to deploy to a Windows Azure virtual machine instead of a cloud service. See instructions at How to run a Java application server on a virtual machine.
Another alternative would be to use a third-party tool such as Cloudify for Azure.
You can only create Cloud Service via the Eclipse enter link description here or via MS VS.
But you can still use NetBean to develop your application and use Eclipse/VS to manage your Cloud Service package. The package will contain the app server, its configuration and your wars/ears.
To make you life easier, you can update your Cloud Service package to download the application archive (and the app server and its configuration) from blob storage. This way no need to create a new complete package when the app is updated, you only need to upload the new war/ear and restart the instances. This will greatly increase your development efficiency.
you can do it in 3 steps
1) update your netbeans to version 7.4 and above
2) push you project to github repository
3)publish your web app from the github repository you just updated.

Azure build fail with TFS hosted buildserver: Windows Azure Tools\2.0\Microsoft.WindowsAzure.targets" was not found

Im new to Azure and wanted to create a Continuous Integration build using TFS. I created a build definition but building my Cloud App with simple website using a hosted buildserver in the build definition fails with error:
C:\a\src\myAzure\myAzure\myAzure.ccproj (70): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.0\Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
I can however build locally, and manually Publish to Azure and it will deploy fine.
Im suspecting that the hosted buildserver of TFS does not support Azure 2.0?
Is there a way around this problem or will I have to forget the idea of using CI?
Seems to be so since the Build is a preview feature of the Team Foundation Service. There was the same thing with Azure SDK 1.8, but they updated the Build Servers in a couple of days. Hope that it will not take long this time.
UPDATE:
"No, TF Service hosted build machines do not have the new SDK 2.0 at this time. We expect all users to have Azure SDK 2.0 support post June 1st. In the meantime you will need to use an on-prem build controller with the bits you need and deploy to Azure from there."
(C) Trevor Hancock from Microsoft
http://social.msdn.microsoft.com/Forums/en-US/azuretfs/thread/2df796d5-1abb-4b89-a571-0b7a62b80d55
UPDATE 2:
I've managed to complete a successful build using TFS build servers with SDK 2.0 So I think this problem is resolved for now. In future I recommend not to do updates to new versions of Azure SDK until the TFS build servers are ready.

Unable to reach watchdog.servicebus.appfabriclabs.com

I'm deploying a few Azure services to the Cloud and they fail with the following error, "Unable to reach watchdog.servicebus.appfabriclabs.com" when tryng to connect to the ServiceBus.
When I ping this host the address cannot be resolved. However, when I ping watchdog.servicebus.windows.net this is resolved.
Is there an explicit way to make my services use watchdog.servicebus.windows.net instead? Something wrong with my subscription maybe?
This is likely due to using the CTP/Labs version of the Microsoft.ServiceBus.dll. For Azure production environment you should be using version 1.0, 1.5 or 1.6 corresponding to Azure SDK versions. It appears that you have a version that is targets the LABS environment and may be versioned 2.0/99 etc.
You can obtain the latest ServiceBus client dll from NuGet or downloading the Azure SDK. Another thing to check for is if you have any servicebus.config file in .NET config directories that may be pointing to the LABS environment, more details on that are here.

Resources