#### Trying to create .net assembly - Getting error The namespace '<global namespace>' already contains a definition for

I'm just migrated a pfc based application from 10.5 to 12.1.
The main reason for the migration was to reuse code in a
.net application.  To that end I've attempted to create a
.net assembly.  After adding the .net assembly target using
the existing app I then tried to deply it but get the
following error:

Error when compiling generated C# code:
a_madcst(4,16): error CS0101: The namespace '<global

Thank You ,
Mike

 0
Mike
11/10/2010 12:39:52 PM
sybase.powerbuilder.net 284 articles. 0 followers.

9 Replies
1380 Views

Similar Articles

[PageSpeed] 40

Mike,

Did you migrate to Classic or WPF .NET?  My guess is .NET from the
compiler message below - correct?

When you created the .NET assembly  - did you by any chance name it the
same as the application?  From the message it looks like you have two
application objects (a_madcst) with the same name.

When you say that "adding the .net assembly target using
the existing app  "  Do you mean you added the assembly as a reference

My guess also is that you did not put the code objects inside the
assembly in a separate namespace and that you still have objects with
the same names in your main app?

--
Yakov
eLearnIT LLC
Blog: http://yakovwerde.sys-con.com
Web Site: http://www.eLearnITOnline.com

On 11/10/2010 7:39 AM, Mike Kennedy wrote:
> I'm just migrated a pfc based application from 10.5 to 12.1.
>   The main reason for the migration was to reuse code in a
> .net application.  To that end I've attempted to create a
> .net assembly.  After adding the .net assembly target using
> the existing app I then tried to deply it but get the
> following error:
>
>
> Error when compiling generated C# code:
> a_madcst(4,16): error CS0101: The namespace '<global
>
>
>
> Thank You ,
> Mike


 0
Yakov
11/10/2010 3:21:42 PM
Yakov,

I recreated the project and attached screen images for each
step.  There are now other issues, summarized here :

I migrated to PB Classic.  When I create the new Target (a
.net assembly) I choose the option to "Use LIbrary List from
Existing Target"  which is my original application.  I
choose that target from the workspace (a_madcst) and then
name it to another target(product_assembly).   I then name
the project (p_product_assembly), sepcify a namespace and
assembly (maps.product), pick nvo to be deployed, include no
resource files and then name the setup file
(maps_product_setup.exe).  I get the ready to create .net
assembly screen and click finish.  I then rebuild the new
target .  Then I attempt to go into the new project and now
I get a message saying "Unable to open this project because
the add-on software used to create it could not be
found....."

Thank You,
Mike

> Mike,
> Please clarify a few things
>
> Did you migrate to Classic or WPF .NET?  My guess is .NET
> from the  compiler message below - correct?
>
> When you created the .NET assembly  - did you by any
> chance name it the  same as the application?  From the
> message it looks like you have two  application objects
> (a_madcst) with the same name.
>
> When you say that "adding the .net assembly target using
> the existing app  "  Do you mean you added the assembly as
> a reference  to your existing application?
>
> My guess also is that you did not put the code objects
> inside the  assembly in a separate namespace and that you
> still have objects with  the same names in your main app?
>
> --
> Yakov
> eLearnIT LLC
> Blog: http://yakovwerde.sys-con.com
> Web Site: http://www.eLearnITOnline.com
>
> On 11/10/2010 7:39 AM, Mike Kennedy wrote:
> > I'm just migrated a pfc based application from 10.5 to
> >   12.1. The main reason for the migration was to reuse
> > code in a .net application.  To that end I've attempted
> > to create a .net assembly.  After adding the .net
> > assembly target using the existing app I then tried to
> > deply it but get the following error:
> >
> >
> > Error when compiling generated C# code:
> > a_madcst(4,16): error CS0101: The namespace '<global
> > namespace>' already contains a definition for
> >
> > Any help you can give me would be much appreciated.
> >
> > Thank You ,
> > Mike
>
>

 0
Mike
11/19/2010 12:49:25 AM
Mike

I've never seen the message "Unable to open this project because
the add-on software used to create it could not be found....."  However,

To recreate what you described, I took a non trivial 5 PBL Classic app
in 12.1 (ABNC) and created a .NET assembly from it, choosing "use
library list from existing target"
Everything was in the app - the visual objects, together with the NVOs
and all the supportive classes (DWOs, DataStores, Structures, Global
Functions)  I made sure to select a couple of NVOs with public functions
with .NET compatible types as params and returns only to expose in the
interface.

I then deployed the assembly. No error messages.

Then I tool ILDASM.exe (the .NET SDK disassembler) and looked inside the
code generated.  Holy Cow Batman, all the visual objects (windows,
menus, SVUOs were inside the assembly!!  Two interface classes were
generated that internally rerouted control to the original object that
were now renamed with the prefix C__.  The rest of the stuff was

I understand the convenience of a quick wizard conversion and
deployment, but why carry all that dead weight around?

My understanding of an approach to the assembly creation process would
be to create a new .NET assembly target, move in only the code classes
needed; the NVOs and their supportive classes  (DWOs, DataStores,
Structures, Global Functions) into an application and then deploy it.

HTH
--
Yakov
eLearnIT LLC
Blog: http://yakovwerde.sys-con.com
Web Site: http://www.eLearnITOnline.com

On 11/18/2010 7:49 PM, Mike Kennedy wrote:
> Yakov,
>
> I recreated the project and attached screen images for each
> step.  There are now other issues, summarized here :
>
> I migrated to PB Classic.  When I create the new Target (a
> .net assembly) I choose the option to "Use Library List from
> Existing Target"  which is my original application.  I
> choose that target from the workspace (a_madcst) and then
> name it to another target(product_assembly).   I then name
> the project (p_product_assembly), specify a namespace and
> assembly (maps.product), pick nvo to be deployed, include no
> resource files and then name the setup file
> (maps_product_setup.exe).  I get the ready to create .net
> assembly screen and click finish.  I then rebuild the new
> target .  Then I attempt to go into the new project and now
> I get a message saying "Unable to open this project because
> the add-on software used to create it could not be
> found....."
>
> Thank You,
> Mike
>
>
>
>
>> Mike,
>> Please clarify a few things
>>
>> Did you migrate to Classic or WPF .NET?  My guess is .NET
>> from the  compiler message below - correct?
>>
>> When you created the .NET assembly  - did you by any
>> chance name it the  same as the application?  From the
>> message it looks like you have two  application objects
>> (a_madcst) with the same name.
>>
>> When you say that "adding the .net assembly target using
>> the existing app  "  Do you mean you added the assembly as
>> a reference  to your existing application?
>>
>> My guess also is that you did not put the code objects
>> inside the  assembly in a separate namespace and that you
>> still have objects with  the same names in your main app?
>>
>> --
>> Yakov
>> eLearnIT LLC
>> Blog: http://yakovwerde.sys-con.com
>> Web Site: http://www.eLearnITOnline.com
>>
>> On 11/10/2010 7:39 AM, Mike Kennedy wrote:
>>> I'm just migrated a pfc based application from 10.5 to
>>>    12.1. The main reason for the migration was to reuse
>>> code in a .net application.  To that end I've attempted
>>> to create a .net assembly.  After adding the .net
>>> assembly target using the existing app I then tried to
>>> deply it but get the following error:
>>>
>>>
>>> Error when compiling generated C# code:
>>> a_madcst(4,16): error CS0101: The namespace '<global
>>> namespace>' already contains a definition for
>>>
>>>
>>> Thank You ,
>>> Mike
>>
>>


 0
Yakov
11/19/2010 4:14:42 AM
That message refers to source control.    Typically what happens is that
you've somehow managed to tell PB you are using PB native scc but it's not
configured.  Could be a simple as manually registering the pbnatxxx.dll.

-- Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Yakov Werde"  wrote in message news:4ce5f9b2$1@forums-1-dub... Mike I've never seen the message "Unable to open this project because the add-on software used to create it could not be found....." However, read on. It gets interesting To recreate what you described, I took a non trivial 5 PBL Classic app in 12.1 (ABNC) and created a .NET assembly from it, choosing "use library list from existing target" Everything was in the app - the visual objects, together with the NVOs and all the supportive classes (DWOs, DataStores, Structures, Global Functions) I made sure to select a couple of NVOs with public functions with .NET compatible types as params and returns only to expose in the interface. I then deployed the assembly. No error messages. Then I tool ILDASM.exe (the .NET SDK disassembler) and looked inside the code generated. Holy Cow Batman, all the visual objects (windows, menus, SVUOs were inside the assembly!! Two interface classes were generated that internally rerouted control to the original object that were now renamed with the prefix C__. The rest of the stuff was unreferenced dead weight I understand the convenience of a quick wizard conversion and deployment, but why carry all that dead weight around? My understanding of an approach to the assembly creation process would be to create a new .NET assembly target, move in only the code classes needed; the NVOs and their supportive classes (DWOs, DataStores, Structures, Global Functions) into an application and then deploy it. HTH -- Yakov eLearnIT LLC Twitter: http://twitter.com/eLearnPB Blog: http://yakovwerde.sys-con.com Web Site: http://www.eLearnITOnline.com On 11/18/2010 7:49 PM, Mike Kennedy wrote: > Yakov, > > I recreated the project and attached screen images for each > step. There are now other issues, summarized here : > > I migrated to PB Classic. When I create the new Target (a > .net assembly) I choose the option to "Use Library List from > Existing Target" which is my original application. I > choose that target from the workspace (a_madcst) and then > name it to another target(product_assembly). I then name > the project (p_product_assembly), specify a namespace and > assembly (maps.product), pick nvo to be deployed, include no > resource files and then name the setup file > (maps_product_setup.exe). I get the ready to create .net > assembly screen and click finish. I then rebuild the new > target . Then I attempt to go into the new project and now > I get a message saying "Unable to open this project because > the add-on software used to create it could not be > found....." > > Thank You, > Mike > > > > >> Mike, >> Please clarify a few things >> >> Did you migrate to Classic or WPF .NET? My guess is .NET >> from the compiler message below - correct? >> >> When you created the .NET assembly - did you by any >> chance name it the same as the application? From the >> message it looks like you have two application objects >> (a_madcst) with the same name. >> >> When you say that "adding the .net assembly target using >> the existing app " Do you mean you added the assembly as >> a reference to your existing application? >> >> My guess also is that you did not put the code objects >> inside the assembly in a separate namespace and that you >> still have objects with the same names in your main app? >> >> -- >> Yakov >> eLearnIT LLC >> Twitter: http://twitter.com/eLearnPB >> Blog: http://yakovwerde.sys-con.com >> Web Site: http://www.eLearnITOnline.com >> >> On 11/10/2010 7:39 AM, Mike Kennedy wrote: >>> I'm just migrated a pfc based application from 10.5 to >>> 12.1. The main reason for the migration was to reuse >>> code in a .net application. To that end I've attempted >>> to create a .net assembly. After adding the .net >>> assembly target using the existing app I then tried to >>> deply it but get the following error: >>> >>> >>> Error when compiling generated C# code: >>> a_madcst(4,16): error CS0101: The namespace '<global >>> namespace>' already contains a definition for >> 'c__a_madcst'> >>> >>> Any help you can give me would be much appreciated. >>> >>> Thank You , >>> Mike >> >>   0 Terry 11/19/2010 4:08:35 PM Yakov, Thanks for clarifying what gets inlcuded in the assembly. I had wondered if somehow the picking of the NVOs filtered what got included and what didn't. Creating a new target with a new lib list will allow me to reduce some dead weight. However, this is a PFC based application having 3 levels of inheritance and this means that with pfc pbls alone there will be lot of dead weight. To rewrite that , by removing PFC references from the nvos is not a realistic option for the functions I need to expose in an assembly. What is your recommendations for .net assembly creation under these circumstances ? Thank You, Mike > That message refers to source control. Typically what > happens is that you've somehow managed to tell PB you are > using PB native scc but it's not configured. Could be a > simple as manually registering the pbnatxxx.dll. > > -- Terry Dykstra (TeamSybase) > http://powerbuilder.codeXchange.sybase.com/ > http://casexpress.sybase.com > http://my.isug.com/cgi-bin/1/c/submit_enhancement > > > "Yakov Werde" wrote in message > news:4ce5f9b2$1@forums-1-dub...
>
> Mike
>
> I've never seen the message "Unable to open this project
> because the add-on software used to create it could not be
> found....."  However, read on. It gets interesting
>
> To recreate what you described, I took a non trivial 5 PBL
> Classic app in 12.1 (ABNC) and created a .NET assembly
> from it, choosing "use library list from existing target"
> Everything was in the app - the visual objects, together
> with the NVOs and all the supportive classes (DWOs,
> DataStores, Structures, Global Functions)  I made sure to
> select a couple of NVOs with public functions with .NET
> compatible types as params and returns only to expose in
> the interface.
>
> I then deployed the assembly. No error messages.
>
> Then I tool ILDASM.exe (the .NET SDK disassembler) and
> looked inside the code generated.  Holy Cow Batman, all
> the visual objects (windows, menus, SVUOs were inside the
> assembly!!  Two interface classes were generated that
> internally rerouted control to the original object that
> were now renamed with the prefix C__.  The rest of the
> stuff was unreferenced dead weight
>
> I understand the convenience of a quick wizard conversion
> and deployment, but why carry all that dead weight around?
>
> My understanding of an approach to the assembly creation
> process would be to create a new .NET assembly target,
> move in only the code classes needed; the NVOs and their
> supportive classes  (DWOs, DataStores, Structures, Global
> Functions) into an application and then deploy it.
>
> HTH
> --
> Yakov
> eLearnIT LLC
> Blog: http://yakovwerde.sys-con.com
> Web Site: http://www.eLearnITOnline.com
>
>
> On 11/18/2010 7:49 PM, Mike Kennedy wrote:
> > Yakov,
> >
> > I recreated the project and attached screen images for
> > each step.  There are now other issues, summarized here
> : >
> > I migrated to PB Classic.  When I create the new Target
> > (a .net assembly) I choose the option to "Use Library
> > List from Existing Target"  which is my original
> > application.  I choose that target from the workspace
> > (a_madcst) and then name it to another
> > target(product_assembly).   I then name the project
> > (p_product_assembly), specify a namespace and assembly
> > (maps.product), pick nvo to be deployed, include no
> > resource files and then name the setup file
> > (maps_product_setup.exe).  I get the ready to create
> .net assembly screen and click finish.  I then rebuild the
> > new target .  Then I attempt to go into the new project
> > and now I get a message saying "Unable to open this
> > project because the add-on software used to create it
> > could not be found....."
> >
> > Thank You,
> > Mike
> >
> >
> >
> >
> >> Mike,
> >> Please clarify a few things
> >>
> >> Did you migrate to Classic or WPF .NET?  My guess is
> NET >> from the  compiler message below - correct?
> >>
> >> When you created the .NET assembly  - did you by any
> >> chance name it the  same as the application?  From the
> >> message it looks like you have two  application objects
> >> (a_madcst) with the same name.
> >>
> >> When you say that "adding the .net assembly target
> using >> the existing app  "  Do you mean you added the
> assembly as >> a reference  to your existing application?
> >>
> >> My guess also is that you did not put the code objects
> >> inside the  assembly in a separate namespace and that
> you >> still have objects with  the same names in your
> main app? >>
> >> --
> >> Yakov
> >> eLearnIT LLC
> >> Blog: http://yakovwerde.sys-con.com
> >> Web Site: http://www.eLearnITOnline.com
> >>
> >> On 11/10/2010 7:39 AM, Mike Kennedy wrote:
> >>> I'm just migrated a pfc based application from 10.5 to
> >>>    12.1. The main reason for the migration was to
> reuse >>> code in a .net application.  To that end I've
> attempted >>> to create a .net assembly.  After adding the
> net >>> assembly target using the existing app I then
> tried to >>> deply it but get the following error:
> >>>
> >>>
> >>> Error when compiling generated C# code:
> >>> a_madcst(4,16): error CS0101: The namespace '<global
> >>> namespace>' already contains a definition for
> >>>
> >>> Any help you can give me would be much appreciated.
> >>>
> >>> Thank You ,
> >>> Mike
> >>
> >>
>

 0
Mike
11/20/2010 1:11:09 PM
Mike,

Since you are dealing with business logic you may be scale back the PFC
by cutting out the visual object oriented parts such as the contents of
PFCWnSrv/PFEWnSrv and the visual classes in PFCMain/PFEMain.

One important limitation you must bear in mind when creating pure .NET
assemblies:  All parameter types must be CLS compatible. That mean that
you will not be able to pass or return PowerBuilder specific references

--
Yakov
eLearnIT LLC
Blog: http://yakovwerde.sys-con.com
Web Site: http://www.eLearnITOnline.com
On 11/20/2010 8:11 AM, Mike Kennedy wrote:
> Yakov,
>
> Thanks for clarifying what gets inlcuded in the assembly.  I
> had wondered if somehow the picking of the NVOs filtered
> what got included and what didn't.
>
> Creating a new target with a new lib list will allow me to
> reduce some dead weight.  However, this is a PFC based
> application having 3 levels of inheritance and this means
> that with pfc pbls alone there will be  lot of dead weight.
> To rewrite that , by removing PFC references from the nvos
> is not  a realistic option for the functions I need to
> expose in an assembly.   What is your recommendations for
> .net assembly creation under these circumstances ?
>
> Thank You,
>
> Mike
>
>> That message refers to source control.    Typically what
>> happens is that  you've somehow managed to tell PB you are
>> using PB native scc but it's not  configured.  Could be a
>> simple as manually registering the pbnatxxx.dll.
>>
>> -- Terry Dykstra (TeamSybase)
>> http://powerbuilder.codeXchange.sybase.com/
>> http://casexpress.sybase.com
>> http://my.isug.com/cgi-bin/1/c/submit_enhancement
>>
>>
>> "Yakov Werde"  wrote in message
>> news:4ce5f9b2$1@forums-1-dub... >> >> Mike >> >> I've never seen the message "Unable to open this project >> because the add-on software used to create it could not be >> found....." However, read on. It gets interesting >> >> To recreate what you described, I took a non trivial 5 PBL >> Classic app in 12.1 (ABNC) and created a .NET assembly >> from it, choosing "use library list from existing target" >> Everything was in the app - the visual objects, together >> with the NVOs and all the supportive classes (DWOs, >> DataStores, Structures, Global Functions) I made sure to >> select a couple of NVOs with public functions with .NET >> compatible types as params and returns only to expose in >> the interface. >> >> I then deployed the assembly. No error messages. >> >> Then I tool ILDASM.exe (the .NET SDK disassembler) and >> looked inside the code generated. Holy Cow Batman, all >> the visual objects (windows, menus, SVUOs were inside the >> assembly!! Two interface classes were generated that >> internally rerouted control to the original object that >> were now renamed with the prefix C__. The rest of the >> stuff was unreferenced dead weight >> >> I understand the convenience of a quick wizard conversion >> and deployment, but why carry all that dead weight around? >> >> My understanding of an approach to the assembly creation >> process would be to create a new .NET assembly target, >> move in only the code classes needed; the NVOs and their >> supportive classes (DWOs, DataStores, Structures, Global >> Functions) into an application and then deploy it. >> >> HTH >> -- >> Yakov >> eLearnIT LLC >> Twitter: http://twitter.com/eLearnPB >> Blog: http://yakovwerde.sys-con.com >> Web Site: http://www.eLearnITOnline.com >> >> >> On 11/18/2010 7:49 PM, Mike Kennedy wrote: >>> Yakov, >>> >>> I recreated the project and attached screen images for >>> each step. There are now other issues, summarized here >> :> >>> I migrated to PB Classic. When I create the new Target >>> (a .net assembly) I choose the option to "Use Library >>> List from Existing Target" which is my original >>> application. I choose that target from the workspace >>> (a_madcst) and then name it to another >>> target(product_assembly). I then name the project >>> (p_product_assembly), specify a namespace and assembly >>> (maps.product), pick nvo to be deployed, include no >>> resource files and then name the setup file >>> (maps_product_setup.exe). I get the ready to create >> .net assembly screen and click finish. I then rebuild the >>> new target . Then I attempt to go into the new project >>> and now I get a message saying "Unable to open this >>> project because the add-on software used to create it >>> could not be found....." >>> >>> Thank You, >>> Mike >>> >>> >>> >>> >>>> Mike, >>>> Please clarify a few things >>>> >>>> Did you migrate to Classic or WPF .NET? My guess is >> NET>> from the compiler message below - correct? >>>> >>>> When you created the .NET assembly - did you by any >>>> chance name it the same as the application? From the >>>> message it looks like you have two application objects >>>> (a_madcst) with the same name. >>>> >>>> When you say that "adding the .net assembly target >> using>> the existing app " Do you mean you added the >> assembly as>> a reference to your existing application? >>>> >>>> My guess also is that you did not put the code objects >>>> inside the assembly in a separate namespace and that >> you>> still have objects with the same names in your >> main app?>> >>>> -- >>>> Yakov >>>> eLearnIT LLC >>>> Twitter: http://twitter.com/eLearnPB >>>> Blog: http://yakovwerde.sys-con.com >>>> Web Site: http://www.eLearnITOnline.com >>>> >>>> On 11/10/2010 7:39 AM, Mike Kennedy wrote: >>>>> I'm just migrated a pfc based application from 10.5 to >>>>> 12.1. The main reason for the migration was to >> reuse>>> code in a .net application. To that end I've >> attempted>>> to create a .net assembly. After adding the >> net>>> assembly target using the existing app I then >> tried to>>> deply it but get the following error: >>>>> >>>>> >>>>> Error when compiling generated C# code: >>>>> a_madcst(4,16): error CS0101: The namespace '<global >>>>> namespace>' already contains a definition for >>>> 'c__a_madcst'> >>>>> >>>>> Any help you can give me would be much appreciated. >>>>> >>>>> Thank You , >>>>> Mike >>>> >>>> >>   0 Yakov 11/21/2010 2:29:58 AM Terry, I now have this message in my original fat client project when I try to open it up in PB12.1 to create a new build. What do you mean when you say "Could be as simple as manually registering the pbnatxxx.dll". How is this done? Thank You, Mike > That message refers to source control. Typically what > happens is that you've somehow managed to tell PB you are > using PB native scc but it's not configured. Could be a > simple as manually registering the pbnatxxx.dll. > > -- Terry Dykstra (TeamSybase) > http://powerbuilder.codeXchange.sybase.com/ > http://casexpress.sybase.com > http://my.isug.com/cgi-bin/1/c/submit_enhancement > > > "Yakov Werde" wrote in message > news:4ce5f9b2$1@forums-1-dub...
>
> Mike
>
> I've never seen the message "Unable to open this project
> because the add-on software used to create it could not be
> found....."  However, read on. It gets interesting
>
> To recreate what you described, I took a non trivial 5 PBL
> Classic app in 12.1 (ABNC) and created a .NET assembly
> from it, choosing "use library list from existing target"
> Everything was in the app - the visual objects, together
> with the NVOs and all the supportive classes (DWOs,
> DataStores, Structures, Global Functions)  I made sure to
> select a couple of NVOs with public functions with .NET
> compatible types as params and returns only to expose in
> the interface.
>
> I then deployed the assembly. No error messages.
>
> Then I tool ILDASM.exe (the .NET SDK disassembler) and
> looked inside the code generated.  Holy Cow Batman, all
> the visual objects (windows, menus, SVUOs were inside the
> assembly!!  Two interface classes were generated that
> internally rerouted control to the original object that
> were now renamed with the prefix C__.  The rest of the
> stuff was unreferenced dead weight
>
> I understand the convenience of a quick wizard conversion
> and deployment, but why carry all that dead weight around?
>
> My understanding of an approach to the assembly creation
> process would be to create a new .NET assembly target,
> move in only the code classes needed; the NVOs and their
> supportive classes  (DWOs, DataStores, Structures, Global
> Functions) into an application and then deploy it.
>
> HTH
> --
> Yakov
> eLearnIT LLC
> Blog: http://yakovwerde.sys-con.com
> Web Site: http://www.eLearnITOnline.com
>
>
> On 11/18/2010 7:49 PM, Mike Kennedy wrote:
> > Yakov,
> >
> > I recreated the project and attached screen images for
> > each step.  There are now other issues, summarized here
> : >
> > I migrated to PB Classic.  When I create the new Target
> > (a .net assembly) I choose the option to "Use Library
> > List from Existing Target"  which is my original
> > application.  I choose that target from the workspace
> > (a_madcst) and then name it to another
> > target(product_assembly).   I then name the project
> > (p_product_assembly), specify a namespace and assembly
> > (maps.product), pick nvo to be deployed, include no
> > resource files and then name the setup file
> > (maps_product_setup.exe).  I get the ready to create
> .net assembly screen and click finish.  I then rebuild the
> > new target .  Then I attempt to go into the new project
> > and now I get a message saying "Unable to open this
> > project because the add-on software used to create it
> > could not be found....."
> >
> > Thank You,
> > Mike
> >
> >
> >
> >
> >> Mike,
> >> Please clarify a few things
> >>
> >> Did you migrate to Classic or WPF .NET?  My guess is
> NET >> from the  compiler message below - correct?
> >>
> >> When you created the .NET assembly  - did you by any
> >> chance name it the  same as the application?  From the
> >> message it looks like you have two  application objects
> >> (a_madcst) with the same name.
> >>
> >> When you say that "adding the .net assembly target
> using >> the existing app  "  Do you mean you added the
> assembly as >> a reference  to your existing application?
> >>
> >> My guess also is that you did not put the code objects
> >> inside the  assembly in a separate namespace and that
> you >> still have objects with  the same names in your
> main app? >>
> >> --
> >> Yakov
> >> eLearnIT LLC
> >> Blog: http://yakovwerde.sys-con.com
> >> Web Site: http://www.eLearnITOnline.com
> >>
> >> On 11/10/2010 7:39 AM, Mike Kennedy wrote:
> >>> I'm just migrated a pfc based application from 10.5 to
> >>>    12.1. The main reason for the migration was to
> reuse >>> code in a .net application.  To that end I've
> attempted >>> to create a .net assembly.  After adding the
> net >>> assembly target using the existing app I then
> tried to >>> deply it but get the following error:
> >>>
> >>>
> >>> Error when compiling generated C# code:
> >>> a_madcst(4,16): error CS0101: The namespace '<global
> >>> namespace>' already contains a definition for
> >>>
> >>> Any help you can give me would be much appreciated.
> >>>
> >>> Thank You ,
> >>> Mike
> >>
> >>
>

 0
Mike
11/23/2010 2:09:09 AM
Run regsvr32.exe on the file C:\Program
Files\Sybase\Shared\PowerBuilder\PBNAT120.dll

In PB classic, right click on the workspace and check on the soruce control
tab whether you have set it to use a source control system.  You might have
accidentally selected pb native.

-- Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Mike Kennedy" wrote in message news:4ceb2245.595b.1681692777@sybase.com...

Terry,
I now have this message in my original fat client project
when I try to open it up in PB12.1 to create a new build.
What do you mean when you say "Could be as
simple as manually registering the pbnatxxx.dll".  How is
this done?
Thank You,
Mike

> That message refers to source control.    Typically what
> happens is that  you've somehow managed to tell PB you are
> using PB native scc but it's not  configured.  Could be a
> simple as manually registering the pbnatxxx.dll.
>
> -- Terry Dykstra (TeamSybase)
> http://powerbuilder.codeXchange.sybase.com/
> http://casexpress.sybase.com
> http://my.isug.com/cgi-bin/1/c/submit_enhancement
>
>
> "Yakov Werde"  wrote in message
> news:4ce5f9b2$1@forums-1-dub... > > Mike > > I've never seen the message "Unable to open this project > because the add-on software used to create it could not be > found....." However, read on. It gets interesting > > To recreate what you described, I took a non trivial 5 PBL > Classic app in 12.1 (ABNC) and created a .NET assembly > from it, choosing "use library list from existing target" > Everything was in the app - the visual objects, together > with the NVOs and all the supportive classes (DWOs, > DataStores, Structures, Global Functions) I made sure to > select a couple of NVOs with public functions with .NET > compatible types as params and returns only to expose in > the interface. > > I then deployed the assembly. No error messages. > > Then I tool ILDASM.exe (the .NET SDK disassembler) and > looked inside the code generated. Holy Cow Batman, all > the visual objects (windows, menus, SVUOs were inside the > assembly!! Two interface classes were generated that > internally rerouted control to the original object that > were now renamed with the prefix C__. The rest of the > stuff was unreferenced dead weight > > I understand the convenience of a quick wizard conversion > and deployment, but why carry all that dead weight around? > > My understanding of an approach to the assembly creation > process would be to create a new .NET assembly target, > move in only the code classes needed; the NVOs and their > supportive classes (DWOs, DataStores, Structures, Global > Functions) into an application and then deploy it. > > HTH > -- > Yakov > eLearnIT LLC > Twitter: http://twitter.com/eLearnPB > Blog: http://yakovwerde.sys-con.com > Web Site: http://www.eLearnITOnline.com > > > On 11/18/2010 7:49 PM, Mike Kennedy wrote: > > Yakov, > > > > I recreated the project and attached screen images for > > each step. There are now other issues, summarized here > : > > > I migrated to PB Classic. When I create the new Target > > (a .net assembly) I choose the option to "Use Library > > List from Existing Target" which is my original > > application. I choose that target from the workspace > > (a_madcst) and then name it to another > > target(product_assembly). I then name the project > > (p_product_assembly), specify a namespace and assembly > > (maps.product), pick nvo to be deployed, include no > > resource files and then name the setup file > > (maps_product_setup.exe). I get the ready to create > .net assembly screen and click finish. I then rebuild the > > new target . Then I attempt to go into the new project > > and now I get a message saying "Unable to open this > > project because the add-on software used to create it > > could not be found....." > > > > Thank You, > > Mike > > > > > > > > > >> Mike, > >> Please clarify a few things > >> > >> Did you migrate to Classic or WPF .NET? My guess is > NET >> from the compiler message below - correct? > >> > >> When you created the .NET assembly - did you by any > >> chance name it the same as the application? From the > >> message it looks like you have two application objects > >> (a_madcst) with the same name. > >> > >> When you say that "adding the .net assembly target > using >> the existing app " Do you mean you added the > assembly as >> a reference to your existing application? > >> > >> My guess also is that you did not put the code objects > >> inside the assembly in a separate namespace and that > you >> still have objects with the same names in your > main app? >> > >> -- > >> Yakov > >> eLearnIT LLC > >> Twitter: http://twitter.com/eLearnPB > >> Blog: http://yakovwerde.sys-con.com > >> Web Site: http://www.eLearnITOnline.com > >> > >> On 11/10/2010 7:39 AM, Mike Kennedy wrote: > >>> I'm just migrated a pfc based application from 10.5 to > >>> 12.1. The main reason for the migration was to > reuse >>> code in a .net application. To that end I've > attempted >>> to create a .net assembly. After adding the > net >>> assembly target using the existing app I then > tried to >>> deply it but get the following error: > >>> > >>> > >>> Error when compiling generated C# code: > >>> a_madcst(4,16): error CS0101: The namespace '<global > >>> namespace>' already contains a definition for > >> 'c__a_madcst'> > >>> > >>> Any help you can give me would be much appreciated. > >>> > >>> Thank You , > >>> Mike > >> > >> >   0 Terry 11/23/2010 3:48:42 PM I found the issue. I had a copy of some of the PBxxx12.DLLs in the windows system32 directory. After removing those, the "Unable to open this project" message went away. I'll now move on to try to create the .net dll with the minimum PFC pbls included as suggested in the thread and let you know. Thank You, Mike > Run regsvr32.exe on the file C:\Program > Files\Sybase\Shared\PowerBuilder\PBNAT120.dll > > In PB classic, right click on the workspace and check on > the soruce control tab whether you have set it to use a > source control system. You might have accidentally > selected pb native. > > -- Terry Dykstra (TeamSybase) > http://powerbuilder.codeXchange.sybase.com/ > http://casexpress.sybase.com > http://my.isug.com/cgi-bin/1/c/submit_enhancement > > "Mike Kennedy" wrote in message > news:4ceb2245.595b.1681692777@sybase.com... > > Terry, > I now have this message in my original fat client project > when I try to open it up in PB12.1 to create a new build. > What do you mean when you say "Could be as > simple as manually registering the pbnatxxx.dll". How is > this done? > Thank You, > Mike > > > > > That message refers to source control. Typically what > > happens is that you've somehow managed to tell PB you > > are using PB native scc but it's not configured. Could > > be a simple as manually registering the pbnatxxx.dll. > > > > -- Terry Dykstra (TeamSybase) > > http://powerbuilder.codeXchange.sybase.com/ > > http://casexpress.sybase.com > > http://my.isug.com/cgi-bin/1/c/submit_enhancement > > > > > > "Yakov Werde" wrote in message > > news:4ce5f9b2$1@forums-1-dub...
> >
> > Mike
> >
> > I've never seen the message "Unable to open this project
> > because the add-on software used to create it could not
> > be found....."  However, read on. It gets interesting
> >
> > To recreate what you described, I took a non trivial 5
> > PBL Classic app in 12.1 (ABNC) and created a .NET
> > assembly from it, choosing "use library list from
> > existing target" Everything was in the app - the visual
> > objects, together with the NVOs and all the supportive
> > classes (DWOs, DataStores, Structures, Global Functions)
> >  I made sure to select a couple of NVOs with public
> > functions with .NET compatible types as params and
> > returns only to expose in the interface.
> >
> > I then deployed the assembly. No error messages.
> >
> > Then I tool ILDASM.exe (the .NET SDK disassembler) and
> > looked inside the code generated.  Holy Cow Batman, all
> > the visual objects (windows, menus, SVUOs were inside
> > the assembly!!  Two interface classes were generated
> > that internally rerouted control to the original object
> > that were now renamed with the prefix C__.  The rest of
> > the stuff was unreferenced dead weight
> >
> > I understand the convenience of a quick wizard
> > conversion and deployment, but why carry all that dead
> weight around? >
> > My understanding of an approach to the assembly creation
> > process would be to create a new .NET assembly target,
> > move in only the code classes needed; the NVOs and their
> > supportive classes  (DWOs, DataStores, Structures,
> > Global Functions) into an application and then deploy
> it. >
> > HTH
> > --
> > Yakov
> > eLearnIT LLC
> > Blog: http://yakovwerde.sys-con.com
> > Web Site: http://www.eLearnITOnline.com
> >
> >
> > On 11/18/2010 7:49 PM, Mike Kennedy wrote:
> > > Yakov,
> > >
> > > I recreated the project and attached screen images for
> > > each step.  There are now other issues, summarized
> > here : >
> > > I migrated to PB Classic.  When I create the new
> > > Target (a .net assembly) I choose the option to "Use
> > > Library List from Existing Target"  which is my
> > > original application.  I choose that target from the
> > > workspace (a_madcst) and then name it to another
> > > target(product_assembly).   I then name the project
> > > (p_product_assembly), specify a namespace and assembly
> > > (maps.product), pick nvo to be deployed, include no
> > > resource files and then name the setup file
> > > (maps_product_setup.exe).  I get the ready to create
> > .net assembly screen and click finish.  I then rebuild
> > > the new target .  Then I attempt to go into the new
> > > project and now I get a message saying "Unable to open
> > > this project because the add-on software used to
> > > create it could not be found....."
> > >
> > > Thank You,
> > > Mike
> > >
> > >
> > >
> > >
> > >> Mike,
> > >> Please clarify a few things
> > >>
> > >> Did you migrate to Classic or WPF .NET?  My guess is
> > NET >> from the  compiler message below - correct?
> > >>
> > >> When you created the .NET assembly  - did you by any
> > >> chance name it the  same as the application?  From
> > the >> message it looks like you have two  application
> > objects >> (a_madcst) with the same name.
> > >>
> > >> When you say that "adding the .net assembly target
> > using >> the existing app  "  Do you mean you added the
> > assembly as >> a reference  to your existing
> > application? >>
> > >> My guess also is that you did not put the code
> > objects >> inside the  assembly in a separate namespace
> > and that you >> still have objects with  the same names
> > in your main app? >>
> > >> --
> > >> Yakov
> > >> eLearnIT LLC
> > >> Blog: http://yakovwerde.sys-con.com
> > >> Web Site: http://www.eLearnITOnline.com
> > >>
> > >> On 11/10/2010 7:39 AM, Mike Kennedy wrote:
> > >>> I'm just migrated a pfc based application from 10.5
> > to >>>    12.1. The main reason for the migration was to
> > reuse >>> code in a .net application.  To that end I've
> > attempted >>> to create a .net assembly.  After adding
> > the net >>> assembly target using the existing app I
> > then tried to >>> deply it but get the following error:
> > >>>
> > >>>
> > >>> Error when compiling generated C# code:
> > >>> a_madcst(4,16): error CS0101: The namespace '<global
> > >>> namespace>' already contains a definition for
> > >>>
> > >>> Any help you can give me would be much appreciated.
> > >>>
> > >>> Thank You ,
> > >>> Mike
> > >>
> > >>
> >
>

 0
Mike
12/2/2010 2:49:17 PM

Similar Artilces:

The namespace '<global namespace>' already contains a definition for 'xxxxx'
The namespace '<global namespace>' already contains a definition for 'xxxxx'  I am not sure why I am receiving the above error when I try to compile the website. My colleague can compile the same files fine without receiving this error. Can someone please help?Thanks!  check whether you have a copy of the file with different name but using the same class (duplicate file). In My case, i have a backup copy for a aspx file. Delete the file or exclude from the project will solve the problem. Thanks & RegardsJaiswar Vipin Kumar R.Mumbai - IndiaContact : +91 9...

The namespace '<global namespace>' already contains a definition for 'Map'
Hi all, I had encountered this error and I am not sure what is the reason behind. I have a few classes and all are having namespace Map. But when I compile, it give me this error. Can someone please help? Thanks  Are the classes you mentioned all in a folder called 'Map'? If so, try renaming the folder and see if that fixes the problem.Please mark helpful posts as "Answer" Hi Bslim67, Based on my understanding, there are a couple of classes which have the same namespace. When you compile your project, you get the error message above. If I have misunderstood y...

The namespace '<global namespace>' already contains a definition for...
I am following the construction of an ecommerce application and in one .cs file, I get this error in several classes.What does this exactly mean and how, in VS2005, can I fix this?  Do a global search through your VS2005 project for the name of that namespace. VS2005 may object, depending on compile options, to identically named namespaces and classes or web.config type definitions. The other interesting thing to note is that when I rename the clases the error still exists. How do I do a search? Do I have to a manual search? I don't see a search option. Sorry if this sound...

ASP.Net 2.0
Good Day ! Need a your help here. I am quite new to web development and i have tried the following example from RSS Feed for How do I? Video Series-Localization as link below. http://www.asp.net/Rss.ashx?mid=3003 The demo is showing 2 resource files name 'resource.resx' and 'resource.fr.resx'. I triey to make a localization in Chinese so that i add another file named 'resource.zh.resx'. Once i compiled i found the error -"The namespace 'Resource' arlready contains a definition for 'Resource'". So that i rename it to 'resource.ms.resx', it's Alright ! It seems like there is som...

VS.NET 2005 asp.net 2.0 Error: '' does not contain a definition for ''
I have an image control  that looks like this:  <asp:ImageButton id="imgBtnStudent" runat="server" ImageUrl="~/images/img_btn_student.gif" OnClick="imgBtnStudent_Click" />  and it throws this error: Error    11    'ASP.cmstemplates_portal_home_aspx' does not contain a definition for 'imgBtnManager_Click'    C:\Inetpub\wwwroot\portal\CMSTemplates\Hallmark\home.aspx    40   There is no declaration in the code behind like this: protected System.Web.UI.WebControls.ImageButton imgBtnStudent; Should it...

How to solve "The namespace 'Resources' already contains a definition for 'GlobalResources' " error?
Hi all, I added GlobalResources.resx file, and after that I added some new GlobalResources.en-UK.resx and GlobalResources.en-USA.resx in to the same App_GlobalResources folder. and when I run that, I got the following error. Anyone know how to solve that? Thanks in advance. The namespace 'Resources' already contains a definition for 'GlobalResources' c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\test\fd6f5dcd\3422fafa\App_GlobalResources.gzcj0ni8.1.cs 26  I have the same issue even though it's described on msdn h...

Compiler Error Message: CS0234: The type or namespace name 'Global' does not exist in the namespace 'UChat' (are you missing an assembly reference?)
Compiler Error Message: CS0234: The type or namespace name 'Global' does not exist in the namespace 'Chat' (are you missing an assembly reference?)  suggest the above error   i am having Global.asax file and codebehind Global.asax.cs under App_code folder..in my local system it working fine but  when i copy paste the code in server it showing the error ...  Hi, senthil_os: Compiler Error Message: CS0234: The type or namespace name 'Global' does not exist in the namespace 'Chat' (are you missing an assembly reference?) I ...

The namespace '' already contains a definition for 'testSurvey'
I have a web user control  with a code behind file and this is the error I get...below is the code behind fileusing System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;    public class testSurvey : System.Web.UI.UserControl <--ERROR HERE with 'testSurvey{    protected System.Web.UI.WebControls.Label Label1;    protected System.Web.UI.WebControls.Lab...

Help! Error only shows up when I try to publish my website: The type or namespace name 'Slot' does not exist in the namespace 'ASP' (are you missing an assembly reference?)
Hey guys, I’m getting this weird error when I try to publish my website, it reads:   Error    5          The type or namespace name 'Slot' does not exist in the namespace 'ASP' (are you missing an assembly reference?) X:\Visual Studio 2005\WebSites\Site1\App_UserControls\SlotsTable.ascx.cs           143   Line 143 of the SlotsTable.ascx.cs file is a method I created to dynamically create instances of the Slot user control. The method’s signature is as follows   ...

Give access to non virtual folder through configuration entry? ERROR: <location> path attribute must be a relative virtual path. It cannot contain any of '?' ':' '\' '*' '"' '<' '>' or '|'.
I have a webpage running under a virtual directory that is mapped to d:/webapplication that produces an excel spreadsheet, the page calls a library object that generates a report and places it in a folder d:/attachments. This folder is not in the virtual directory. When I access the webpage i click a button and it attemps to return the created spreadsheet as a mim content type application/vnd.ms-excel. However i getting redirected back to the login page of the application. Ive also noticed that the excel spreadsheet has not even been created at this location. So assuming this...

VS2005 VB.Net 'EventArgs' is ambiguous in the namespace 'System'. Errors.
Hi guys,  I've searched and searched and can't find the fix for this.  I am recieving the max number of errors for my ASP.Net project.  The errors are simply stated as something like the title.  Other ones are: 'DebuggerNonUserCodeAttribute' is ambiguous in the namespace 'System.Diagnostics'. 'EventArgs' is ambiguous in the namespace 'System''CompilierGlobalScopeAttribute' is ambiguous in the namespace 'System.Runtime.CompilierServices'.'SerializationInfo' is ambiguous in the namespace 'System.Runtime.Serialization'  Most of the errors are comming up in files th...

ASP.NET MVC + Entity Framework: The type or namespace name 'Entity' does not exist in the namespace 'System.Data'
Hi Fourm.Hi have a problem whiel I'm trying to  access to an entity object within a ViewPage:The problem si that when I import Syste.Data.Entity:<%@ Import Namespace = "System.Data" %><%@ Import Namespace = "System.Data.Entity" %>I get this error: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.Compiler Error Message: CS0234: The type or namespace name 'Entity' does not exist in the namespace &...

The type or namespace name 'ListView' does not exist in the namespace 'System.Web.UI.WebControls' (are you missing an assembly reference?) error
I have created a ASPX form with a ListView See below: <form id="form1" runat="server"> <asp:ListView id="ProductList" runat="server" > <LayoutTemplate> <h3>Product Listing</h3> <blockquote> <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder> </blockquote> </LayoutTemplate> <ItemSeparatorTemplate> <hr /> </ItemSeparatorTemplate> <ItemTemplate> <h4><%#Eval("ProductName")%> (<%# Eval("Catego...

Please HELP !! Compiler Error Message: BC30466: Namespace or type 'HelloWorldobj' for the Imports 'HelloWorldobj' cannot be found. (New ASP.net user)
Hi, i have created a class called "HelloWorldobj.dll". Yes, i compiled it with VBC.exe. And, no compilation error shown. I have read an article on teaching people to run custome namespace/classes. It said that we can just create a folder called "bin" inside the web application folder, and put all the classes / calss file inside this "bin" folder. Then, inside our code, what we need to do is just : <%@ Import Namespace="HelloWorldobj" %> .... .... But, it can't work here!!! why? Error msg : Compilation Error Description: ...

Compilation Error : UI.Web.Global' is defined in multiple places; using definition from 'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\..\NiceMonitoringOperationSolution.DLL
Hi, I have got a problem. When i compile my .net web modules, I get the following error: Compiler Error Message: CS1595: 'NxGen.SnmpSolutions.NiceMonitoring.UI.Web.Global' is defined in multiple places; using definition from 'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\nicemonitoringoperationsolution\a38b2052\fcc07767\assembly\dl2\3eeae226\def59e99_8cefc501\NiceMonitoringOperationSolution.DLL' Source Error:  Line 26:     Line 27:     [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]Line 28:  &...

Web resources about - Trying to create .net assembly - Getting error The namespace '<global namespace>' already contains a definition for - sybase.powerbuilder.net

Resources last updated: 11/22/2015 10:05:35 AM