Project references from C#

Hello,

today I try to upgrade from latest Oxygene 9.3 to 10 (build 2321). But there are some problems with VS2017 (15.8.2)

  1. Migrated project references from C# to Oxygene project was not able to compile:
    CSC : error CS1704: Es wurde bereits eine Assembly mit dem einfachen Namen “…” importiert. Entfernen Sie einen der Verweis…

  2. I create new solution, add new C# project, add new Oxygene project, try to add new project reference from C# to Oxygene fails with “must be a dll or exe”

I can set a reference from C# to compiled Oxygene project, but this is only a workaround because I have to decide between compiled DEBUG or RELEASE file.

Any idea to get project reference working?

Thanks, Mario

Mario,

is that a Visual C# or RemObjects C# project?

Thanks, logged as bugs://80964

I work with VS C# and RemObject Oxygene projects.

Thanks, Mario

ok, thanx for confirming. We’ll look into this next week!

1 Like

Is there any progress about this problem?

Thanks, Mario

Not yet, I’m afraid, as the person I’ll need to work with on this was on vacation last week. I’ll make sure this (and related ref issues) gets priority this week.

bugs://80964 got closed with status fixed.

1 Like

Please let me know if this works for you as expected in .2329. thanx!

Hello Marc,

Yes and no. Now I can set project references!
But I can’t use anything in the Oxygene Project. I see no namespaces or objects in my Visual studio project.

If I open the Oxygene library in VS Object catalog, I see a namespace and object, but the object is an “unknown type”.

If I reference the Oxygene library in a RemObject C# project, all looks fine!

Mario

Can you send me a full diagnostic-level re-build log? Also, what does the added reference look like, in the elements project? can ou paste the XML tag? is the HintPath present and valid?

thanx!

bugs://80964 got reopened.

bugs://80964 got closed with status fixed.

Mario,

I can send you a new build to test later today, if you’d like.

Yes, I like :slight_smile:

I’ve uploaded a new build to https://www.remobjects.com/portal/downloads/personal for you.

yours,
marc

Hallo Mark,

A small, intermediate feedback: it seems to work! I can now create a chain (VS C# > RO Oxygene > VS C#) without any problems. I can see all classes and can use and compile it.
My old projects generate some trouble, but I will try to create a new Library-Project and sync changes to the old project. The base project is really old. If I find out any more trouble or helpful information I will share it in this thread.

Thanks, Mario

Hello Mark,

I found the problem with my old projects:

interface

procedure Init(const a: System.Int32);

implementation

procedure MyClass.Init(a: Int32); // compile problem

I changed it to:

implementation

procedure MyClass.Init(const a: System.Int32); // compile

Now all works fine!

Thanks, Mario

1 Like

Ah yes, that got more strict with v10, interface and implementation now need to match exactly. Reference wise, all was fine with the old projects, too, w/o any changes needed?

Hello Mark,

Yes, w/o any other changes :slight_smile:

But the strange and confusing thing is the list of error messages if I have an old interface/implementation missmatch:

(E58) Duplicate method “method Class1.TestCallLib2(i: System.Int32)” with same signature
(E52) Type “Class1” does not contain a declaration that matches this method signature
(E51) Implementation for method “method TestCallLib2(i: Int32)” is missing

I received 3 different errors for the same problem. I need some time to realize the core reason…

Thanks, Mario