|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Namespace - in ASP.NET and librarieshello,
all my libraries (dll - .NET 1.1) have there own namespace which starts with "mycompany....." If i have now also own classes in the application - i want also to use the same namespace - but i see that the i can not more access the my external referenced libraries. Is it not possible this - ore what must i do. I did not want to embed my general libraries in the application (like encryption ....). The specific DAL for the application i embed in the application - but i want to use as namespace mycompany - name. Also i want to have the flexibility to choose where to the code (external dll or as internal class) and the best way is to have the same namespace. any ideas - or recomandation? I'm not sure I understand the question. I too have several different
assemblies having namespaces that all begin with my company name, such as DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are in separate assemblies, which must all be included in any project that employs more than one of them. This is actually a good thing, as it doesn't necessitate loading any code not needed by the present app. So, what exactly is the problem? -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "Xavier" <Xav***@discussions.microsoft.com> wrote in message news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... > hello, > > all my libraries (dll - .NET 1.1) have there own namespace which starts > with > "mycompany....." > > If i have now also own classes in the application - i want also to use the > same namespace - but i see that the i can not more access the my external > referenced libraries. > > Is it not possible this - ore what must i do. I did not want to embed my > general libraries in the application (like encryption ....). The specific > DAL > for the application i embed in the application - but i want to use as > namespace mycompany - name. > > Also i want to have the flexibility to choose where to the code (external > dll or as internal class) and the best way is to have the same namespace. > > any ideas - or recomandation? the problem apears in the case when in the main application i also have some
calsses with the same namespace (for example when in the asp.net application i create classes with a explicit entry of Namespace mycompany..... The same problem apears if i change the namespace of the asp.net application to mycompany.myapplication thanks Show quote "Kevin Spencer" wrote: > I'm not sure I understand the question. I too have several different > assemblies having namespaces that all begin with my company name, such as > DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are in separate > assemblies, which must all be included in any project that employs more than > one of them. This is actually a good thing, as it doesn't necessitate > loading any code not needed by the present app. So, what exactly is the > problem? > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Professional Numbskull > > Show me your certification without works, > and I'll show my certification > *by* my works. > > "Xavier" <Xav***@discussions.microsoft.com> wrote in message > news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... > > hello, > > > > all my libraries (dll - .NET 1.1) have there own namespace which starts > > with > > "mycompany....." > > > > If i have now also own classes in the application - i want also to use the > > same namespace - but i see that the i can not more access the my external > > referenced libraries. > > > > Is it not possible this - ore what must i do. I did not want to embed my > > general libraries in the application (like encryption ....). The specific > > DAL > > for the application i embed in the application - but i want to use as > > namespace mycompany - name. > > > > Also i want to have the flexibility to choose where to the code (external > > dll or as internal class) and the best way is to have the same namespace. > > > > any ideas - or recomandation? > > > What problem?
-- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "Xavier" <Xav***@discussions.microsoft.com> wrote in message news:83F2C730-8F8B-4A85-89B5-169821114207@microsoft.com... > the problem apears in the case when in the main application i also have > some > calsses with the same namespace (for example when in the asp.net > application > i create classes with a explicit entry of Namespace mycompany..... > > The same problem apears if i change the namespace of the asp.net > application > to mycompany.myapplication > > thanks > > > > "Kevin Spencer" wrote: > >> I'm not sure I understand the question. I too have several different >> assemblies having namespaces that all begin with my company name, such as >> DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are in >> separate >> assemblies, which must all be included in any project that employs more >> than >> one of them. This is actually a good thing, as it doesn't necessitate >> loading any code not needed by the present app. So, what exactly is the >> problem? >> >> -- >> HTH, >> >> Kevin Spencer >> Microsoft MVP >> Professional Numbskull >> >> Show me your certification without works, >> and I'll show my certification >> *by* my works. >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... >> > hello, >> > >> > all my libraries (dll - .NET 1.1) have there own namespace which starts >> > with >> > "mycompany....." >> > >> > If i have now also own classes in the application - i want also to use >> > the >> > same namespace - but i see that the i can not more access the my >> > external >> > referenced libraries. >> > >> > Is it not possible this - ore what must i do. I did not want to embed >> > my >> > general libraries in the application (like encryption ....). The >> > specific >> > DAL >> > for the application i embed in the application - but i want to use as >> > namespace mycompany - name. >> > >> > Also i want to have the flexibility to choose where to the code >> > (external >> > dll or as internal class) and the best way is to have the same >> > namespace. >> > >> > any ideas - or recomandation? >> >> >> The error message is:
C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type 'MyCompany.FBLib1' is not defined. i show the the steps to get reproduce error. *in a ASP.Net application with the namespace WebApp1 there is a webform "WebForm1.aspx" In the webform there are to labels (Label1 and Label2) If i push the button the following code is executed Dim oExternalLib As New MyCompany.FBLib1 Label1.Text = oExternalLib.FBEcho("Hello") Dim oInternalClass As MyCompany1.InternalTest.MyCompany_InternalClass Label2.Text = oInternalClass.Test All works ok. The code for my internal class (in the asp,net application) Namespace MyCompany.InternalTest Public Class MyCompany_InternalClass Public Function Test() As String Return "InternalTest" End Function End Class End Namespace BUT - if i try to change the Namespace for the internalClass from MyCompany1 to MyCompany1 then i get the error C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type 'MyCompany.FBLib1' is not defined. i hope you understand now my problem. best regards Show quote "Kevin Spencer" wrote: > What problem? > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Professional Numbskull > > Show me your certification without works, > and I'll show my certification > *by* my works. > > "Xavier" <Xav***@discussions.microsoft.com> wrote in message > news:83F2C730-8F8B-4A85-89B5-169821114207@microsoft.com... > > the problem apears in the case when in the main application i also have > > some > > calsses with the same namespace (for example when in the asp.net > > application > > i create classes with a explicit entry of Namespace mycompany..... > > > > The same problem apears if i change the namespace of the asp.net > > application > > to mycompany.myapplication > > > > thanks > > > > > > > > "Kevin Spencer" wrote: > > > >> I'm not sure I understand the question. I too have several different > >> assemblies having namespaces that all begin with my company name, such as > >> DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are in > >> separate > >> assemblies, which must all be included in any project that employs more > >> than > >> one of them. This is actually a good thing, as it doesn't necessitate > >> loading any code not needed by the present app. So, what exactly is the > >> problem? > >> > >> -- > >> HTH, > >> > >> Kevin Spencer > >> Microsoft MVP > >> Professional Numbskull > >> > >> Show me your certification without works, > >> and I'll show my certification > >> *by* my works. > >> > >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... > >> > hello, > >> > > >> > all my libraries (dll - .NET 1.1) have there own namespace which starts > >> > with > >> > "mycompany....." > >> > > >> > If i have now also own classes in the application - i want also to use > >> > the > >> > same namespace - but i see that the i can not more access the my > >> > external > >> > referenced libraries. > >> > > >> > Is it not possible this - ore what must i do. I did not want to embed > >> > my > >> > general libraries in the application (like encryption ....). The > >> > specific > >> > DAL > >> > for the application i embed in the application - but i want to use as > >> > namespace mycompany - name. > >> > > >> > Also i want to have the flexibility to choose where to the code > >> > (external > >> > dll or as internal class) and the best way is to have the same > >> > namespace. > >> > > >> > any ideas - or recomandation? > >> > >> > >> > > > > BUT - if i try to change the Namespace for the internalClass from The error message indicates that your code is referencing the namespace > MyCompany1 > to MyCompany1 then i get the error > > > > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > 'MyCompany.FBLib1' is not defined. "MyCompany" whereas you have said that you renamed the namespace to "MyCompany1." -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "Xavier" <Xav***@discussions.microsoft.com> wrote in message news:AEABD5E3-431D-415A-8B78-BE49CBED5BA5@microsoft.com... > The error message is: > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > 'MyCompany.FBLib1' is not defined. > > i show the the steps to get reproduce error. > > > > *in a ASP.Net application with the namespace WebApp1 there is a webform > "WebForm1.aspx" > In the webform there are to labels (Label1 and Label2) If i push the > button > the following code is executed > > > Dim oExternalLib As New MyCompany.FBLib1 > Label1.Text = oExternalLib.FBEcho("Hello") > > Dim oInternalClass As MyCompany1.InternalTest.MyCompany_InternalClass > Label2.Text = oInternalClass.Test > > > All works ok. > > The code for my internal class (in the asp,net application) > Namespace MyCompany.InternalTest > Public Class MyCompany_InternalClass > Public Function Test() As String > Return "InternalTest" > End Function > End Class > End Namespace > > > BUT - if i try to change the Namespace for the internalClass from > MyCompany1 > to MyCompany1 then i get the error > > > > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > 'MyCompany.FBLib1' is not defined. > > i hope you understand now my problem. > best regards > > > > "Kevin Spencer" wrote: > >> What problem? >> >> -- >> HTH, >> >> Kevin Spencer >> Microsoft MVP >> Professional Numbskull >> >> Show me your certification without works, >> and I'll show my certification >> *by* my works. >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> news:83F2C730-8F8B-4A85-89B5-169821114207@microsoft.com... >> > the problem apears in the case when in the main application i also have >> > some >> > calsses with the same namespace (for example when in the asp.net >> > application >> > i create classes with a explicit entry of Namespace mycompany..... >> > >> > The same problem apears if i change the namespace of the asp.net >> > application >> > to mycompany.myapplication >> > >> > thanks >> > >> > >> > >> > "Kevin Spencer" wrote: >> > >> >> I'm not sure I understand the question. I too have several different >> >> assemblies having namespaces that all begin with my company name, such >> >> as >> >> DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are in >> >> separate >> >> assemblies, which must all be included in any project that employs >> >> more >> >> than >> >> one of them. This is actually a good thing, as it doesn't necessitate >> >> loading any code not needed by the present app. So, what exactly is >> >> the >> >> problem? >> >> >> >> -- >> >> HTH, >> >> >> >> Kevin Spencer >> >> Microsoft MVP >> >> Professional Numbskull >> >> >> >> Show me your certification without works, >> >> and I'll show my certification >> >> *by* my works. >> >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> >> news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... >> >> > hello, >> >> > >> >> > all my libraries (dll - .NET 1.1) have there own namespace which >> >> > starts >> >> > with >> >> > "mycompany....." >> >> > >> >> > If i have now also own classes in the application - i want also to >> >> > use >> >> > the >> >> > same namespace - but i see that the i can not more access the my >> >> > external >> >> > referenced libraries. >> >> > >> >> > Is it not possible this - ore what must i do. I did not want to >> >> > embed >> >> > my >> >> > general libraries in the application (like encryption ....). The >> >> > specific >> >> > DAL >> >> > for the application i embed in the application - but i want to use >> >> > as >> >> > namespace mycompany - name. >> >> > >> >> > Also i want to have the flexibility to choose where to the code >> >> > (external >> >> > dll or as internal class) and the best way is to have the same >> >> > namespace. >> >> > >> >> > any ideas - or recomandation? >> >> >> >> >> >> >> >> >> Hello Kevin,
thank for your replies, but please read carefully - when the problem apears !!! i changed only the namespace of the internalClass from original > > Namespace MyCompany1.InternalTest ' the external namespace is still MyCompany to> > Public Class MyCompany_InternalClass > > Public Function Test() As String > > Return "InternalTest" > > End Function > > End Class > > End Namespace > > Namespace MyCompany.InternalTest 'now the namespace from the internal and external call are the same after this change error apears in the line > > Public Class MyCompany_InternalClass > > Public Function Test() As String > > Return "InternalTest" > > End Function > > End Class > > End Namespace Dim oExternalLib As New MyCompany.FBLib1 '!!! ( visual studio could not more reference the external dll !!!! - as soon the namespace has the same name 'for the the external class (the dll - was not modified - it has the namespace MyCompany - but is no more visible in the asp.net class and thats my problem thanks Show quote "Kevin Spencer" wrote: > > BUT - if i try to change the Namespace for the internalClass from > > MyCompany1 > > to MyCompany1 then i get the error > > > > > > > > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > > 'MyCompany.FBLib1' is not defined. > > The error message indicates that your code is referencing the namespace > "MyCompany" whereas you have said that you renamed the namespace to > "MyCompany1." > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Professional Numbskull > > Show me your certification without works, > and I'll show my certification > *by* my works. > > "Xavier" <Xav***@discussions.microsoft.com> wrote in message > news:AEABD5E3-431D-415A-8B78-BE49CBED5BA5@microsoft.com... > > The error message is: > > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > > 'MyCompany.FBLib1' is not defined. > > > > i show the the steps to get reproduce error. > > > > > > > > *in a ASP.Net application with the namespace WebApp1 there is a webform > > "WebForm1.aspx" > > In the webform there are to labels (Label1 and Label2) If i push the > > button > > the following code is executed > > > > > > Dim oExternalLib As New MyCompany.FBLib1 > > Label1.Text = oExternalLib.FBEcho("Hello") > > > > Dim oInternalClass As MyCompany1.InternalTest.MyCompany_InternalClass > > Label2.Text = oInternalClass.Test > > > > > > All works ok. > > > > The code for my internal class (in the asp,net application) > > Namespace MyCompany.InternalTest > > Public Class MyCompany_InternalClass > > Public Function Test() As String > > Return "InternalTest" > > End Function > > End Class > > End Namespace > > > > > > BUT - if i try to change the Namespace for the internalClass from > > MyCompany1 > > to MyCompany1 then i get the error > > > > > > > > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > > 'MyCompany.FBLib1' is not defined. > > > > i hope you understand now my problem. > > best regards > > > > > > > > "Kevin Spencer" wrote: > > > >> What problem? > >> > >> -- > >> HTH, > >> > >> Kevin Spencer > >> Microsoft MVP > >> Professional Numbskull > >> > >> Show me your certification without works, > >> and I'll show my certification > >> *by* my works. > >> > >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> news:83F2C730-8F8B-4A85-89B5-169821114207@microsoft.com... > >> > the problem apears in the case when in the main application i also have > >> > some > >> > calsses with the same namespace (for example when in the asp.net > >> > application > >> > i create classes with a explicit entry of Namespace mycompany..... > >> > > >> > The same problem apears if i change the namespace of the asp.net > >> > application > >> > to mycompany.myapplication > >> > > >> > thanks > >> > > >> > > >> > > >> > "Kevin Spencer" wrote: > >> > > >> >> I'm not sure I understand the question. I too have several different > >> >> assemblies having namespaces that all begin with my company name, such > >> >> as > >> >> DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are in > >> >> separate > >> >> assemblies, which must all be included in any project that employs > >> >> more > >> >> than > >> >> one of them. This is actually a good thing, as it doesn't necessitate > >> >> loading any code not needed by the present app. So, what exactly is > >> >> the > >> >> problem? > >> >> > >> >> -- > >> >> HTH, > >> >> > >> >> Kevin Spencer > >> >> Microsoft MVP > >> >> Professional Numbskull > >> >> > >> >> Show me your certification without works, > >> >> and I'll show my certification > >> >> *by* my works. > >> >> > >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> >> news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... > >> >> > hello, > >> >> > > >> >> > all my libraries (dll - .NET 1.1) have there own namespace which > >> >> > starts > >> >> > with > >> >> > "mycompany....." > >> >> > > >> >> > If i have now also own classes in the application - i want also to > >> >> > use > >> >> > the > >> >> > same namespace - but i see that the i can not more access the my > >> >> > external > >> >> > referenced libraries. > >> >> > > >> >> > Is it not possible this - ore what must i do. I did not want to > >> >> > embed > >> >> > my > >> >> > general libraries in the application (like encryption ....). The > >> >> > specific > >> >> > DAL > >> >> > for the application i embed in the application - but i want to use > >> >> > as > >> >> > namespace mycompany - name. > >> >> > > >> >> > Also i want to have the flexibility to choose where to the code > >> >> > (external > >> >> > dll or as internal class) and the best way is to have the same > >> >> > namespace. > >> >> > > >> >> > any ideas - or recomandation? > >> >> > >> >> > >> >> > >> > >> > >> > > > I *did* read carefully, Xavier. However, without good information from you,
I can't be of much help. Here's what you say the line of code that throws the error says: > Dim oExternalLib As New MyCompany.FBLib1 Here's the error message:> C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type Here's your class definition:> 'MyCompany.FBLib1' is not defined. >> > Namespace MyCompany1.InternalTest ' the external namespace is still I don't see *any* class named "FBLib1." Therefore, what you're telling me >> > MyCompany >> > Public Class MyCompany_InternalClass >> > Public Function Test() As String >> > Return "InternalTest" >> > End Function >> > End Class >> > End Namespace you're doing, and what you're doing are 2 entirely different things. I can only guess. The error message indicates that "MyCompany.FBLib1" is not defined. I have yet to see any definition of it myself. What I *have* seen a definition of is two classes: "MyCompany.InternalTest.MyCompany_InternalClass" and "MyCompany1.InternalTest.MyCompany_InternalClass". -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "Xavier" <Xav***@discussions.microsoft.com> wrote in message news:A16DFDBC-BC21-45E6-858C-475193A8183A@microsoft.com... > Hello Kevin, > > thank for your replies, but please read carefully - when the problem > apears > > > !!! i changed only the namespace of the internalClass from > > original > >> > Namespace MyCompany1.InternalTest ' the external namespace is still >> > MyCompany >> > Public Class MyCompany_InternalClass >> > Public Function Test() As String >> > Return "InternalTest" >> > End Function >> > End Class >> > End Namespace > > to >> > Namespace MyCompany.InternalTest 'now the namespace from the internal >> > and external call are the same >> > Public Class MyCompany_InternalClass >> > Public Function Test() As String >> > Return "InternalTest" >> > End Function >> > End Class >> > End Namespace > > after this change error apears in the line > Dim oExternalLib As New MyCompany.FBLib1 '!!! ( visual studio could not > more reference the external dll !!!! - as soon the namespace has the same > name > > 'for the the external class (the dll - was not modified - it has the > namespace MyCompany - but is no more visible in the asp.net class and > thats > my problem > > > thanks > > > > > > > > > > > "Kevin Spencer" wrote: > >> > BUT - if i try to change the Namespace for the internalClass from >> > MyCompany1 >> > to MyCompany1 then i get the error >> > >> > >> > >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> > 'MyCompany.FBLib1' is not defined. >> >> The error message indicates that your code is referencing the namespace >> "MyCompany" whereas you have said that you renamed the namespace to >> "MyCompany1." >> >> -- >> HTH, >> >> Kevin Spencer >> Microsoft MVP >> Professional Numbskull >> >> Show me your certification without works, >> and I'll show my certification >> *by* my works. >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> news:AEABD5E3-431D-415A-8B78-BE49CBED5BA5@microsoft.com... >> > The error message is: >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> > 'MyCompany.FBLib1' is not defined. >> > >> > i show the the steps to get reproduce error. >> > >> > >> > >> > *in a ASP.Net application with the namespace WebApp1 there is a webform >> > "WebForm1.aspx" >> > In the webform there are to labels (Label1 and Label2) If i push the >> > button >> > the following code is executed >> > >> > >> > Dim oExternalLib As New MyCompany.FBLib1 >> > Label1.Text = oExternalLib.FBEcho("Hello") >> > >> > Dim oInternalClass As MyCompany1.InternalTest.MyCompany_InternalClass >> > Label2.Text = oInternalClass.Test >> > >> > >> > All works ok. >> > >> > The code for my internal class (in the asp,net application) >> > Namespace MyCompany.InternalTest >> > Public Class MyCompany_InternalClass >> > Public Function Test() As String >> > Return "InternalTest" >> > End Function >> > End Class >> > End Namespace >> > >> > >> > BUT - if i try to change the Namespace for the internalClass from >> > MyCompany1 >> > to MyCompany1 then i get the error >> > >> > >> > >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> > 'MyCompany.FBLib1' is not defined. >> > >> > i hope you understand now my problem. >> > best regards >> > >> > >> > >> > "Kevin Spencer" wrote: >> > >> >> What problem? >> >> >> >> -- >> >> HTH, >> >> >> >> Kevin Spencer >> >> Microsoft MVP >> >> Professional Numbskull >> >> >> >> Show me your certification without works, >> >> and I'll show my certification >> >> *by* my works. >> >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> >> news:83F2C730-8F8B-4A85-89B5-169821114207@microsoft.com... >> >> > the problem apears in the case when in the main application i also >> >> > have >> >> > some >> >> > calsses with the same namespace (for example when in the asp.net >> >> > application >> >> > i create classes with a explicit entry of Namespace mycompany..... >> >> > >> >> > The same problem apears if i change the namespace of the asp.net >> >> > application >> >> > to mycompany.myapplication >> >> > >> >> > thanks >> >> > >> >> > >> >> > >> >> > "Kevin Spencer" wrote: >> >> > >> >> >> I'm not sure I understand the question. I too have several >> >> >> different >> >> >> assemblies having namespaces that all begin with my company name, >> >> >> such >> >> >> as >> >> >> DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are in >> >> >> separate >> >> >> assemblies, which must all be included in any project that employs >> >> >> more >> >> >> than >> >> >> one of them. This is actually a good thing, as it doesn't >> >> >> necessitate >> >> >> loading any code not needed by the present app. So, what exactly is >> >> >> the >> >> >> problem? >> >> >> >> >> >> -- >> >> >> HTH, >> >> >> >> >> >> Kevin Spencer >> >> >> Microsoft MVP >> >> >> Professional Numbskull >> >> >> >> >> >> Show me your certification without works, >> >> >> and I'll show my certification >> >> >> *by* my works. >> >> >> >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> >> >> news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... >> >> >> > hello, >> >> >> > >> >> >> > all my libraries (dll - .NET 1.1) have there own namespace which >> >> >> > starts >> >> >> > with >> >> >> > "mycompany....." >> >> >> > >> >> >> > If i have now also own classes in the application - i want also >> >> >> > to >> >> >> > use >> >> >> > the >> >> >> > same namespace - but i see that the i can not more access the my >> >> >> > external >> >> >> > referenced libraries. >> >> >> > >> >> >> > Is it not possible this - ore what must i do. I did not want to >> >> >> > embed >> >> >> > my >> >> >> > general libraries in the application (like encryption ....). The >> >> >> > specific >> >> >> > DAL >> >> >> > for the application i embed in the application - but i want to >> >> >> > use >> >> >> > as >> >> >> > namespace mycompany - name. >> >> >> > >> >> >> > Also i want to have the flexibility to choose where to the code >> >> >> > (external >> >> >> > dll or as internal class) and the best way is to have the same >> >> >> > namespace. >> >> >> > >> >> >> > any ideas - or recomandation? >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> sorry - here are all details to reproduce the errorr in VS2003 (.NET 1.1)
create a solution with 2 projects a -> a classlibrary with the Name FBlib b ->a asp.net application with the name Webapp1 1*- create a new class library (FBlib) with only a class ( root namespace in property of VS i deleted) Content of the classfile FBLib1.vb Namespace MyCompany Public Class FBLib1 Function FBEcho(ByVal vIn As String) As String Return vIn End Function End Class End Namespace 2*add a asp.net project (Webapp1) with a) a ClassFile - FileName MyCompany.InternalClass.vb content: Namespace MyCompany1.InternalTest Public Class MyCompany_InternalClass Public Function Test() As String Return "InternalTest" End Function End Class End Namespace b) create a standard aspx page WebForm1.aspx with code behind c) add a project reference to the ClassLibrary (FBLib) - created in step 1 d)add to the aspx page a 2 labels (Label1 and Label2) and a button e)in the button event add please Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oExternalLib As New MyCompany.FBLib1 Label1.Text = oExternalLib.FBEcho("Hello-from externalLib") Dim oInternalClass As New MyCompany1.InternalTest.MyCompany_InternalClass Label2.Text = oInternalClass.Test End Sub 3*STRG + F5 - click on the button and the aspx page will display Hello-from externalLib InternalTest still here all works OK 4*error reproducion a)change in the file from step 2a the namespace Namespace MyCompany1.InternalTest TO -> Namespace MyCompany.InternalTest b)in WebForm1.aspx.vb correct the line from Dim oInternalClass As New MyCompany1.InternalTest.MyCompany_InternalClass to Dim oInternalClass As New MyCompany.InternalTest.MyCompany_InternalClass and no compilation is possible - error in line Dim oExternalLib As New MyCompany.FBLib1 - is displayed !!!!!!!!!!!! C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(31): Type 'MyCompany.FBLib1' is not defined. i hope now you can reproduce the error thanks Show quote "Kevin Spencer" wrote: > I *did* read carefully, Xavier. However, without good information from you, > I can't be of much help. > > Here's what you say the line of code that throws the error says: > > Dim oExternalLib As New MyCompany.FBLib1 > > Here's the error message: > > > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > > 'MyCompany.FBLib1' is not defined. > > Here's your class definition: > > >> > Namespace MyCompany1.InternalTest ' the external namespace is still > >> > MyCompany > >> > Public Class MyCompany_InternalClass > >> > Public Function Test() As String > >> > Return "InternalTest" > >> > End Function > >> > End Class > >> > End Namespace > > I don't see *any* class named "FBLib1." Therefore, what you're telling me > you're doing, and what you're doing are 2 entirely different things. I can > only guess. The error message indicates that "MyCompany.FBLib1" is not > defined. I have yet to see any definition of it myself. What I *have* seen a > definition of is two classes: > "MyCompany.InternalTest.MyCompany_InternalClass" and > "MyCompany1.InternalTest.MyCompany_InternalClass". > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Professional Numbskull > > Show me your certification without works, > and I'll show my certification > *by* my works. > > > "Xavier" <Xav***@discussions.microsoft.com> wrote in message > news:A16DFDBC-BC21-45E6-858C-475193A8183A@microsoft.com... > > Hello Kevin, > > > > thank for your replies, but please read carefully - when the problem > > apears > > > > > > !!! i changed only the namespace of the internalClass from > > > > original > > > >> > Namespace MyCompany1.InternalTest ' the external namespace is still > >> > MyCompany > >> > Public Class MyCompany_InternalClass > >> > Public Function Test() As String > >> > Return "InternalTest" > >> > End Function > >> > End Class > >> > End Namespace > > > > to > >> > Namespace MyCompany.InternalTest 'now the namespace from the internal > >> > and external call are the same > >> > Public Class MyCompany_InternalClass > >> > Public Function Test() As String > >> > Return "InternalTest" > >> > End Function > >> > End Class > >> > End Namespace > > > > after this change error apears in the line > > Dim oExternalLib As New MyCompany.FBLib1 '!!! ( visual studio could not > > more reference the external dll !!!! - as soon the namespace has the same > > name > > > > 'for the the external class (the dll - was not modified - it has the > > namespace MyCompany - but is no more visible in the asp.net class and > > thats > > my problem > > > > > > thanks > > > > > > > > > > > > > > > > > > > > > > "Kevin Spencer" wrote: > > > >> > BUT - if i try to change the Namespace for the internalClass from > >> > MyCompany1 > >> > to MyCompany1 then i get the error > >> > > >> > > >> > > >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> > 'MyCompany.FBLib1' is not defined. > >> > >> The error message indicates that your code is referencing the namespace > >> "MyCompany" whereas you have said that you renamed the namespace to > >> "MyCompany1." > >> > >> -- > >> HTH, > >> > >> Kevin Spencer > >> Microsoft MVP > >> Professional Numbskull > >> > >> Show me your certification without works, > >> and I'll show my certification > >> *by* my works. > >> > >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> news:AEABD5E3-431D-415A-8B78-BE49CBED5BA5@microsoft.com... > >> > The error message is: > >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> > 'MyCompany.FBLib1' is not defined. > >> > > >> > i show the the steps to get reproduce error. > >> > > >> > > >> > > >> > *in a ASP.Net application with the namespace WebApp1 there is a webform > >> > "WebForm1.aspx" > >> > In the webform there are to labels (Label1 and Label2) If i push the > >> > button > >> > the following code is executed > >> > > >> > > >> > Dim oExternalLib As New MyCompany.FBLib1 > >> > Label1.Text = oExternalLib.FBEcho("Hello") > >> > > >> > Dim oInternalClass As MyCompany1.InternalTest.MyCompany_InternalClass > >> > Label2.Text = oInternalClass.Test > >> > > >> > > >> > All works ok. > >> > > >> > The code for my internal class (in the asp,net application) > >> > Namespace MyCompany.InternalTest > >> > Public Class MyCompany_InternalClass > >> > Public Function Test() As String > >> > Return "InternalTest" > >> > End Function > >> > End Class > >> > End Namespace > >> > > >> > > >> > BUT - if i try to change the Namespace for the internalClass from > >> > MyCompany1 > >> > to MyCompany1 then i get the error > >> > > >> > > >> > > >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> > 'MyCompany.FBLib1' is not defined. > >> > > >> > i hope you understand now my problem. > >> > best regards > >> > > >> > > >> > > >> > "Kevin Spencer" wrote: > >> > > >> >> What problem? > >> >> > >> >> -- > >> >> HTH, > >> >> > >> >> Kevin Spencer > >> >> Microsoft MVP > >> >> Professional Numbskull > >> >> > >> >> Show me your certification without works, > >> >> and I'll show my certification > >> >> *by* my works. > >> >> > >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> >> news:83F2C730-8F8B-4A85-89B5-169821114207@microsoft.com... > >> >> > the problem apears in the case when in the main application i also > >> >> > have > >> >> > some > >> >> > calsses with the same namespace (for example when in the asp.net > >> >> > application > >> >> > i create classes with a explicit entry of Namespace mycompany..... > >> >> > > >> >> > The same problem apears if i change the namespace of the asp.net > >> >> > application > >> >> > to mycompany.myapplication > >> >> > > >> >> > thanks > >> >> > > >> >> > > >> >> > > >> >> > "Kevin Spencer" wrote: > >> >> > > >> >> >> I'm not sure I understand the question. I too have several > >> >> >> different > >> >> >> assemblies having namespaces that all begin with my company name, > >> >> >> such > >> >> >> as > >> >> >> DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are in > >> >> >> separate > >> >> >> assemblies, which must all be included in any project that employs > >> >> >> more > >> >> >> than > >> >> >> one of them. This is actually a good thing, as it doesn't > >> >> >> necessitate > >> >> >> loading any code not needed by the present app. So, what exactly is > >> >> >> the > >> >> >> problem? > >> >> >> > >> >> >> -- > >> >> >> HTH, > >> >> >> > >> >> >> Kevin Spencer > >> >> >> Microsoft MVP > >> >> >> Professional Numbskull > >> >> >> > >> >> >> Show me your certification without works, > >> >> >> and I'll show my certification > >> >> >> *by* my works. > >> >> >> > >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> >> >> news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... > >> >> >> > hello, > >> >> >> > > >> >> >> > all my libraries (dll - .NET 1.1) have there own namespace which > >> >> >> > starts > >> >> >> > with > >> >> >> > "mycompany....." > >> >> >> > > >> >> >> > If i have now also own classes in the application - i want also > >> >> >> > to > >> >> >> > use > >> >> >> > the > >> >> >> > same namespace - but i see that the i can not more access the my > >> >> >> > external > >> >> >> > referenced libraries. > >> >> >> > > >> >> >> > Is it not possible this - ore what must i do. I did not want to > >> >> >> > embed > >> >> >> > my > >> >> >> > general libraries in the application (like encryption ....). The > >> >> >> > specific > >> >> >> > DAL > >> >> >> > for the application i embed in the application - but i want to > >> >> >> > use > >> >> >> > as > >> >> >> > namespace mycompany - name. > >> >> >> > > >> >> >> > Also i want to have the flexibility to choose where to the code > >> >> >> > (external > >> >> >> > dll or as internal class) and the best way is to have the same > >> >> >> > namespace. > >> >> >> > > >> >> >> > any ideas - or recomandation? > >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> >> > >> > >> > >> > > > It looks to me like you didn't update your reference. See Step 2c:
> c) add a project reference to the ClassLibrary (FBLib) - created in step 1 In your explanation, you did not mention anything about updating the reference. It might help if you just post the code verbatim. No need to post the code that worked, just the code that didn't. -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "Xavier" <Xav***@discussions.microsoft.com> wrote in message news:92C731CD-DE0D-42D4-B176-FBF9FB883F60@microsoft.com... > sorry - here are all details to reproduce the errorr in VS2003 (.NET 1.1) > > create a solution with 2 projects > a -> a classlibrary with the Name FBlib > b ->a asp.net application with the name Webapp1 > > > 1*- create a new class library (FBlib) with only a class ( root namespace > in property of VS i deleted) > Content of the classfile FBLib1.vb > > Namespace MyCompany > Public Class FBLib1 > Function FBEcho(ByVal vIn As String) As String > Return vIn > End Function > End Class > End Namespace > > 2*add a asp.net project (Webapp1) with > a) a ClassFile - FileName MyCompany.InternalClass.vb content: > > Namespace MyCompany1.InternalTest > Public Class MyCompany_InternalClass > Public Function Test() As String > Return "InternalTest" > End Function > End Class > End Namespace > > b) create a standard aspx page WebForm1.aspx with code behind > c) add a project reference to the ClassLibrary (FBLib) - created in step 1 > d)add to the aspx page a 2 labels (Label1 and Label2) and a button > e)in the button event add please > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > System.EventArgs) Handles Button1.Click > Dim oExternalLib As New MyCompany.FBLib1 > Label1.Text = oExternalLib.FBEcho("Hello-from externalLib") > > Dim oInternalClass As New > MyCompany1.InternalTest.MyCompany_InternalClass > Label2.Text = oInternalClass.Test > End Sub > > 3*STRG + F5 - click on the button and the aspx page will display > > Hello-from externalLib > InternalTest > > still here all works OK > > 4*error reproducion > > a)change in the file from step 2a the namespace > Namespace MyCompany1.InternalTest TO -> Namespace MyCompany.InternalTest > > b)in WebForm1.aspx.vb correct the line > > from Dim oInternalClass As New > MyCompany1.InternalTest.MyCompany_InternalClass > to Dim oInternalClass As New > MyCompany.InternalTest.MyCompany_InternalClass > > > and no compilation is possible - error in line > Dim oExternalLib As New MyCompany.FBLib1 - is displayed !!!!!!!!!!!! > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(31): Type > 'MyCompany.FBLib1' is not defined. > > > i hope now you can reproduce the error > thanks > > > > > > > > > > > > > > > > "Kevin Spencer" wrote: > >> I *did* read carefully, Xavier. However, without good information from >> you, >> I can't be of much help. >> >> Here's what you say the line of code that throws the error says: >> > Dim oExternalLib As New MyCompany.FBLib1 >> >> Here's the error message: >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> > 'MyCompany.FBLib1' is not defined. >> >> Here's your class definition: >> >> >> > Namespace MyCompany1.InternalTest ' the external namespace is still >> >> > MyCompany >> >> > Public Class MyCompany_InternalClass >> >> > Public Function Test() As String >> >> > Return "InternalTest" >> >> > End Function >> >> > End Class >> >> > End Namespace >> >> I don't see *any* class named "FBLib1." Therefore, what you're telling me >> you're doing, and what you're doing are 2 entirely different things. I >> can >> only guess. The error message indicates that "MyCompany.FBLib1" is not >> defined. I have yet to see any definition of it myself. What I *have* >> seen a >> definition of is two classes: >> "MyCompany.InternalTest.MyCompany_InternalClass" and >> "MyCompany1.InternalTest.MyCompany_InternalClass". >> >> -- >> HTH, >> >> Kevin Spencer >> Microsoft MVP >> Professional Numbskull >> >> Show me your certification without works, >> and I'll show my certification >> *by* my works. >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> news:A16DFDBC-BC21-45E6-858C-475193A8183A@microsoft.com... >> > Hello Kevin, >> > >> > thank for your replies, but please read carefully - when the problem >> > apears >> > >> > >> > !!! i changed only the namespace of the internalClass from >> > >> > original >> > >> >> > Namespace MyCompany1.InternalTest ' the external namespace is still >> >> > MyCompany >> >> > Public Class MyCompany_InternalClass >> >> > Public Function Test() As String >> >> > Return "InternalTest" >> >> > End Function >> >> > End Class >> >> > End Namespace >> > >> > to >> >> > Namespace MyCompany.InternalTest 'now the namespace from the >> >> > internal >> >> > and external call are the same >> >> > Public Class MyCompany_InternalClass >> >> > Public Function Test() As String >> >> > Return "InternalTest" >> >> > End Function >> >> > End Class >> >> > End Namespace >> > >> > after this change error apears in the line >> > Dim oExternalLib As New MyCompany.FBLib1 '!!! ( visual studio could >> > not >> > more reference the external dll !!!! - as soon the namespace has the >> > same >> > name >> > >> > 'for the the external class (the dll - was not modified - it has the >> > namespace MyCompany - but is no more visible in the asp.net class and >> > thats >> > my problem >> > >> > >> > thanks >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > "Kevin Spencer" wrote: >> > >> >> > BUT - if i try to change the Namespace for the internalClass from >> >> > MyCompany1 >> >> > to MyCompany1 then i get the error >> >> > >> >> > >> >> > >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> >> > 'MyCompany.FBLib1' is not defined. >> >> >> >> The error message indicates that your code is referencing the >> >> namespace >> >> "MyCompany" whereas you have said that you renamed the namespace to >> >> "MyCompany1." >> >> >> >> -- >> >> HTH, >> >> >> >> Kevin Spencer >> >> Microsoft MVP >> >> Professional Numbskull >> >> >> >> Show me your certification without works, >> >> and I'll show my certification >> >> *by* my works. >> >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> >> news:AEABD5E3-431D-415A-8B78-BE49CBED5BA5@microsoft.com... >> >> > The error message is: >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> >> > 'MyCompany.FBLib1' is not defined. >> >> > >> >> > i show the the steps to get reproduce error. >> >> > >> >> > >> >> > >> >> > *in a ASP.Net application with the namespace WebApp1 there is a >> >> > webform >> >> > "WebForm1.aspx" >> >> > In the webform there are to labels (Label1 and Label2) If i push the >> >> > button >> >> > the following code is executed >> >> > >> >> > >> >> > Dim oExternalLib As New MyCompany.FBLib1 >> >> > Label1.Text = oExternalLib.FBEcho("Hello") >> >> > >> >> > Dim oInternalClass As >> >> > MyCompany1.InternalTest.MyCompany_InternalClass >> >> > Label2.Text = oInternalClass.Test >> >> > >> >> > >> >> > All works ok. >> >> > >> >> > The code for my internal class (in the asp,net application) >> >> > Namespace MyCompany.InternalTest >> >> > Public Class MyCompany_InternalClass >> >> > Public Function Test() As String >> >> > Return "InternalTest" >> >> > End Function >> >> > End Class >> >> > End Namespace >> >> > >> >> > >> >> > BUT - if i try to change the Namespace for the internalClass from >> >> > MyCompany1 >> >> > to MyCompany1 then i get the error >> >> > >> >> > >> >> > >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> >> > 'MyCompany.FBLib1' is not defined. >> >> > >> >> > i hope you understand now my problem. >> >> > best regards >> >> > >> >> > >> >> > >> >> > "Kevin Spencer" wrote: >> >> > >> >> >> What problem? >> >> >> >> >> >> -- >> >> >> HTH, >> >> >> >> >> >> Kevin Spencer >> >> >> Microsoft MVP >> >> >> Professional Numbskull >> >> >> >> >> >> Show me your certification without works, >> >> >> and I'll show my certification >> >> >> *by* my works. >> >> >> >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> >> >> news:83F2C730-8F8B-4A85-89B5-169821114207@microsoft.com... >> >> >> > the problem apears in the case when in the main application i >> >> >> > also >> >> >> > have >> >> >> > some >> >> >> > calsses with the same namespace (for example when in the asp.net >> >> >> > application >> >> >> > i create classes with a explicit entry of Namespace >> >> >> > mycompany..... >> >> >> > >> >> >> > The same problem apears if i change the namespace of the asp.net >> >> >> > application >> >> >> > to mycompany.myapplication >> >> >> > >> >> >> > thanks >> >> >> > >> >> >> > >> >> >> > >> >> >> > "Kevin Spencer" wrote: >> >> >> > >> >> >> >> I'm not sure I understand the question. I too have several >> >> >> >> different >> >> >> >> assemblies having namespaces that all begin with my company >> >> >> >> name, >> >> >> >> such >> >> >> >> as >> >> >> >> DsiGlobal, DsiGlobal.Net, DsiGlobal.Imaging, etc., but they are >> >> >> >> in >> >> >> >> separate >> >> >> >> assemblies, which must all be included in any project that >> >> >> >> employs >> >> >> >> more >> >> >> >> than >> >> >> >> one of them. This is actually a good thing, as it doesn't >> >> >> >> necessitate >> >> >> >> loading any code not needed by the present app. So, what exactly >> >> >> >> is >> >> >> >> the >> >> >> >> problem? >> >> >> >> >> >> >> >> -- >> >> >> >> HTH, >> >> >> >> >> >> >> >> Kevin Spencer >> >> >> >> Microsoft MVP >> >> >> >> Professional Numbskull >> >> >> >> >> >> >> >> Show me your certification without works, >> >> >> >> and I'll show my certification >> >> >> >> *by* my works. >> >> >> >> >> >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> >> >> >> news:8235F9B5-5400-4AC5-8D15-974527166849@microsoft.com... >> >> >> >> > hello, >> >> >> >> > >> >> >> >> > all my libraries (dll - .NET 1.1) have there own namespace >> >> >> >> > which >> >> >> >> > starts >> >> >> >> > with >> >> >> >> > "mycompany....." >> >> >> >> > >> >> >> >> > If i have now also own classes in the application - i want >> >> >> >> > also >> >> >> >> > to >> >> >> >> > use >> >> >> >> > the >> >> >> >> > same namespace - but i see that the i can not more access the >> >> >> >> > my >> >> >> >> > external >> >> >> >> > referenced libraries. >> >> >> >> > >> >> >> >> > Is it not possible this - ore what must i do. I did not want >> >> >> >> > to >> >> >> >> > embed >> >> >> >> > my >> >> >> >> > general libraries in the application (like encryption ....). >> >> >> >> > The >> >> >> >> > specific >> >> >> >> > DAL >> >> >> >> > for the application i embed in the application - but i want to >> >> >> >> > use >> >> >> >> > as >> >> >> >> > namespace mycompany - name. >> >> >> >> > >> >> >> >> > Also i want to have the flexibility to choose where to the >> >> >> >> > code >> >> >> >> > (external >> >> >> >> > dll or as internal class) and the best way is to have the same >> >> >> >> > namespace. >> >> >> >> > >> >> >> >> > any ideas - or recomandation? >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> you see that in step 3 all works - i can call the function from the FBib....
The problem apears only when i change in the asp.net project the value of the namespace how discribed in 4 a and b. Can you please try to create this short solution how described in the steps 1 -3,4 then you could very simple reproduce the error and we could see if this is a bug in VS2003 thanks Show quote "Kevin Spencer" wrote: > It looks to me like you didn't update your reference. See Step 2c: > > > c) add a project reference to the ClassLibrary (FBLib) - created in step 1 > > In your explanation, you did not mention anything about updating the > reference. > > It might help if you just post the code verbatim. No need to post the code > that worked, just the code that didn't. > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Professional Numbskull > > Show me your certification without works, > and I'll show my certification > *by* my works. > > "Xavier" <Xav***@discussions.microsoft.com> wrote in message > news:92C731CD-DE0D-42D4-B176-FBF9FB883F60@microsoft.com... > > sorry - here are all details to reproduce the errorr in VS2003 (.NET 1.1) > > > > create a solution with 2 projects > > a -> a classlibrary with the Name FBlib > > b ->a asp.net application with the name Webapp1 > > > > > > 1*- create a new class library (FBlib) with only a class ( root namespace > > in property of VS i deleted) > > Content of the classfile FBLib1.vb > > > > Namespace MyCompany > > Public Class FBLib1 > > Function FBEcho(ByVal vIn As String) As String > > Return vIn > > End Function > > End Class > > End Namespace > > > > 2*add a asp.net project (Webapp1) with > > a) a ClassFile - FileName MyCompany.InternalClass.vb content: > > > > Namespace MyCompany1.InternalTest > > Public Class MyCompany_InternalClass > > Public Function Test() As String > > Return "InternalTest" > > End Function > > End Class > > End Namespace > > > > b) create a standard aspx page WebForm1.aspx with code behind > > c) add a project reference to the ClassLibrary (FBLib) - created in step 1 > > d)add to the aspx page a 2 labels (Label1 and Label2) and a button > > e)in the button event add please > > > > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > > System.EventArgs) Handles Button1.Click > > Dim oExternalLib As New MyCompany.FBLib1 > > Label1.Text = oExternalLib.FBEcho("Hello-from externalLib") > > > > Dim oInternalClass As New > > MyCompany1.InternalTest.MyCompany_InternalClass > > Label2.Text = oInternalClass.Test > > End Sub > > > > 3*STRG + F5 - click on the button and the aspx page will display > > > > Hello-from externalLib > > InternalTest > > > > still here all works OK > > > > 4*error reproducion > > > > a)change in the file from step 2a the namespace > > Namespace MyCompany1.InternalTest TO -> Namespace MyCompany.InternalTest > > > > b)in WebForm1.aspx.vb correct the line > > > > from Dim oInternalClass As New > > MyCompany1.InternalTest.MyCompany_InternalClass > > to Dim oInternalClass As New > > MyCompany.InternalTest.MyCompany_InternalClass > > > > > > and no compilation is possible - error in line > > Dim oExternalLib As New MyCompany.FBLib1 - is displayed !!!!!!!!!!!! > > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(31): Type > > 'MyCompany.FBLib1' is not defined. > > > > > > i hope now you can reproduce the error > > thanks > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > "Kevin Spencer" wrote: > > > >> I *did* read carefully, Xavier. However, without good information from > >> you, > >> I can't be of much help. > >> > >> Here's what you say the line of code that throws the error says: > >> > Dim oExternalLib As New MyCompany.FBLib1 > >> > >> Here's the error message: > >> > >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> > 'MyCompany.FBLib1' is not defined. > >> > >> Here's your class definition: > >> > >> >> > Namespace MyCompany1.InternalTest ' the external namespace is still > >> >> > MyCompany > >> >> > Public Class MyCompany_InternalClass > >> >> > Public Function Test() As String > >> >> > Return "InternalTest" > >> >> > End Function > >> >> > End Class > >> >> > End Namespace > >> > >> I don't see *any* class named "FBLib1." Therefore, what you're telling me > >> you're doing, and what you're doing are 2 entirely different things. I > >> can > >> only guess. The error message indicates that "MyCompany.FBLib1" is not > >> defined. I have yet to see any definition of it myself. What I *have* > >> seen a > >> definition of is two classes: > >> "MyCompany.InternalTest.MyCompany_InternalClass" and > >> "MyCompany1.InternalTest.MyCompany_InternalClass". > >> > >> -- > >> HTH, > >> > >> Kevin Spencer > >> Microsoft MVP > >> Professional Numbskull > >> > >> Show me your certification without works, > >> and I'll show my certification > >> *by* my works. > >> > >> > >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> news:A16DFDBC-BC21-45E6-858C-475193A8183A@microsoft.com... > >> > Hello Kevin, > >> > > >> > thank for your replies, but please read carefully - when the problem > >> > apears > >> > > >> > > >> > !!! i changed only the namespace of the internalClass from > >> > > >> > original > >> > > >> >> > Namespace MyCompany1.InternalTest ' the external namespace is still > >> >> > MyCompany > >> >> > Public Class MyCompany_InternalClass > >> >> > Public Function Test() As String > >> >> > Return "InternalTest" > >> >> > End Function > >> >> > End Class > >> >> > End Namespace > >> > > >> > to > >> >> > Namespace MyCompany.InternalTest 'now the namespace from the > >> >> > internal > >> >> > and external call are the same > >> >> > Public Class MyCompany_InternalClass > >> >> > Public Function Test() As String > >> >> > Return "InternalTest" > >> >> > End Function > >> >> > End Class > >> >> > End Namespace > >> > > >> > after this change error apears in the line > >> > Dim oExternalLib As New MyCompany.FBLib1 '!!! ( visual studio could > >> > not > >> > more reference the external dll !!!! - as soon the namespace has the > >> > same > >> > name > >> > > >> > 'for the the external class (the dll - was not modified - it has the > >> > namespace MyCompany - but is no more visible in the asp.net class and > >> > thats > >> > my problem > >> > > >> > > >> > thanks > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > "Kevin Spencer" wrote: > >> > > >> >> > BUT - if i try to change the Namespace for the internalClass from > >> >> > MyCompany1 > >> >> > to MyCompany1 then i get the error > >> >> > > >> >> > > >> >> > > >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> >> > 'MyCompany.FBLib1' is not defined. > >> >> > >> >> The error message indicates that your code is referencing the > >> >> namespace > >> >> "MyCompany" whereas you have said that you renamed the namespace to > >> >> "MyCompany1." > >> >> > >> >> -- > >> >> HTH, > >> >> > >> >> Kevin Spencer > >> >> Microsoft MVP > >> >> Professional Numbskull > >> >> > >> >> Show me your certification without works, > >> >> and I'll show my certification > >> >> *by* my works. > >> >> > >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> >> news:AEABD5E3-431D-415A-8B78-BE49CBED5BA5@microsoft.com... > >> >> > The error message is: > >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> >> > 'MyCompany.FBLib1' is not defined. > >> >> > > >> >> > i show the the steps to get reproduce error. > >> >> > > >> >> > > >> >> > > >> >> > *in a ASP.Net application with the namespace WebApp1 there is a > >> >> > webform > >> >> > "WebForm1.aspx" > >> >> > In the webform there are to labels (Label1 and Label2) If i push the > >> >> > button > >> >> > the following code is executed > >> >> > > >> >> > > >> >> > Dim oExternalLib As New MyCompany.FBLib1 > >> >> > Label1.Text = oExternalLib.FBEcho("Hello") > >> >> > > >> >> > Dim oInternalClass As > >> >> > MyCompany1.InternalTest.MyCompany_InternalClass > >> >> > Label2.Text = oInternalClass.Test > >> >> > > >> >> > > >> >> > All works ok. > >> >> > > >> >> > The code for my internal class (in the asp,net application) > >> >> > Namespace MyCompany.InternalTest > >> >> > Public Class MyCompany_InternalClass > >> >> > Public Function Test() As String > >> >> > Return "InternalTest" > >> >> > End Function > >> >> > End Class > >> >> > End Namespace > >> >> > > >> >> > > >> >> > BUT - if i try to change the Namespace for the internalClass from > >> >> > MyCompany1 > >> >> > to MyCompany1 then i get the error > >> >> > > >> >> > > >> >> > > >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> >> > 'MyCompany.FBLib1' is not defined. > >> >> > > >> >> > i hope you understand now my problem. > >> >> > best regards > >> >> > > >> >> > > >> >> > > >> >> > "Kevin Spencer" wrote: > >> >> > > >> >> >> What problem? > >> >> >> > >> >> >> -- > >> >> >> HTH, > >> >> >> > Can you please try to create this short solution how described in the No, I don't have time for that. I told you what it looked like the problem > steps > 1 -3,4 then you could very simple reproduce the error and we could see if > this is a bug in VS2003 was. It is not a bug in VS.Net. -- Show quoteHTH, Kevin Spencer Microsoft MVP Professional Numbskull Show me your certification without works, and I'll show my certification *by* my works. "Xavier" <Xav***@discussions.microsoft.com> wrote in message news:01AE5ED6-FD6D-41B3-9964-298E0C1A6F38@microsoft.com... > you see that in step 3 all works - i can call the function from the > FBib.... > > The problem apears only when i change in the asp.net project the value of > the namespace how discribed in 4 a and b. > > Can you please try to create this short solution how described in the > steps > 1 -3,4 then you could very simple reproduce the error and we could see if > this is a bug in VS2003 > > thanks > > > "Kevin Spencer" wrote: > >> It looks to me like you didn't update your reference. See Step 2c: >> >> > c) add a project reference to the ClassLibrary (FBLib) - created in >> > step 1 >> >> In your explanation, you did not mention anything about updating the >> reference. >> >> It might help if you just post the code verbatim. No need to post the >> code >> that worked, just the code that didn't. >> >> -- >> HTH, >> >> Kevin Spencer >> Microsoft MVP >> Professional Numbskull >> >> Show me your certification without works, >> and I'll show my certification >> *by* my works. >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> news:92C731CD-DE0D-42D4-B176-FBF9FB883F60@microsoft.com... >> > sorry - here are all details to reproduce the errorr in VS2003 (.NET >> > 1.1) >> > >> > create a solution with 2 projects >> > a -> a classlibrary with the Name FBlib >> > b ->a asp.net application with the name Webapp1 >> > >> > >> > 1*- create a new class library (FBlib) with only a class ( root >> > namespace >> > in property of VS i deleted) >> > Content of the classfile FBLib1.vb >> > >> > Namespace MyCompany >> > Public Class FBLib1 >> > Function FBEcho(ByVal vIn As String) As String >> > Return vIn >> > End Function >> > End Class >> > End Namespace >> > >> > 2*add a asp.net project (Webapp1) with >> > a) a ClassFile - FileName MyCompany.InternalClass.vb content: >> > >> > Namespace MyCompany1.InternalTest >> > Public Class MyCompany_InternalClass >> > Public Function Test() As String >> > Return "InternalTest" >> > End Function >> > End Class >> > End Namespace >> > >> > b) create a standard aspx page WebForm1.aspx with code behind >> > c) add a project reference to the ClassLibrary (FBLib) - created in >> > step 1 >> > d)add to the aspx page a 2 labels (Label1 and Label2) and a button >> > e)in the button event add please >> > >> > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As >> > System.EventArgs) Handles Button1.Click >> > Dim oExternalLib As New MyCompany.FBLib1 >> > Label1.Text = oExternalLib.FBEcho("Hello-from externalLib") >> > >> > Dim oInternalClass As New >> > MyCompany1.InternalTest.MyCompany_InternalClass >> > Label2.Text = oInternalClass.Test >> > End Sub >> > >> > 3*STRG + F5 - click on the button and the aspx page will display >> > >> > Hello-from externalLib >> > InternalTest >> > >> > still here all works OK >> > >> > 4*error reproducion >> > >> > a)change in the file from step 2a the namespace >> > Namespace MyCompany1.InternalTest TO -> Namespace >> > MyCompany.InternalTest >> > >> > b)in WebForm1.aspx.vb correct the line >> > >> > from Dim oInternalClass As New >> > MyCompany1.InternalTest.MyCompany_InternalClass >> > to Dim oInternalClass As New >> > MyCompany.InternalTest.MyCompany_InternalClass >> > >> > >> > and no compilation is possible - error in line >> > Dim oExternalLib As New MyCompany.FBLib1 - is displayed !!!!!!!!!!!! >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(31): Type >> > 'MyCompany.FBLib1' is not defined. >> > >> > >> > i hope now you can reproduce the error >> > thanks >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > "Kevin Spencer" wrote: >> > >> >> I *did* read carefully, Xavier. However, without good information from >> >> you, >> >> I can't be of much help. >> >> >> >> Here's what you say the line of code that throws the error says: >> >> > Dim oExternalLib As New MyCompany.FBLib1 >> >> >> >> Here's the error message: >> >> >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> >> > 'MyCompany.FBLib1' is not defined. >> >> >> >> Here's your class definition: >> >> >> >> >> > Namespace MyCompany1.InternalTest ' the external namespace is >> >> >> > still >> >> >> > MyCompany >> >> >> > Public Class MyCompany_InternalClass >> >> >> > Public Function Test() As String >> >> >> > Return "InternalTest" >> >> >> > End Function >> >> >> > End Class >> >> >> > End Namespace >> >> >> >> I don't see *any* class named "FBLib1." Therefore, what you're telling >> >> me >> >> you're doing, and what you're doing are 2 entirely different things. I >> >> can >> >> only guess. The error message indicates that "MyCompany.FBLib1" is not >> >> defined. I have yet to see any definition of it myself. What I *have* >> >> seen a >> >> definition of is two classes: >> >> "MyCompany.InternalTest.MyCompany_InternalClass" and >> >> "MyCompany1.InternalTest.MyCompany_InternalClass". >> >> >> >> -- >> >> HTH, >> >> >> >> Kevin Spencer >> >> Microsoft MVP >> >> Professional Numbskull >> >> >> >> Show me your certification without works, >> >> and I'll show my certification >> >> *by* my works. >> >> >> >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> >> news:A16DFDBC-BC21-45E6-858C-475193A8183A@microsoft.com... >> >> > Hello Kevin, >> >> > >> >> > thank for your replies, but please read carefully - when the problem >> >> > apears >> >> > >> >> > >> >> > !!! i changed only the namespace of the internalClass from >> >> > >> >> > original >> >> > >> >> >> > Namespace MyCompany1.InternalTest ' the external namespace is >> >> >> > still >> >> >> > MyCompany >> >> >> > Public Class MyCompany_InternalClass >> >> >> > Public Function Test() As String >> >> >> > Return "InternalTest" >> >> >> > End Function >> >> >> > End Class >> >> >> > End Namespace >> >> > >> >> > to >> >> >> > Namespace MyCompany.InternalTest 'now the namespace from the >> >> >> > internal >> >> >> > and external call are the same >> >> >> > Public Class MyCompany_InternalClass >> >> >> > Public Function Test() As String >> >> >> > Return "InternalTest" >> >> >> > End Function >> >> >> > End Class >> >> >> > End Namespace >> >> > >> >> > after this change error apears in the line >> >> > Dim oExternalLib As New MyCompany.FBLib1 '!!! ( visual studio >> >> > could >> >> > not >> >> > more reference the external dll !!!! - as soon the namespace has >> >> > the >> >> > same >> >> > name >> >> > >> >> > 'for the the external class (the dll - was not modified - it has the >> >> > namespace MyCompany - but is no more visible in the asp.net class >> >> > and >> >> > thats >> >> > my problem >> >> > >> >> > >> >> > thanks >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > "Kevin Spencer" wrote: >> >> > >> >> >> > BUT - if i try to change the Namespace for the internalClass from >> >> >> > MyCompany1 >> >> >> > to MyCompany1 then i get the error >> >> >> > >> >> >> > >> >> >> > >> >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> >> >> > 'MyCompany.FBLib1' is not defined. >> >> >> >> >> >> The error message indicates that your code is referencing the >> >> >> namespace >> >> >> "MyCompany" whereas you have said that you renamed the namespace to >> >> >> "MyCompany1." >> >> >> >> >> >> -- >> >> >> HTH, >> >> >> >> >> >> Kevin Spencer >> >> >> Microsoft MVP >> >> >> Professional Numbskull >> >> >> >> >> >> Show me your certification without works, >> >> >> and I'll show my certification >> >> >> *by* my works. >> >> >> >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message >> >> >> news:AEABD5E3-431D-415A-8B78-BE49CBED5BA5@microsoft.com... >> >> >> > The error message is: >> >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> >> >> > 'MyCompany.FBLib1' is not defined. >> >> >> > >> >> >> > i show the the steps to get reproduce error. >> >> >> > >> >> >> > >> >> >> > >> >> >> > *in a ASP.Net application with the namespace WebApp1 there is a >> >> >> > webform >> >> >> > "WebForm1.aspx" >> >> >> > In the webform there are to labels (Label1 and Label2) If i push >> >> >> > the >> >> >> > button >> >> >> > the following code is executed >> >> >> > >> >> >> > >> >> >> > Dim oExternalLib As New MyCompany.FBLib1 >> >> >> > Label1.Text = oExternalLib.FBEcho("Hello") >> >> >> > >> >> >> > Dim oInternalClass As >> >> >> > MyCompany1.InternalTest.MyCompany_InternalClass >> >> >> > Label2.Text = oInternalClass.Test >> >> >> > >> >> >> > >> >> >> > All works ok. >> >> >> > >> >> >> > The code for my internal class (in the asp,net application) >> >> >> > Namespace MyCompany.InternalTest >> >> >> > Public Class MyCompany_InternalClass >> >> >> > Public Function Test() As String >> >> >> > Return "InternalTest" >> >> >> > End Function >> >> >> > End Class >> >> >> > End Namespace >> >> >> > >> >> >> > >> >> >> > BUT - if i try to change the Namespace for the internalClass from >> >> >> > MyCompany1 >> >> >> > to MyCompany1 then i get the error >> >> >> > >> >> >> > >> >> >> > >> >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type >> >> >> > 'MyCompany.FBLib1' is not defined. >> >> >> > >> >> >> > i hope you understand now my problem. >> >> >> > best regards >> >> >> > >> >> >> > >> >> >> > >> >> >> > "Kevin Spencer" wrote: >> >> >> > >> >> >> >> What problem? >> >> >> >> >> >> >> >> -- >> >> >> >> HTH, >> >> >> >> i fully understand that you have no time, but i think it is a bug in VSNet
because all works ok still i did not use the same Namespace as the Namespace of the external lib. thanks for your help. Show quote "Kevin Spencer" wrote: > > Can you please try to create this short solution how described in the > > steps > > 1 -3,4 then you could very simple reproduce the error and we could see if > > this is a bug in VS2003 > > No, I don't have time for that. I told you what it looked like the problem > was. It is not a bug in VS.Net. > > -- > HTH, > > Kevin Spencer > Microsoft MVP > Professional Numbskull > > Show me your certification without works, > and I'll show my certification > *by* my works. > > "Xavier" <Xav***@discussions.microsoft.com> wrote in message > news:01AE5ED6-FD6D-41B3-9964-298E0C1A6F38@microsoft.com... > > you see that in step 3 all works - i can call the function from the > > FBib.... > > > > The problem apears only when i change in the asp.net project the value of > > the namespace how discribed in 4 a and b. > > > > Can you please try to create this short solution how described in the > > steps > > 1 -3,4 then you could very simple reproduce the error and we could see if > > this is a bug in VS2003 > > > > thanks > > > > > > "Kevin Spencer" wrote: > > > >> It looks to me like you didn't update your reference. See Step 2c: > >> > >> > c) add a project reference to the ClassLibrary (FBLib) - created in > >> > step 1 > >> > >> In your explanation, you did not mention anything about updating the > >> reference. > >> > >> It might help if you just post the code verbatim. No need to post the > >> code > >> that worked, just the code that didn't. > >> > >> -- > >> HTH, > >> > >> Kevin Spencer > >> Microsoft MVP > >> Professional Numbskull > >> > >> Show me your certification without works, > >> and I'll show my certification > >> *by* my works. > >> > >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> news:92C731CD-DE0D-42D4-B176-FBF9FB883F60@microsoft.com... > >> > sorry - here are all details to reproduce the errorr in VS2003 (.NET > >> > 1.1) > >> > > >> > create a solution with 2 projects > >> > a -> a classlibrary with the Name FBlib > >> > b ->a asp.net application with the name Webapp1 > >> > > >> > > >> > 1*- create a new class library (FBlib) with only a class ( root > >> > namespace > >> > in property of VS i deleted) > >> > Content of the classfile FBLib1.vb > >> > > >> > Namespace MyCompany > >> > Public Class FBLib1 > >> > Function FBEcho(ByVal vIn As String) As String > >> > Return vIn > >> > End Function > >> > End Class > >> > End Namespace > >> > > >> > 2*add a asp.net project (Webapp1) with > >> > a) a ClassFile - FileName MyCompany.InternalClass.vb content: > >> > > >> > Namespace MyCompany1.InternalTest > >> > Public Class MyCompany_InternalClass > >> > Public Function Test() As String > >> > Return "InternalTest" > >> > End Function > >> > End Class > >> > End Namespace > >> > > >> > b) create a standard aspx page WebForm1.aspx with code behind > >> > c) add a project reference to the ClassLibrary (FBLib) - created in > >> > step 1 > >> > d)add to the aspx page a 2 labels (Label1 and Label2) and a button > >> > e)in the button event add please > >> > > >> > Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As > >> > System.EventArgs) Handles Button1.Click > >> > Dim oExternalLib As New MyCompany.FBLib1 > >> > Label1.Text = oExternalLib.FBEcho("Hello-from externalLib") > >> > > >> > Dim oInternalClass As New > >> > MyCompany1.InternalTest.MyCompany_InternalClass > >> > Label2.Text = oInternalClass.Test > >> > End Sub > >> > > >> > 3*STRG + F5 - click on the button and the aspx page will display > >> > > >> > Hello-from externalLib > >> > InternalTest > >> > > >> > still here all works OK > >> > > >> > 4*error reproducion > >> > > >> > a)change in the file from step 2a the namespace > >> > Namespace MyCompany1.InternalTest TO -> Namespace > >> > MyCompany.InternalTest > >> > > >> > b)in WebForm1.aspx.vb correct the line > >> > > >> > from Dim oInternalClass As New > >> > MyCompany1.InternalTest.MyCompany_InternalClass > >> > to Dim oInternalClass As New > >> > MyCompany.InternalTest.MyCompany_InternalClass > >> > > >> > > >> > and no compilation is possible - error in line > >> > Dim oExternalLib As New MyCompany.FBLib1 - is displayed !!!!!!!!!!!! > >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(31): Type > >> > 'MyCompany.FBLib1' is not defined. > >> > > >> > > >> > i hope now you can reproduce the error > >> > thanks > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > > >> > "Kevin Spencer" wrote: > >> > > >> >> I *did* read carefully, Xavier. However, without good information from > >> >> you, > >> >> I can't be of much help. > >> >> > >> >> Here's what you say the line of code that throws the error says: > >> >> > Dim oExternalLib As New MyCompany.FBLib1 > >> >> > >> >> Here's the error message: > >> >> > >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> >> > 'MyCompany.FBLib1' is not defined. > >> >> > >> >> Here's your class definition: > >> >> > >> >> >> > Namespace MyCompany1.InternalTest ' the external namespace is > >> >> >> > still > >> >> >> > MyCompany > >> >> >> > Public Class MyCompany_InternalClass > >> >> >> > Public Function Test() As String > >> >> >> > Return "InternalTest" > >> >> >> > End Function > >> >> >> > End Class > >> >> >> > End Namespace > >> >> > >> >> I don't see *any* class named "FBLib1." Therefore, what you're telling > >> >> me > >> >> you're doing, and what you're doing are 2 entirely different things. I > >> >> can > >> >> only guess. The error message indicates that "MyCompany.FBLib1" is not > >> >> defined. I have yet to see any definition of it myself. What I *have* > >> >> seen a > >> >> definition of is two classes: > >> >> "MyCompany.InternalTest.MyCompany_InternalClass" and > >> >> "MyCompany1.InternalTest.MyCompany_InternalClass". > >> >> > >> >> -- > >> >> HTH, > >> >> > >> >> Kevin Spencer > >> >> Microsoft MVP > >> >> Professional Numbskull > >> >> > >> >> Show me your certification without works, > >> >> and I'll show my certification > >> >> *by* my works. > >> >> > >> >> > >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> >> news:A16DFDBC-BC21-45E6-858C-475193A8183A@microsoft.com... > >> >> > Hello Kevin, > >> >> > > >> >> > thank for your replies, but please read carefully - when the problem > >> >> > apears > >> >> > > >> >> > > >> >> > !!! i changed only the namespace of the internalClass from > >> >> > > >> >> > original > >> >> > > >> >> >> > Namespace MyCompany1.InternalTest ' the external namespace is > >> >> >> > still > >> >> >> > MyCompany > >> >> >> > Public Class MyCompany_InternalClass > >> >> >> > Public Function Test() As String > >> >> >> > Return "InternalTest" > >> >> >> > End Function > >> >> >> > End Class > >> >> >> > End Namespace > >> >> > > >> >> > to > >> >> >> > Namespace MyCompany.InternalTest 'now the namespace from the > >> >> >> > internal > >> >> >> > and external call are the same > >> >> >> > Public Class MyCompany_InternalClass > >> >> >> > Public Function Test() As String > >> >> >> > Return "InternalTest" > >> >> >> > End Function > >> >> >> > End Class > >> >> >> > End Namespace > >> >> > > >> >> > after this change error apears in the line > >> >> > Dim oExternalLib As New MyCompany.FBLib1 '!!! ( visual studio > >> >> > could > >> >> > not > >> >> > more reference the external dll !!!! - as soon the namespace has > >> >> > the > >> >> > same > >> >> > name > >> >> > > >> >> > 'for the the external class (the dll - was not modified - it has the > >> >> > namespace MyCompany - but is no more visible in the asp.net class > >> >> > and > >> >> > thats > >> >> > my problem > >> >> > > >> >> > > >> >> > thanks > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > "Kevin Spencer" wrote: > >> >> > > >> >> >> > BUT - if i try to change the Namespace for the internalClass from > >> >> >> > MyCompany1 > >> >> >> > to MyCompany1 then i get the error > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> >> >> > 'MyCompany.FBLib1' is not defined. > >> >> >> > >> >> >> The error message indicates that your code is referencing the > >> >> >> namespace > >> >> >> "MyCompany" whereas you have said that you renamed the namespace to > >> >> >> "MyCompany1." > >> >> >> > >> >> >> -- > >> >> >> HTH, > >> >> >> > >> >> >> Kevin Spencer > >> >> >> Microsoft MVP > >> >> >> Professional Numbskull > >> >> >> > >> >> >> Show me your certification without works, > >> >> >> and I'll show my certification > >> >> >> *by* my works. > >> >> >> > >> >> >> "Xavier" <Xav***@discussions.microsoft.com> wrote in message > >> >> >> news:AEABD5E3-431D-415A-8B78-BE49CBED5BA5@microsoft.com... > >> >> >> > The error message is: > >> >> >> > C:\Inetpub\10.118.164.237_81\WebApp1\WebForm1.aspx.vb(33): Type > >> >> >> > 'MyCompany.FBLib1' is not defined. > >> >> >> > > >> >> >> > i show the the steps to get reproduce error. > >> >> >> > > >> >> >> > > >> >> >> >
Other interesting topics
| |||||||||||||||||||||||