Error declaring Dataset in .vb file

cheilchakcl

New Member
The statement: Dim products As New Dataset, in a .vb file<BR>runs into compilation error: error BC30009: Unable to find a reference to assembly 'System.Xml' containing the implemented interface 'System.XmlSerialization.IXmlSerializable'. Add one to your project.<BR><BR>The namespace, System.Data & System.Data.SqlClient are imported. I tried importing the above mentioned namesapces, but still doesn't work. However if "Dim products As New Dataset" is placed in a .aspx file, without the System.Xml & System.XmlSerialization.IXmlSerializable, then it is ok.<BR><BR>.NET SDK beta 2 is installed.<BR><BR>Help......<BR><BR>Thanks in advance,<BR>Ben(1) did you add the brakets at the end of the line ()?<BR> As in .... Dim myDS as New DataSet()<BR><BR>(2) When using Visual Studio, I was able to Dim myDS as New DataSet().<BR>Actually, as I typed NEW the intelisense offered me a list and I select DataSet.<BR>VS7 adds the following references ..<BR>System<BR>System.Data<BR>System.XML<BR><BR>and also (depending on the type of project)<BR>System.Drawing<BR>System.Windows.Forms<BR><BR>So am I correct to assume that your are not using VS7?Yes, u're right. I'm using a notepad to create the .vb file.<BR><BR>I tried <BR>1) Dim myDS as New DataSet()<BR><BR>2) Including "System.XML"<BR><BR>But still doesn't work. <BR><BR>How are you compiling the project? Via the command line? Are you included the necessary dlls?<BR><BR>vbc ... /r:System.Data.dll ...<BR><BR>???The .vb file is compiled via the following statements in a batch file :<BR><BR>set indir=c:inetpubwwwroot est est.vb<BR>set outdir=c:inetpubwwwroot estin est.dll<BR><BR>vbc /t:library /out:%outdir% %indir% /r:System.dll /r:System.Data.dll<BR>
 
Back
Top