|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Converting 1.1 webapp to v2We've finally got around to getting VS2005 for our development team and will be slowly, but surely upgrading all our in house projects accross. However -we have fallen at the first project! when converting a V1.1 web app to V2 - when compiling we get the following error: Error 1 The type 'ProductDB.Global' is ambiguous: it could come from assembly 'C:\Source\Systems\ProductDBAdmin\ProductDBAdmin_Mainline\src\AdminGui\bin\DRL.ProductDB.DLL' or from assembly 'C:\Temp\admingui\5f2af3cc\f03cc022\App_Code.jgiqizcm.DLL'. Please specify the assembly explicitly in the type name. C:\Source\Systems\ProductDBAdmin\ProductDBAdmin_Mainline\src\AdminGui\Global.asax 1 I have searched the web and the only replies I can see are "Delete your bin folder contents" or "Delete the temporary files folder" none of which worked for me.. Is there a fix / workaround / article for this that I'm missing? Regards Phil Yardley The normal cause is when source is converted over to the App_Code folder and
there are other libraries that contain the same class in the /bin folder, which is the reason for the delete. The ASP.NET temporary files directory is another source of potential errors. Try deleting the actual source file in question and see if it gets past this issue (back it up first, as you will likely want to use it). If it does, find the calling source and "go to definition". You cna then trace the library which contains the file and get rid of the ambiguity. -- Show quoteGregory A. Beamer MVP; MCP: +I, SE, SD, DBA ************************************************* Think outside of the box! ************************************************* "MSDN" <BLZB0B@noemail.noemail> wrote in message news:O93qKmCyGHA.4104@TK2MSFTNGP02.phx.gbl... > > Hi, > > We've finally got around to getting VS2005 for our development team and > will be slowly, but surely upgrading all our in house projects accross. > > However -we have fallen at the first project! > > when converting a V1.1 web app to V2 - when compiling we get the following > error: > > Error 1 The type 'ProductDB.Global' is ambiguous: it could come from > assembly > 'C:\Source\Systems\ProductDBAdmin\ProductDBAdmin_Mainline\src\AdminGui\bin\DRL.ProductDB.DLL' > or from assembly > 'C:\Temp\admingui\5f2af3cc\f03cc022\App_Code.jgiqizcm.DLL'. Please specify > the assembly explicitly in the type name. > C:\Source\Systems\ProductDBAdmin\ProductDBAdmin_Mainline\src\AdminGui\Global.asax > 1 > > I have searched the web and the only replies I can see are "Delete your > bin folder contents" or "Delete the temporary files folder" > > none of which worked for me.. > > Is there a fix / workaround / article for this that I'm missing? > > Regards > > Phil Yardley > Hello Phil,
I agree with Gregory. From the error message you provided, it indicates the class(ProductDB.Global) of global.asax component of your ASP.NET application can be found in two assemblies (both in the runtime assembly searching path), therefore, class loader can not determine which one to load. And currently it tell us the global.asax class can be found in the following assemblies: ** DRL.ProductDB.DLL in the private bin dir ** C:\Temp\admingui\5f2af3cc\f03cc022\App_Code.jgiqizcm.DLL -- this is the dynamic generated assembly from the classes in App_Code(2.0 specific) So I think you can check the following things to locate the two duplicated classes: 1. In your converted ASP.NET 2.0 application, lookup the App_Code directory and verify that whether the new global.asax code-behind class is in it 2. As for the "DRL.ProductDB.DLL", is it the original main assembly of the vs 2003/v1.1 application? If so, you can check your V1.1 application to see whether the global.asax's code-behind class is compiled into this assemby. Another means to verify this is directly use ildasm or reflector tool to insepect teh "DRL.ProductDB.DLL" assembly to see whether the global.asax code-behind class(ProductDB.Global) is in it: #Ildasm.exe Tutorial http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptutorials /html/il_dasm_tutorial.asp #Reflector for .NET http://www.aisto.com/roeder/dotnet/ After you confirmed that there are duplicated ProductDB.Global class in the above two places, you need to decide which one to use: 1) If you want to use the new codebehind class in App_code folder, you need to recompile the DRL.ProductDB.DLL(in vs 2003/v1.1) project so as to make it not contain the ProductDB.Global class. 2) If you want to continue use the global class in DRL.ProductDB.DLL but discard the one in App_Code, you need to delete the global class's source file in App_Code directory. Please feel free to post here if you have anything unclear or any other information you wonder, Sincerely, Steven Cheng Microsoft MSDN Online Support Lead ================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ================================================== This posting is provided "AS IS" with no warranties, and confers no rights. Hi Phil,
How are you doing on this issue, have you got any further progress, if there is still anything we can help, please feel free to post here. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead This posting is provided "AS IS" with no warranties, and confers no rights. Hi Steve / Gregory.
Your solutions fixed the problem :) Thanks for your help.. Just need to make changes to the Enterprise blocks and we should be up and running. Thanks again Phil Show quote "Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message news:nVeC87BzGHA.4616@TK2MSFTNGXA01.phx.gbl... > Hi Phil, > > How are you doing on this issue, have you got any further progress, if > there is still anything we can help, please feel free to post here. > > Sincerely, > > Steven Cheng > > Microsoft MSDN Online Support Lead > > > This posting is provided "AS IS" with no warranties, and confers no > rights. > |
|||||||||||||||||||||||