I have migrated the application in asp .net 1.1 to 4.0 successfully using wizard.
But i am facing some issues in follwoing senario
Application uses one dll which contains 2 overloaded methods as below
public static UltraWebGrid EncodeDatagrid(Infragistics.WebUI.UltraWebGrid.UltraWebGrid dg)
{
return dg;}
public static DataGrid EncodeDatagrid(DataGrid dg)
{
return dg;
}
when i am calling EnocdeDatagrid in the application as below
Protected WithEvents grdArea As System.Web.UI.WebControls.DataGrid
EncodeDatagrid(grdArea)
getting the following compile time error
"Reference required to assembly 'Infragistics.WebUI.UltraWebGrid.v5.1, Version=5.1.20051.37, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' containing the type 'Infragistics.WebUI.UltraWebGrid.UltraWebGrid'. Add one to your project. C:\Inetpub\wwwroot\AphelionDotNet\Lockers\AddArea.aspx.vb"
Why we need the reference of infragistic dll in VS 2010 if we are not calling the function which is having the infragistic control as a parameter? This reference is not required in the VS 2003.
You need a reference because your code is using it. It does not matter that you never call that function - Visual Studio cannot figure out what functions are not called. Hence the reference is required.
The last time I saw VS 2003 was about 5 years ago, so it's difficult to say why reference is not required there.
HOWEVER, if you don't call this method, can I ask what is it doing in your code? Just comment it out, if you don't call it - you don't need it. Problem solved.
DeepaliN
Member
6 Points
5 Posts
Migration from ASP .Net 1.1 to 4.0
Feb 03, 2012 10:00 AM|LINK
I have migrated the application in asp .net 1.1 to 4.0 successfully using wizard.
But i am facing some issues in follwoing senario
Application uses one dll which contains 2 overloaded methods as below
public static UltraWebGrid EncodeDatagrid(Infragistics.WebUI.UltraWebGrid.UltraWebGrid dg) { return dg;} public static DataGrid EncodeDatagrid(DataGrid dg) { return dg; }when i am calling EnocdeDatagrid in the application as below
getting the following compile time error
"Reference required to assembly 'Infragistics.WebUI.UltraWebGrid.v5.1, Version=5.1.20051.37, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb' containing the type 'Infragistics.WebUI.UltraWebGrid.UltraWebGrid'. Add one to your project. C:\Inetpub\wwwroot\AphelionDotNet\Lockers\AddArea.aspx.vb"
vytautas.ziu...
Contributor
3854 Points
691 Posts
Re: Migration from ASP .Net 1.1 to 4.0
Feb 03, 2012 11:47 AM|LINK
So what's your question?
DeepaliN
Member
6 Points
5 Posts
Re: Migration from ASP .Net 1.1 to 4.0
Feb 06, 2012 04:21 AM|LINK
Why we need the reference of infragistic dll in VS 2010 if we are not calling the function which is having the infragistic control as a parameter? This reference is not required in the VS 2003.
vytautas.ziu...
Contributor
3854 Points
691 Posts
Re: Migration from ASP .Net 1.1 to 4.0
Feb 06, 2012 08:00 AM|LINK
You need a reference because your code is using it. It does not matter that you never call that function - Visual Studio cannot figure out what functions are not called. Hence the reference is required.
DeepaliN
Member
6 Points
5 Posts
Re: Migration from ASP .Net 1.1 to 4.0
Feb 06, 2012 10:17 AM|LINK
With the same senario it does not required the reference in the VS 2003 why this is so?
Also if I am not at all calling the EncodeDatagrid() method then it does not required the reference in VS 2010
vytautas.ziu...
Contributor
3854 Points
691 Posts
Re: Migration from ASP .Net 1.1 to 4.0
Feb 06, 2012 10:31 AM|LINK
The last time I saw VS 2003 was about 5 years ago, so it's difficult to say why reference is not required there.
HOWEVER, if you don't call this method, can I ask what is it doing in your code? Just comment it out, if you don't call it - you don't need it. Problem solved.
DeepaliN
Member
6 Points
5 Posts
Re: Migration from ASP .Net 1.1 to 4.0
Feb 06, 2012 11:54 AM|LINK
I am calling 1 of the overloaded method from my code as i shown in the code given above.
vytautas.ziu...
Contributor
3854 Points
691 Posts
Re: Migration from ASP .Net 1.1 to 4.0
Feb 06, 2012 11:57 AM|LINK
OK, do the following:
//public static UltraWebGrid EncodeDatagrid(Infragistics.WebUI.UltraWebGrid.UltraWebGrid dg) //{ // return dg;} public static DataGrid EncodeDatagrid(DataGrid dg) { return dg; }This will solve your problem with a reference.