Skip to main content

Posts

Showing posts with the label .NET Errors

TFS Build Error Copying Silverlight XAP file

I was trying to automate build for Silverlight project using Team Foundation Server and build was failing with the following error. Copying my.xap file failed. Access to path '..' denied. Digging deep in the build log, I found that this is happening while copying the source files from TFS to the build folder for compilation. Since xap is an output file it is not required during the compilation. I avoided the download/copy of the xap file by denying access to the build agent. The steps are mentioned here .

The type 'System.Xml.IXmlLineInfo' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'

I have been getting this weird exception out of nowhere while compiling my solution. Turns out I had two projects in my solution using different System.Xml assembly. One using straight from .NET Framework 2.0 and other using assembly 2.0.5.0. ( from Silverlight runtime). Referenced path were C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll & C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.Xml.dll respectively. If a project file does not specify the exact reference assembly, compiler tries to use any matching assembly present in its cache. I could see the following reference in my csproj file. <Reference Include="System.Xml"/> I updated this reference with the correct version (along with the PublicKeyToken and Culture info) and made the SpecificVersion=True, enforcing compiler to use the specified assembly <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934...