Book a Demo

Author Topic: VS 2022, .Net 6.0 and COM-Visible (and .Net Framework 4.x)  (Read 6064 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
VS 2022, .Net 6.0 and COM-Visible (and .Net Framework 4.x)
« on: June 24, 2022, 02:36:58 pm »
I've had to rebuild my Add-In infrastructure from scratch as I can't get the symbol tables to load to allow debugging.
I've managed to rebuild creating Solution and Project files from scratch and resolved any Errors and (most important Warnings).  However, when I try to make the DLL file COM-Visible, the option isn't there in the Project properties.  Researching this via Google implies that I need to build the Add-In as a .Net Framework (instead of using a .Net or .Net Standard template - as I did originally).

Since I'm not a .Net guru and haven't touched Visual Studio for years, am I correct in understanding that in order to create an EA Add-In I must make it COM visible and thus am limited to a .Net Framework template that only goes up to .Net Framework 4.8?

TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: VS 2022, .Net 6.0 and COM-Visible (and .Net Framework 4.x)
« Reply #1 on: June 24, 2022, 05:44:35 pm »
Yes, I think you'll need .Net Framework

I'm no specialist either, but I don't believe the version numbers (.Net 6 vs .Net Framework 4.8) are somehow related.
So it's not like you are stuck with an older version of technology (again I think)

Geert

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: VS 2022, .Net 6.0 and COM-Visible (and .Net Framework 4.x)
« Reply #2 on: June 24, 2022, 07:53:35 pm »
Thanks, Geert,

I was told by a colleague that the reason .Net 6.0 doesn't support COM-Visibility is that .Net 6.0 is cross-platform and thus has lost the ability to support COM interoperability.  Can anyone confirm or deny this?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: VS 2022, .Net 6.0 and COM-Visible (and .Net Framework 4.x)
« Reply #3 on: June 25, 2022, 02:45:49 am »
Hi Paolo,

EA only supports .NET Framework.

I asked SPARX if EA supports .NET 6 and got the below answer.

In my understanding: .NET 6 supports COM
EA doesn't support .NET 6

Best regards,

Helmut


=====================
Hello,

does EA supports Addins with NET 6.0? I tried it, registered it but it doesn't run. With NET Framework it runs smoothly. I checked the registration and it looks good.

The Screenshots shows the registry and the files involved.

I use VS2022, C# and WIX to deploy it. Explicitly registering the AddIn doesn't change the behaviour.

Any idea?

Thanks and best regards,

Helmut
Answer of SPARX Support
Hello Helmut,

Thank you for your enquiry. Our developers have provided the following feedback, please see:

If you're talking about .Net core. No. It needs to be the full .Net Framework.

Hope that helps. If you have further questions please let us know.


Best regards,
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: VS 2022, .Net 6.0 and COM-Visible (and .Net Framework 4.x)
« Reply #4 on: June 25, 2022, 11:54:24 am »
Thanks, Helmut!

I believe the response from the Sparxians isn't quite correct.  They imply that .NET Framework is aligned with .NET, but that's not the case is it?
There is NO .NET 6.0 Framework, is there?

BTW, when you were experimenting, did you manage to find the "Make the assembly COM-Visible" setting?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: VS 2022, .Net 6.0 and COM-Visible (and .Net Framework 4.x)
« Reply #5 on: June 26, 2022, 08:10:57 am »
Whilst I'm no longer a developer from my colleagues I understand there are now two separate things in the MS.Net world.
  • .Net Framework is the original lineage for windows and partially open source. Latest version of this is V4.8
  • .Net Core which is relatively newer subset of .net framework for multi platform and is open source. My developer friends tell me this is the way of the future but it doesn't have all the features of .Net Framework yet. Latest Version of this is V6.0.5 with preview of V7.0 out
This quote from the blog seems to eloquently describe the difference between the two
https://www.interviewbit.com/blog/net-core-vs-net-framework/
Quote
.Net Framework is a software development framework designed and maintained by the tech giant Microsoft. It is Windows-based and primarily runs on Windows devices. It is used for the development of standalone desktop as well as web applications. The framework provides all the basic requirements for the development of applications – UI, DB connectivity, Services, APIs, etc. .Net Core, on the other hand, is a platform and not a full-fledged framework. Simply put, .Net Core is a subset of the .Net Framework. In more accurate terms, a forked-out version of the .Net Framework.

You may be wondering what the need was to come up with .Net Core when it is just a subset of the .Net Framework. .Net core has some fundamental changes to the way it operates. First and foremost, it is more modularized. This helps you create applications with only the libraries you need and no extra baggage. Second, it is truly cross-platform. This makes it the choice of development platform of the future.

You can do more searches for .net framework vs .net core to get more detailed information. Here is one such link.
https://www.geeksforgeeks.org/differences-between-net-core-and-net-framework/
« Last Edit: June 26, 2022, 08:13:40 am by Sunshine »
Happy to help
:)