Archive for Uncategorized

03 Apr 2012

JSON.NET Strong Naming And NuGet Woes

17 Comments Uncategorized

This post requires a little understanding about how strong naming works. It’s complicated, but basically here is the jist:

When you compile a library against a strong named assembly, only that specific version of the assembly can be used with the assembly that you are compiling with out resorting to heroics. You may say what is the big deal that is how all libraries are compiled and linked. But that isn’t true in .NET, if you don’t have a strongly named assembly, you have for better terms a weakly named assembly.  And with weakly named assemblies there is no enforcement of the version, just the library name.  So this makes it possible for developers to update a referenced library without actually recompiling the original library that referenced it.  This is very powerful in the right hands, and pretty much what makes services like NuGet function with so many intermingling of references between projects.

So once you understand that and it has sort of sunk in.  Now consider what kind of monkey wrench would be thrown in to the NuGet references process if libraries were strongly signed.  Now consider the project that is strongly named is also the 5th most popular project on NuGet with over 125,000 downloads and is one of if not the most interreferenced library in NuGet.  That is a monkey wrench of epic proportions that can cause some real damage isn’t it.

Well you have probably guessed that this isn’t some hypothetical problem by the name of my post. This is an actual problem in NuGet and is causing the community great pains against the ever popular and wonderful library called JSON.NET by James Newton-King. You all have probably heard of it and used it in the past, here is a brief description of it if you haven’t:

Json.NET is a popular high-performance JSON framework for .NET

Features

  • Flexible JSON serializer for converting between .NET objects and JSON
  • LINQ to JSON for manually reading and writing JSON
  • High performance, faster than .NET’s built-in JSON serializers
  • Write indented, easy to read JSON
  • Convert JSON to and from XML
  • Supports .NET 2, .NET 3.5, .NET 4, Silverlight, Windows Phone and Windows 8 Metro.

Now that you understand the scope of the problem and the library involved, consider the fact that the ASP.NET Web Stack is also going to be using this library, so every developer that is going to be using ASP.NET MVC, Web API, or Web Pages is going to be taking on a reference to JSON.NET in the next release of the framework.

I hope you are starting to realize the boondoggle that is being created here.  Because there are some popular libraries that are slow to update because of their development cycles and the maintainers can’t jump on every JSON.NET release every month, and sometimes daily as happened in January 2012.

These monthly releases create undue pressure on the community as a whole especially when this library is one of the most referenced libraries on NuGet. And with the ASP.NET and many other teams in Microsoft moving to NuGet as distribution model, this problem is only going to get worse. And what are the chances that Microsoft is going to want to update the ASP.NET framework monthly and sometimes daily, based on James continuous release cycles.

Don’t get me wrong, I love it when developers are constantly updating their libraries, but because of the scope of JSON.NET’s use, it is creating a burden on the ecosystem as a whole. I am not advocating that James stop updating JSON.NET monthly and daily if he sees fit, what I am advocating is dropping the strong naming of libraries pushed to NuGet. That is why I am writing this blog post and that is why I am hoping you will support me and my effort to get James to stop signing NuGet assemblies.

Please support me and the community as a whole by voting up this request for JSON.NET to stop being signed on NuGet assemblies.

Work Item 22458 : Don’t Strong Name NuGet Assemblies

All that you have to do if you support this effort is to click the vote button on the work item. And leave a comment of support if you have anything to add to what I have said.

Thanks for the help and support.

03 Apr 2012

Mash This Episode 5: ASP.NET Web API and Open Source with Brad Wilson

No Comments Uncategorized

In case everybody wasn’t aware, and to be honest it is really my fault for not announcing this, but I started a podcast with Lee DumondDustin Davis, and Keyvan Nayyeri called the Mash This Podcast which can be found here and on iTunes.

We just released our 5th episode in which we talked with Brad Wilson of Microsoft about his work on the ASP.NET MVC and Web API team now commonly referred to as the ASP.NET Web Stack team.  Our conversation started with us focusing on Microsoft’s major announcement that happened last week regarding the open sourcing and accepting public contributions to the ASP.NET Web Stack. The announcement surrounded the fact that were going to make the process of developing the web stack open source, under the Apache open source license, instead of just releasing the source at major release points like they have done in the past. The difference may be lost on some people, but this means the direction of the framework is now influenced by the community instead of just a select few Microsoft employees and ASPInsiders.

Brad talked to us about what drove this decision with in Microsoft and some of the hurdles they had to over come legally and technically in order to allow people to contribute this source code. I think we are the first podcast to actually talk with a team member on the Web Stack team after the announcement was made, so that was pretty exciting for us. Even I got in on the action and contributed a small patch to ASP.NET MVC that has bugged me since ASP.NET MVC 2.

The patch can be seen here:

And the announcement of the accept request can be seen here by Marcin Dobosz:

After talking about the open sourcing of the Web Stack we dove in to the new ASP.NET Web API, which is a “newish” technology. The Web API was previously known as WCF, but it has been refactored and modernized into what is now called ASP.NET Web API.  The Web API has been designed to be first stop and best framework for creating web based API’s using a RESTful style. We had many questions relating to this new framework and Brad was able to answer them all and gave us many technical details about the design and process that the new Web API adheres to. Listening to Brad talk about the technology behind Web API is going to be very helpful for any .NET RESTful developers out there that will be starting new project soon, so if you have the time I highly recommend this podcast.

This podcast can be downloaded from our episode 5 page. If you’re interested to follow the Mash This Podcast, you can subscribe to our RSS feed or Apple iTunes.

07 Mar 2012

Dealing With 0x0000007B Blue Screen in VirtualBox

13 Comments Uncategorized

One of the great things about VirtualBox is that it allows you to open up, mount, and run any hard drive from the other 3 major manufactures.  VMWare, Microsoft, and Parallels.  However one of the bad things is that there are no automated utilities that just make them work like some of the manufactures provide.  And a common issue that I have always run into, especially when converting from VMWare to VirtualBox is this error.

STOP 0x0000007B INACCESSABLE_BOOT_DEVICE

STOP 0x0000007B INACCESSABLE_BOOT_DEVICE

This error above specifically relates to the fact that Windows really hates you just changing hard drive controllers all willy-nilly, which is essentially what is happening when you switch from one VM to another. Luckily I have found sort of a fail-safe that seems to work in most if not all cases for me when switching to VirtualBox.

Solution

Your default configuration in VirtualBox probably looks something like the following:

However to get an existing hard drive to boot, that has been created with another Hypervisor, I have found you need to have this as your setup to get Windows to boot initially.

The choice of PIIX4 as the Type also seems to be important, but play with the Type first if you fail boot with PIIX4, before giving up.