The Type or Namespace ‘Linq’ does not exist in the namespace ‘System’

Today I got this error simply adding a master page to a solution, which included a line for ‘using System.Linq’:

“Type or Namespace ‘Linq’ does not exist in the namespace ‘System’.”

The thing is, Linq exists in System.Core, not System. So why the bogus error? Seems like they wrongly put the Linq code into the System namespace. And just how would one know where to find Linq if one didn’t remember it’s in System.Core? You would be reduced to searching Google (which is probably how you got here after all!).

Posted in C#. No Comments »

The name ‘InitializeComponent’ does not exist in the current context

I get this error in my Silverlight projects occasionally and even though my projects still compile this error is annoying. I found a quick fix on the Silverlight forums which worked for me. Click on the xaml file causing the error and change the “Custom Tool” setting from MSBuild:MarkupCompilePass1 to MSBuild:CompileXaml and rebuild. The error should no longer appear. Remember to set the custom tool back to MSBuild:MarkupCompilePass1.

Book Review – Foundation Expression Blend 3 with Silverlight

 

I have worked my way though most of this book and I have found it very helpful in getting started with Blend. In Foundation Expression Blend 3 with Silverlight, Victor Guidioso has assembled an excellent collection of examples that walk you through creating Silverlight applications from scratch using a combination of Blend and Visual Studio. This book is written in a style that emphasizes jumping right in and getting the job done. There are no gratuitous “video in a button” type examples here but examples based on the types of projects you are most likely to write. I found an error in the book which had a bad link for a source code download URL so I sent an email. To my surprise, not only did I get a reply email notifying me the link was fixed, Victor called me to let me know. You can’t ask for anything better than that! Anyway, I found this book extremely helpful in getting started writing Silverlight applications with Blend and I think you will too!