Monthly Archives: August 2013

Are you missing an assembly reference? Why, yes I am. So kind of you to ask.

Ever pull down the source code for a project, only to find many errors of the “The type or namespace name ‘Optimization’ does not exist in the namespace ‘System.Web’ (are you missing an assembly reference?)” variety?

This just happened to me because I pulled down the Page of Photos source code from github for the first time to a certain dev machine. Not all of the binary library dependencies are checked into github (trying to just check in source code), so how does this happen and how should it be fixed?


In my experience, this usually relates to NuGet packages. There are at least two reasonable solutions.

Solution #1: Capture All Binaries (not recommended)

Check into source control the binaries for those packages your project depend on so they’ll always be there. Personally, that seems so last year, and I don’t take this approach for libraries available through NuGet.

(Having private libraries is no longer a reason to do this either. Check out MyGet,org for a hosted private solution that works fine with NuGet machinery.)

Solution #2: Empower NuGet to Self-Heal

Right-click on the Solution from the Visual Studio Solution Explorer and notice the two NuGet-related options in the pop-up menu. To fix the problem imageat hand in the most convenient manner, simply select “Enable NuGet Package Restore” which is the second of the NuGet-related options.

You will then get an explanation of what’s about to happen:


If you choose “Yes” then NuGet will think for a few seconds before declaring victory:


You might notice there are some new NuGet-related artifacts in your solution.


Now if you again right-click on the Solution from Visual Studio’s Solution Explorer menu, you will notice that the “Enable NuGet Package Restore” menu is gone, leaving only the “Manage NuGet Packages for Solution” option. Select the “Enable NuGet Package Restore” menu to bring up the NuGet management dialog.


Click on “Restore” and your solution should begin to heal itself by downloading the many missing NuGet packages. You can feel the excitement as NuGet thinks it through..


.. and thinks some more ..


.. then – Ta Da! – you suddenly have a bunch of downloaded libraries.


Now your solution will happily compile once more.

Note that this is a one-time & long-term solution since now NuGet is empowered to pull down missing packages whenever needed. (Not “any old packages” of course – just those you’ve added to the projects within the solution.) When you freshly pull down a build (just the source) from source control it helps, of course, but build machines will also enjoy this.


Start Windows Azure Storage Emulator from a Shortcut

When building applications to run on Windows Azure you can get a lot of development and testing done without ever leaving your developer desktop. Much of this is due to the convenient fact that much code “just works” on Windows Azure. How can that be, you might wonder? Running on Windows Azure in many cases amounts to nothing different than running on Windows Server 2012 (or Linux, should you chose). In other words, most generic PHP, C#, C++, Java, Python, and <your favorite language here> code just works.

Once your code starts accessing specific cloud features, you face a choice: access those services in the cloud, or use the local development emulator. You can access most cloud services directly from code running on your developer desktop – it usually just amounts to a REST call under the hood (with some added latency from desktop to cloud and back) – it is an efficient and effective way to debug. But the development emulator gives you another option for certain Windows Azure cloud services.

A common use case for the local development emulator is to have web applications such as with ASP.NET, ASP.NET MVC, and Web API that run either in Cloud Services or just in a Web Site. This is an important difference because when debugging, Visual Studio will start the Storage Emulator automatically, but this will not happen if you debugging web code that does not run from a Cloud Service. So if your web code is accessing Blob Storage, for example, when you run it locally you will get a timeout when it attempts to access Storage. That is, unless you ensure that the Storage Emulator has been started. Here’s an easy way to do this. (Normally, you only need to do this once per login (since it keeps running until you stop it).)

In my case, it was very convenient to have a shortcut that I could click to start the Storage Emulator on occasion. Here’s how to set it up. I’ll explain it as a shortcut (such as on a Windows 8 desktop), but the key step is very simple and easily used elsewhere.

Creating the Desktop Shortcut

  1. Right-click on a desktop
  2. From pop-up menu, choose New –> Shortcut      image
  3. You get a dialog box asking about what you’d like to create a shortcut for:image
  4. HERE’S IMPORTANT PART 1/2: click hit the Browse button and navigate to wherever your Windows Azure SDK is installed and drill into the image
  5. In my case this places the path "C:\Program Files\Microsoft SDKs\Windows Azure\Emulator\csrun.exe" into the text field.
  6. HERE’S IMPORTANT PART 2/2: Now after the end of the path (after the second double quote) add the parameter /devstore:start which indicates to start up the Storage Emulator.
  7. Click Next to reach the last step – naming the shortcut: image
  8. Perhaps change the name of the shortcut from the default (csrun.exe) to something like Start Storage Emulator: image
  9. Done! Now you can double-click this shortcut to fire up the Windows Azure Storage Emulator: image 

On my dev computer, the path to start the Windows Azure Storage Emulator was: "C:\Program Files\Microsoft SDKs\Windows Azure\Emulator\csrun.exe" /devstore:start

Now starting the Storage Emulator without having to use a Cloud Service from Visual Studio is only a double-click away.


It’s Official: New MASS Tax Targets Use of Open Source in Software Consulting Services

Changes to Massachusetts tax policy became law became last week on July 24, 2013. One change included a new tax on “Software Services” involving “prewritten” software. This new tax became effective one week later – July 31, 2013.

I wrote an analysis of that law which generate some really great dialog (see the comments). In my analysis, I was alarmed because I though the intent of the new tax law did not match the wording. I sent my feedback to the Department of Revenue (DOR) asking for clarification. The DOR has responded.

The DOR response has a short overview page that includes a link to an FAQ on the new software services tax that contains the key clarifications. This FAQ is well done and provides a good deal of new, clarifying information in the form of 29 Questions with Answers. (I don’t necessarily like the answers it provides, as I wish the policies were different, but there’s no questioning that they do clear up certain areas of confusion substantially.)

Here is my take on a couple of the FAQ responses that, while very clear, are not the answers I was hoping to hear. The FAQ items cited are included verbatim in blue text.

FAQ Item 5 – Blindsided

FAQ 5. Why were businesses given such short notice of the new tax?

A. The effective date was set by legislation, not by the Department of Revenue. The Department’s TIR 13-10, “Sales and use Tax on Computer and Software Services” was issued one day after the legislation became law.


First, it is important to realize that the DOR was not responsible for writing the law, but they are trying to stay on top of it and issue timely guidance. One day after for the original TIR 13-10 and one week after that for this updated FAQ does not seem unreasonable since drafting answers these questions (many unanticipated by lawmakers) is not a casual endeavor. The authors of the FAQ appear to have taken into consideration lots of input, judging from the breadth of the questions it answers (including a couple of fairly esoteric ones).

This item is not speaking for lawmakers who should still explain how they thought they were acting responsibly by adding “sales tax” to software services where there never was such a thing before and have it become effective within a mere 7 days of becoming law. I did not say “why did they only give 7 days notice” because I don’t see this as giving the community “notice” – most effected consultants and services companies probably don’t even know about it yet – and it really did come out of the blue.

Lawmakers also still need to explain why they did not ask for feedback from the software services community in advance. Then the DOR FAQ could have been ready in advance. And maybe the law could have even been written more clearly. Did they ask for feedback in advance? If the publication of Working Draft Directive 13-XX: Criteria for Determining Whether a Transaction is a Taxable Sale of Pre-written Software or a Non-taxable Service is used as evidence that sufficient notice was given to the software services community, I strongly disagree. That draft was not a sufficient indicator of what was to come.

How the Software Services Community was Blindsided

  1. The publication of Working Draft Directive 13-XX: Criteria for Determining Whether a Transaction is a Taxable Sale of Pre-written Software or a Non-taxable Service is VERY DIFFERENT from the final law.
  2. The draft targeted software services tied to a larger software sale. Consider this key bullet from Directive 1 in the draft: “Pre-written software is bundled with a non-taxable service and sold for a single price, but only where the software constitutes the predominant value of the sale.” I can see this as taxing the services sold to make the software sale possible (think Enterprise Software which often require major integration) and to make it harder for vendors to shift licensing costs to services costs to avoid taxes.
  3. The draft exempted custom software and projects where the services were dominant part of the transaction. Consider these two key bullets from Directive 2 in the draft:  “The seller is providing custom software.” and “Substantial personal or professional services are performed by seller’s employees and are bundled with the use of software and sold for a single price, and such services constitute the predominant value of the sale.”
  4. These seemed to be reasonable & logical criteria for taxation (Directive 1) and non-taxation (Directive 2).  So why worry?
  5. The actual legislation took a major turn and is SO DIFFERENT in its scope and intent that it is not a logical successor to the draft. There is NO WAY our lawmakers can expect a reasonable reading of the draft suggests we might arrive at this final legislation.
  6. And, as mentioned, most impacted software services professionals don’t even know about the draft, the law, or the tax. HOW WERE WE SUPPOSED TO KNOW THIS WAS HAPPENING? How many lawmakers made an effort to socialize this with those of us in the profession? Anyone have any evidence that any outreach happened? Anyone reach out to your professional organization, company, or community group?

FAQ Items 9 and 10 – Taxing Open Source

FAQ 9. How does the new tax apply to use of Open Source software?

FAQ 10. Is Website Design a taxable service?

A9. Open Source software is available free on the Internet. Thus, no tax applies to the transfer of Open Source software where there is no consideration for the transfer. If a seller customizes Open Source software and sells it to one or more customers to be used on any electronic device, that customized software is subject to tax.

A10. The Department understands that website design may be accomplished in various ways. If the website designer is configuring or modifying Open Source (free) code or other prewritten software for the needs of a customer, the designer’s charges to that customer are subject to tax. If the website designer is creating custom software for its customer (that is, not based on other prewritten software), then the charges are not taxable.


I will tackle FAQ items 9 and 10 together here since my reaction spans both, and is one of astonishment. I had expected that the clarification on the tax law would be “oh my goodness, we never intended that, please let me amend that immediately!!” – but that’s plainly not the case.

This new tax law explicitly taxes software services and software consulting whenever “customizing” or “configuring” open source software is involved. This is pretty much every software application that uses open source – which is most software applications.

The tax law does exempt building completely from scratch, but I don’t know of too many projects outside academia or hobbies that would apply to since it is usually a terrible waste of time. The law also exempts just handing over open source software “as is” (if your customer doesn’t want to download it themselves?) – but if you install it for the customer, that service will be taxed (see FAQ item 21 which clarifies that software installation services are taxable).

More generally, the tax on software services is triggered by customizing or configuring any prewritten software – including software that is freely available like open source.

Response – Activism

While my first essay attempted to show how the new tax law was written to be so sweeping, my hope was this would open eyes since I thought the vagueness of the law was unintended. Appears I was wrong.

I encourage everyone to read up on this and stay fact-based. I recommend starting with the most recent DOR short overview page and especially the linked FAQ.

The time has come to get organized and respond. My plans will include:

  • Continue to increase awareness
  • Continue to work with colleagues to plan a course of action
  • Broaden the number of people I am aligning with (I’ll be making some phone calls)
  • I will be contacting (again) my state rep and senator letting them know I believe this is just wrong

What else should I do? What do you plan to do?