While I was working with the Open Office XML SDK 2.0, after I added the reference to the DocumentFormat.OpenXml assembly and tried to build the application I ran into this error message.
The type ‘System.IO.Packaging.Package’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘WindowsBase, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35’
Turns out, all you need to do to fix it is to just add another reference to WindowsBase assembly that is found in the .NET Tab.
I was told to generate an XML Schema of an SQL Server 2005 Database. And naturally I started googling it out so I found this at a blog given by the URL at the bottom.
Thumbs up to ya my friend!
create table Person
Age int not NULL check( Age > 0) ,
Height numeric(10,2) not NULL check( Height > 5),
Gender varchar(5) not null check( Gender in (‘M’, ‘F’, ‘O’)),
BirthDate datetime null,
DECLARE @schema xml
SET @schema = (SELECT * FROM Person FOR XML AUTO, ELEMENTS, XMLSCHEMA(‘PersonSchema’))