Search This Blog

December 13, 2012

Fixed TFS 2010 Build Error – The type or namespace name does not exist in the namespace


This morning when I came to the office, I saw many check-ins from developers last night  and TFS build in DEV environment complained about the following error . The build failed.

MainPage.xaml.cs (21917): The type or namespace name 'XmlSerializer' does not exist in the namespace 'System.Xml.Serialization' (are you missing an assembly reference?)




When I used Visual Studio 2010 IDE to open the solution file and build the solution, there was no issue.  Using MSBuild command line to build the solution in my local machine had no issue at all.

When I unloaded Project and edited Project file, I didn’t see the following file (yellow part) in the project file.

<Reference Include="System.Xml.Serialization, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <HintPath>..\Lib\System.Xml.Serialization.dll</HintPath>   
    </Reference>

After adding it and pushing a new build again, the build succeeded.

No comments: