I have a SQLCLR project in VS2015, it is set for .NET 4.5.1 and SQL Server 2016. It uses System.Xml.Linq
.
When I build the project I get errors saying:
The type 'System.Xml.IXmlLineInfo' is defined in an assembly that is not referenced.
and suggests loading System.Xml 4.0.0
.
When searching I found sites saying that I had to add a reference to System.Core
as it contains System.Xml
, so I did it but still get the same error.
Any ideas?
I removed the references to System.Xml and System.Core, cleaned the solution, closed VS, opened VS, and added System.Xml and System.Core and the error went away. The error still appears in the error list but no longer makes the build fail. Odd.