Go Back   SitePoint Forums > Forum Index > Program Your Site > .NET
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
Reply
 
Thread Tools Display Modes
Old Jul 27, 2003, 22:52   #1
xyuri
SitePoint Wizard
 
xyuri's Avatar
 
Join Date: Jul 2002
Posts: 1,496
Need help compiling

I am trying to compile a function I have into a DLL, But I am new to this and am battling a lot.

Here is the content of "xdb.VB" (The file I'm trying to compile):
Code:
Imports System
Imports System.Data

NameSpace Xyuri_Debug

Public Class DataSet_Debug

	Public Function DSinfo (Use_DataSet As DataSet) As String
		Dim Response As String = "<table bgcolor=""#EEEEEE""><tr><td style=""font-family: verdana; font-size: 12px;"">"
		Dim Tables As DataTableCollection = (Use_DataSet.Tables)
		Dim DTable As DataTable
		Response &= ("<b><font color=""red"">" & Use_DataSet.DataSetName & "</font></b> - ")
		For Each DTable In Tables
			Response &= ("<b><font color=""blue"">" & DTable.TableName & "</font></b> (")
			Dim Columns As DataColumnCollection = (DTable.Columns)
			Dim TColumn As DataColumn
			For Each TColumn In Columns
				Response &= (" <b>" & TColumn.ColumnName & " </b>" & TColumn.DataType.fullname & " ")
			Next
			Response &= (") ")
		Next
		Response &= ("</td></tr></table>")
		Return Response
	End Function

End Class

End NameSpace
And here is my first compilation effort:
Quote:
C:\>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.exe /t:library /r:system.data.dll,system.dll xdb.vb
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

C:\xdb.vb(8) : error BC30009: Reference required to assembly 'System.Xml' containing the implemented interface 'System.Xml.Serialization.IXmlSerializable'. Add one to your project.

Public Function DSinfo (Use_DataSet As DataSet) As String

C:\>
So, I figured that I had to reference the System.xml but then this happens:

Quote:
C:\>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\vbc.exe /t:library /r:system.data.dll,system.dll,system.xml xdb.vb
Microsoft (R) Visual Basic .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322.573
Copyright (C) Microsoft Corporation 1987-2002. All rights reserved.

vbc : error BC31011: Unable to load referenced library 'C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\system.xml': System Error &H8013110e&
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\system.xml : error BC31011: Unable
to load referenced library 'C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\system.
xml': System Error &H8013110e&
vbc : error BC30142: Unable to generate a reference to file 'C:\WINDOWS\Microsof
t.NET\Framework\v1.1.4322\system.xml' (use TLBIMP utility to reference COM DLLs)
: System Error &H8013110e&
C:\xdb.vb(8) : error BC30009: Reference required to assembly 'System.Xml' contai
ning the implemented interface 'System.Xml.Serialization.IXmlSerializable'. Add
one to your project.

Public Function DSinfo (Use_DataSet As DataSet) As String

C:\>
Now, in the Framework SDK it says "Assembly: System.Data (in System.Data.dll)" for the System.XML.

I'm stuck. can anyone maybe shed a lamp on this for me ?
xyuri is offline   Reply With Quote
Old Jul 28, 2003, 06:41   #2
cfm
SitePoint Wizard
bronze trophy
 
Join Date: Apr 2003
Location: New Jersey
Posts: 4,250
Hmmm... if you're specifying System.Xml, .Net will be looking for an XML file. In your command prompt try replacing System.Xml with System.Xml.Dll. That ought to do it. [img]images/smilies/smile.gif[/img]
cfm is offline   Reply With Quote
Old Jul 28, 2003, 17:40   #3
xyuri
SitePoint Wizard
 
xyuri's Avatar
 
Join Date: Jul 2002
Posts: 1,496
AAAAAAAH !!!! My brain is not used to me being this dumb I didnt see a System.Xml.Dll, I only Saw System.Xml. Me looked again and see it, I'll try that first thing when I get home thanks compuwhiz
xyuri is offline   Reply With Quote
Old Jul 29, 2003, 06:15   #4
cfm
SitePoint Wizard
bronze trophy
 
Join Date: Apr 2003
Location: New Jersey
Posts: 4,250
Welcome.
cfm is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 13:12.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved