Hello
I upgraded my project from Visual Studio 2003 to 2005. The upgrade was
performed with no errors but now when I try to build my project (now it's in
..NET 2.0 not .NET 1.1 as was previously) I always get the following error:
Error 1 The type 'System.Xml.Serialization.IXmlSerializable' is defined in
an assembly that is not referenced. You must add a reference to assembly
'System.Xml, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.
C:\Inetpub\wwwroot\EuroAdresPanels\FirmaFree.cs 26 21 EuroAdresPanels
What is funny I have got a reference to System.XML.
Below is the snippet of my code (the problematic is a line with private
DataTable TKon;):
using System;
using System.Diagnostics;
//\gjo
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace EuroAdresPanels
{
public class FirmaFree : System.Web.UI.WebControls.WebControl
{
private string NazwaFirmy = "";
private int id;
private DataRow[] RAdresy;
private DataTable TKon;
private DataTable TWoj;
private string emial = "";
//gjo
private DataTable TBranze;
private DataTable TSlowa;
//flaga mowiaca czy wyswietlamy tylko jedna firmy
public bool IsAlone = false;
//\gjo
public string ConnString = null;
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty,
DataTable TWojewodztwo, string miasto, int woj)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = false;
this.TSlowa = null;
this.TBranze = null;
}
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty,
DataTable TWojewodztwo,
string miasto, int woj, DataTable TBranze, DataTable TSlowa, string
ConnString)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = true;
this.TSlowa = TSlowa;
this.TBranze = TBranze;
this.ConnString = ConnString;
// this.IsAlone = SprawdzMaxBranz();
}
Any ideas how to deal with it?
Best Regards
Darek T. 4 12754
Dariusz,
Having a "using System.Xml" directive is not the same as having a reference.
For that, you must use the Add Reference item from Solution Explorer, and
explicitly choose the assembly System.Xml from the .NET Tab list.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Dariusz Tomon" wrote:
Hello
I upgraded my project from Visual Studio 2003 to 2005. The upgrade was
performed with no errors but now when I try to build my project (now it's in
..NET 2.0 not .NET 1.1 as was previously) I always get the following error:
Error 1 The type 'System.Xml.Serialization.IXmlSerializable' is defined in
an assembly that is not referenced. You must add a reference to assembly
'System.Xml, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.
C:\Inetpub\wwwroot\EuroAdresPanels\FirmaFree.cs 26 21 EuroAdresPanels
What is funny I have got a reference to System.XML.
Below is the snippet of my code (the problematic is a line with private
DataTable TKon;):
using System;
using System.Diagnostics;
//\gjo
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace EuroAdresPanels
{
public class FirmaFree : System.Web.UI.WebControls.WebControl
{
private string NazwaFirmy = "";
private int id;
private DataRow[] RAdresy;
private DataTable TKon;
private DataTable TWoj;
private string emial = "";
//gjo
private DataTable TBranze;
private DataTable TSlowa;
//flaga mowiaca czy wyswietlamy tylko jedna firmy
public bool IsAlone = false;
//\gjo
public string ConnString = null;
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty,
DataTable TWojewodztwo, string miasto, int woj)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = false;
this.TSlowa = null;
this.TBranze = null;
}
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty,
DataTable TWojewodztwo,
string miasto, int woj, DataTable TBranze, DataTable TSlowa, string
ConnString)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = true;
this.TSlowa = TSlowa;
this.TBranze = TBranze;
this.ConnString = ConnString;
// this.IsAlone = SprawdzMaxBranz();
}
Any ideas how to deal with it?
Best Regards
Darek T.
Hi,
using System.Xml;
does *not* mean you'd have reference to System.Xml.dll assembly. It means
you are just importing that namespace, trying to shortcut the need to type
fully-qualified names of types residing in System.Xml namespace.
Namespaces are logical concepts, and they don't necessarily always go hand
in hand with assemblies. For example: System.Configuration namespace spans
two assemblies: System.dll and System.Configuration.dll
So, try taking the reference in VS with Add reference dialog (/right-click
project in solution explorer)
--
Teemu Keiski
AspInsider, ASP.NET MVP http://blogs.aspadvice.com/joteke http://teemukeiski.net
"Dariusz Tomon" <d.*****@mazars.plwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hello
I upgraded my project from Visual Studio 2003 to 2005. The upgrade was
performed with no errors but now when I try to build my project (now it's
in .NET 2.0 not .NET 1.1 as was previously) I always get the following
error:
Error 1 The type 'System.Xml.Serialization.IXmlSerializable' is defined in
an assembly that is not referenced. You must add a reference to assembly
'System.Xml, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.
C:\Inetpub\wwwroot\EuroAdresPanels\FirmaFree.cs 26 21 EuroAdresPanels
What is funny I have got a reference to System.XML.
Below is the snippet of my code (the problematic is a line with private
DataTable TKon;):
using System;
using System.Diagnostics;
//\gjo
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace EuroAdresPanels
{
public class FirmaFree : System.Web.UI.WebControls.WebControl
{
private string NazwaFirmy = "";
private int id;
private DataRow[] RAdresy;
private DataTable TKon;
private DataTable TWoj;
private string emial = "";
//gjo
private DataTable TBranze;
private DataTable TSlowa;
//flaga mowiaca czy wyswietlamy tylko jedna firmy
public bool IsAlone = false;
//\gjo
public string ConnString = null;
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty,
DataTable TWojewodztwo, string miasto, int woj)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = false;
this.TSlowa = null;
this.TBranze = null;
}
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty,
DataTable TWojewodztwo,
string miasto, int woj, DataTable TBranze, DataTable TSlowa, string
ConnString)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = true;
this.TSlowa = TSlowa;
this.TBranze = TBranze;
this.ConnString = ConnString;
// this.IsAlone = SprawdzMaxBranz();
}
Any ideas how to deal with it?
Best Regards
Darek T.
Peter,
As I wrote I had the reference (in the solution explorer). I had also it in
using clause.
My problem was about having to projects in my solution and I had reference
in the wrong project. Now I added reference to the right one and it works as
expected.
Thank you very much.
Darek T.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:9D**********************************@microsof t.com...
Dariusz,
Having a "using System.Xml" directive is not the same as having a
reference.
For that, you must use the Add Reference item from Solution Explorer, and
explicitly choose the assembly System.Xml from the .NET Tab list.
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Dariusz Tomon" wrote:
>Hello
I upgraded my project from Visual Studio 2003 to 2005. The upgrade was performed with no errors but now when I try to build my project (now it's in ..NET 2.0 not .NET 1.1 as was previously) I always get the following error:
Error 1 The type 'System.Xml.Serialization.IXmlSerializable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Inetpub\wwwroot\EuroAdresPanels\FirmaFree.cs 26 21 EuroAdresPanels
What is funny I have got a reference to System.XML.
Below is the snippet of my code (the problematic is a line with private DataTable TKon;):
using System;
using System.Diagnostics;
//\gjo
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml; namespace EuroAdresPanels
{
public class FirmaFree : System.Web.UI.WebControls.WebControl
{
private string NazwaFirmy = "";
private int id;
private DataRow[] RAdresy;
private DataTable TKon;
private DataTable TWoj;
private string emial = "";
//gjo
private DataTable TBranze;
private DataTable TSlowa;
//flaga mowiaca czy wyswietlamy tylko jedna firmy
public bool IsAlone = false;
//\gjo
public string ConnString = null;
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty, DataTable TWojewodztwo, string miasto, int woj)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = false;
this.TSlowa = null;
this.TBranze = null;
} public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty, DataTable TWojewodztwo,
string miasto, int woj, DataTable TBranze, DataTable TSlowa, string ConnString)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = true;
this.TSlowa = TSlowa;
this.TBranze = TBranze;
this.ConnString = ConnString;
// this.IsAlone = SprawdzMaxBranz();
} Any ideas how to deal with it?
Best Regards
Darek T.
If you already have the REFERENCE (not just the "using" statement)
Remove the Reference .. and re-add it.
Sometimes that'll clear it up.
"Dariusz Tomon" <d.*****@mazars.plwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hello
I upgraded my project from Visual Studio 2003 to 2005. The upgrade was
performed with no errors but now when I try to build my project (now it's
in
.NET 2.0 not .NET 1.1 as was previously) I always get the following error:
Error 1 The type 'System.Xml.Serialization.IXmlSerializable' is defined in
an assembly that is not referenced. You must add a reference to assembly
'System.Xml, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'.
C:\Inetpub\wwwroot\EuroAdresPanels\FirmaFree.cs 26 21 EuroAdresPanels
What is funny I have got a reference to System.XML.
Below is the snippet of my code (the problematic is a line with private
DataTable TKon;):
using System;
using System.Diagnostics;
//\gjo
using System.Text;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace EuroAdresPanels
{
public class FirmaFree : System.Web.UI.WebControls.WebControl
{
private string NazwaFirmy = "";
private int id;
private DataRow[] RAdresy;
private DataTable TKon;
private DataTable TWoj;
private string emial = "";
//gjo
private DataTable TBranze;
private DataTable TSlowa;
//flaga mowiaca czy wyswietlamy tylko jedna firmy
public bool IsAlone = false;
//\gjo
public string ConnString = null;
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty,
DataTable TWojewodztwo, string miasto, int woj)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = false;
this.TSlowa = null;
this.TBranze = null;
}
public FirmaFree(int idfirmy, DataRow[] rAdresy, DataTable Kontakty,
DataTable TWojewodztwo,
string miasto, int woj, DataTable TBranze, DataTable TSlowa, string
ConnString)
{
id = idfirmy;
TWoj = TWojewodztwo;
TKon = Kontakty;
RAdresy = rAdresy;
this.IsAlone = true;
this.TSlowa = TSlowa;
this.TBranze = TBranze;
this.ConnString = ConnString;
// this.IsAlone = SprawdzMaxBranz();
}
Any ideas how to deal with it?
Best Regards
Darek T.
This discussion thread is closed Replies have been disabled for this discussion. Similar topics
reply
views
Thread by Patrick |
last post: by
|
5 posts
views
Thread by Greg Collins [MVP] |
last post: by
|
reply
views
Thread by Rui Macdonald |
last post: by
|
4 posts
views
Thread by dhnriverside |
last post: by
|
5 posts
views
Thread by serge calderara |
last post: by
|
reply
views
Thread by DotNet Guerrilla |
last post: by
|
3 posts
views
Thread by Richard Lewis Haggard |
last post: by
|
9 posts
views
Thread by bill |
last post: by
|
7 posts
views
Thread by chage |
last post: by
| | | | | | | | | | |