Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Is there any plan to release Theraot 4.0.0 nuget? #194

Open
workgroupengineering opened this issue Oct 21, 2022 · 8 comments
Open

Comments

@workgroupengineering
Copy link
Contributor

No description provided.

@NN---
Copy link
Collaborator

NN--- commented Oct 21, 2022

Just curious what is the reason you need this library today ?

@workgroupengineering
Copy link
Contributor Author

I have old software that uses proprietary libraries to communicate with a device. The manufacturer no longer exists and it is not possible to have the updated library that supports .net 4.0 and higher.

@NN---
Copy link
Collaborator

NN--- commented Oct 21, 2022

You can run almost any .NET 3.5 program over CLR 4.0 using application manifest.
It probably worth trying.
I have been using this for years because starting Windows 8 there is only .NET 4.0 and above installed by default.

What about option to decompile and compile with a newer framework ?
If manufacturer doesn't exist anymore, probably, this would be allowed.

@workgroupengineering
Copy link
Contributor Author

You can run almost any .NET 3.5 program over CLR 4.0 using application manifest.
It probably worth trying.
I have been using this for years because starting Windows 8 there is only .NET 4.0 and above installed by default.

I did not know this possibility. Can you give more documentation about it?

What about option to decompile and compile with a newer framework ?
If manufacturer doesn't exist anymore, probably, this would be allowed.

Unfortunately I'm alone, the library is large, obfuscated and mixes native and managed code.

It would take years to convert.

@NN---
Copy link
Collaborator

NN--- commented Oct 21, 2022

Sure

https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-configure-an-app-to-support-net-framework-4-or-4-5

Myapp.exe.config

<configuration>
  <startup>
    <supportedRuntime version="v4.0"/>
 If you want you can also have a falllback to 3.5 in case 4.0+ is not present 
<supportedRuntime version="v2.0.50727"/>

  </startup>
</configuration>

@OwnageIsMagic
Copy link
Collaborator

OwnageIsMagic commented Nov 28, 2022

@NN---

Just curious what is the reason you need this library today ?

We have around 800-1000 XP devices left per client (10 clients around the world). Most of them are gen1/2 Intel meaning it need full replacement (cpu + mobo + ide->sata hdd + vga->dvi say 250$) to upgrade to new Windows version. Each device is connected to peripheral hardware of the same era with proprietary kernel driver (not supported by vendor anymore, so no builds for recent Windows), 300$ per unit compatible with win10.
900 * 10 * 550$ == 5kk$ + deployment costs or they could just pay me x1.5 rate and I would continue support XP for next 5-10 years.

@NN---
Copy link
Collaborator

NN--- commented Nov 12, 2023

@OwnageIsMagic What is the compiler are you using ?
Can you use the latest C# compiler from .NET 8 SDK targeting .NET 4.0 for example ?

@OwnageIsMagic
Copy link
Collaborator

OwnageIsMagic commented Nov 13, 2023

Yes, I actually use NET8 RC SDK for dev builds and latest stable in CI. But it doesn't matter since once compiled to IL and packed it's indistinguishable from code compiled with the old native csc (modulo bugs and edge cases).
You mentioned PolySharp earlier so I'll assume you investigating usage of Roslyn source generators.
This is definitely not going to work in our case. PolySharp explicitly ships only types required for language features and all of them (except Index and Range) are just attributes in S.R.CompilerServices namespace. They are well-known for compiler and it binds to them by name ignoring type identity.
In our case we are shipping implementations and type identity is very important (you will get 'System.TypeA' is not castable to 'System.TypeA' error in runtime otherwise). There is also other major issues like code bloat/compile slowdown (esp for net20 full LINQ and TPL), non default SDK (issues with WPF temp projects) or ASP.NET even targeting net48 not compatible with new SDK format (see SimonCropp/Polyfill#101).


What can we actually do with source generators is automatic placement of #if-#else on build (on our side) based on corresponding tfm ref assemblies or docs (whichever would be easier to parse).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants