Skip to main content

Posts

Console Application fails on Windows Azure

Last week I was trying to add a console application as a startup task to a Windows Azure project. However each time the startup task was executed it failed with the following error “Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.” It took me some time to figure out that the issue was caused by the Microsoft.WindowsAzure.ServiceRuntime dll which is a mixed mode assembly. When I  commented out some code and removed this DLL reference, everything worked. So what can you do to solve this error? Option 1: Compile your application against the .NET 3.5 framework instead of .NET 4.0. Option 2: Add a "useLegacyV2RuntimeActivationPolicy" to the startup tag generated in the default app.config: <startup useLegacyV2RuntimeActivationPolicy="true"> The useLegacyV2RuntimeActivationPolicy attribute is required for referencing any mixed mode assembly.

Fun Scrum story: Enable and equip your product owners

With the commercialization of Scrum and way too many Scrum but… implementations, I’m happy to read that there are still successful Scrum stories out there. Let me show you one picture from the article: Curious about what’s going on? Read the full story at http://agilescout.com/enable-and-equip-your-product-owners/ .

The power of jQuery: 50 impressive tutorials

Thanks to jQuery, I’m having a renewed interest in Javascript development. Although not everything is as obvious as I would like in Javascript, I’m really loving the way that jQuery simplifies the client side development experience. Last week I found the following link with 50 jQuery tutorials, all amazing samples of the power that jQuery offers to the user.  I’m really impressed about some of the samples and the introduction of HTML 5 will push the limit even further. Some of the samples: Check them all out here: http://css.dzone.com/articles/50-fresh-jquery-tutorials-2011

Building Azure solutions on your build server

Out-of-the-box building your Azure projects on the build server will fail. You probably get an error like below: c:\builds\AzureProject\AzureProject1.ccproj(57,11): error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\Cloud Service\v1.0\Microsoft.CloudService.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. Probably the easiest solution is to install the Windows Azure SDK on your build server. However the SDK installer checks if some components like Visual Studio, IIS, … are available on the server. You can start to install all these components, but then you are polluting your clean build environment. So what is a (better) alternative? The solution we used was to just copy the necessary files and components. This means: Copying the files under  C:\Program Files\MSBuild\Microsoft\Cloud Service\v1.0\ to the same location on your build server.( Program Files(x86) ...

Copy a DLL from the GAC

Need a DLL but you don’t know the exact location? Instead of searching through all your folders, just extract it from the Global Assembly Cache(GAC). Open a command prompt(as an administrator) run > cmd Navigate to assembly and gac folder cd windows\assembly\gac Navigate further down to the desired assembly > dir <assembly name initials> cd <assembly name> Keep on doing this until you find the required .dll file Then copy it copy <assembly dll> C:\temp\ Simple and effective!

Pinify

IE9 contains a nice feature, called Pinned sites . Pinned sites unlock a new set of tools— Favicons , Notifications , Jump Lists , and Thumbnail Toolbars for your IE 9 site inside Windows 7. Although not really a platform independent feature, I still like it. With just a few lines of HTML or JavaScript code , you can use these tools to take advantage of the full power of the PC and extend the web experience beyond the browser and onto the Windows 7 taskbar. If these few lines are still too much for you, have a look at Pinify . It’s a jQuery plugin that simplies the process of adding the pinning functionality to your website. And what’s even nicer is that it does all the browser compatibility checks for you. A quick code sample: <script src="Scripts/jquery-1.5.2.js" type="text/javascript"></script> <script src="Scripts/jquery.pinify.js" type="text/javascript"></script><script type="text/javascript">...

Deploy ASP.NET MVC 3 application to Windows Azure

Although I had installed ASP.NET MVC applications on Windows Azure before, I had some problems last week getting everything up and running. The problem was that I switched from the WebForms view engine to Razor. It seems that Razor requires a lot of extra DLL’s that should be installed on your web role. So to simplify this process next time, a reminder for myself. If you are using ASP.NET MVC 3 together with Razor, check that following references are added: System.Web.Mvc.dll Microsoft.Web.Infrastructure System.Web.Helpers System.Web.Razor System.Web.WebPages System.Web.WebPages.Deployment System.Web.WebPages.Razor Afterwards check that “Copy Local” is  “True” for all above modules, like as below: