cancel
Showing results for 
Search instead for 
Did you mean: 

.Net assembly and inheritance

Former Member
0 Kudos

Hello,

I am trying to create a .net assembly (in PB 12.51 .net) that has objects that inherit from

another .net assembly (in this case a .net version of the PFC) but I can not

successfully build the assembly due to an error I do not understand.

Here's the situation...

I have created an assembly of the PFC (PFCAssembly) and added it the

references area on of my main assembly (TestAssembly)

Now, I can easily create a object (TestDs) in TestAssembly that inherits from n_ds.  The intellisense works fine (all properties

and functions show up) and the TestDs object will save with out error.  But, if I try to use this TestDs object somewhere in TestAssemby, I get the following error when I build:

"The type or namespace name 'n_ds' does not exist in the namespace 'POS' (are you missing an assembly reference?"

POS is the default namespace I have defined for TestAssembly.

Here is the part I do not understand...

I can use n_ds directly in TestAssembly without error i.e.:

n_ds ids_Datastore

ids_Datastore = Create n_ds

But as soon as I try to use an object inherited from somewhere in

PFCAssembly I get the  error listed above.

TestDs ids_Datastore

ids_Datastore = Create TestDs

Anyone know what I am missing?  Is it not possible in pb.net to have an

assembly that has objects inherited from another assembly?

Thanks

Kevin Lindsay

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member190719
Active Contributor
0 Kudos

Well, first I want to make sure I'm trying to look into the right problem.  Are you creating a .Net assembly from PFC or a PB Assembly.  If you're trying to use a precompiled version of PFC within a PowerBuilder.Net project, doing it as a PBAssembly makes more sense than a .Net Assembly.  See this article by Yakov on the PBAssembly option.