Setting the deployed project in a multi-project core solution in Azure

Posted by on Nov 16, 2016 in, Azure, Cloud

If you deploy a single project core application to azure everything is about as smooth as it could be. A typical workflow would be to simply create a new web app, set the deployment source (e.g. your git repository) and everything is up and running in a few seconds. If, however, your solution contains multiple projects, how do you specify which project is deployed? Previously this would be done using Azure deployment scripts, but this is a needless effort for such a small task. Just look at the wiki for details on why you may want to avoid this. The preferred way is to specify an Application Setting in the Azure portal. The advantage of this is that you have no deployment code checked in to your source code repository and you can more easily toggle active projects both without deployment and between deployment slots. To do this we need to go to your web app in the portal, click App Settings and create a new App settings key called PROJECT with the path to your project file: However, while this works well with full .net framework applications that use .vbproj and .csproj solutions, at the time of writing core applications still use the soon-to-be-obsolete .xproj system. If you point your app setting to an xproj, you’ll get an error message in the console. A workaround to this is to update the setting to point to the directory of the solution you want to deploy, relative from the root of your source code repository. In .net core land, this is likely to be along the lines of [Solution name]\src\[project name]\ 1 [Solution name]\src\[project name]\ And you can verify this using the very, very handy console (found under development tools in your web app service list). Open the console and cd ..\repository 1 cd ..\repository and from there traverse your way to your folder containing your xproj. Copy that path (from repository onwards) and use this as the app setting: Redeploy your solution, and you should be up and running with your chosen project. Another benefit… Another nice benefit of this approach is that if you use deployment slots, you can toggle projects per deployment slots, making it exceedingly quick to switch projects just by doing a slot-swap in the...

Read More »

Enabling RDP on a Linux instance running in Azure

Posted by on Dec 30, 2014 in Azure

This post is a quick instruction on how you can enable the RDP protocol in an Azure linux instance. Why would you want to do this? Well, although you’ll probably want to SSH into the box for the majority of times, there are instances where GUI access is handy. If, like me, you like to consolidate all your RDP session (I personally use the excellent mRemoteNG ) then having this enabled is useful. Thankfully, getting RDP working on an Azure Linux instance is trivial. In my case, I’ll be using Ubuntu 14.04: Update apt-get to make sure your sources are up to date. If you don’t do this then you’ll get 404 errors in the next step sudo apt-get update 1 sudo apt-get update Once your repository is fully up to date, you can install a desktop. I’ll stick with the default, Ubuntu Unity. I’m not a massive fan of Unity but given the little time I’ll spend in here, it will suffuce. sudo apt-get install Ubuntu-desktop 1 sudo apt-get install Ubuntu-desktop This will take several minutes, so go make a coffee. Once you have a desktop environment installed, you can enable RDP: sudo apt-get install xrdp 1 sudo apt-get install xrdp The last thing to do is to open the RDP port on the Azure firewall. By default it isn’t enabled, so log into the Azure portal, select your Linux VM, go to the endpoints tab and add RDP to the list of open endponts Virtual Machines > Your Linux Box > EndPoints > Add > Add standalone Endpoint > Remote Desktop 1 Virtual Machines > Your Linux Box > EndPoints > Add > Add standalone Endpoint > Remote Desktop Once that is done and the Azure configuration has been applied, you should be set to...

Read More »