1

Closed

support for Net 3.5 executables

description

I've successfully tried LibZ when the main assembly targets Net 4.0 , even when referenced assemblies are only Net 3.5 or less.

But somehow, LibZ refuses to work when the main executable targets Net 3.5. Is this an implementation restriction?

I know an easy way to overcome this issue is to simply raise the required Net version of the project to 4.0, but for the sake of cross compatibility, I would like to stay on 3.5 as much as possible

Thanks in Advance

Vv
Closed Apr 23, 2014 at 8:15 PM by Krashan

comments

Krashan wrote Jan 10, 2014 at 9:32 AM

I actually did not try with 3.5 (I assumed that compatibility with XP is important, thus compatibility with 4.0, never bothered with 3.5). There are two assemblies which are merged (AsmZ) or referenced (LibZ) and they both target 4.0. So, with intrumentation (!) I would be supprised if it worked.

BUT...

You can try instrumentation-less approach: Scenario 6: Using source only approach (no instrumentation at all)

VicViper wrote Jan 10, 2014 at 11:20 AM

I've checked Scenario 6, it looks that ir requires to include LibZ.Bootstrap (or at leat, to have LibZ.bootstrap source code included int the main project, but if that assembly is required and it needs 4.0, I would not be able to reference it from a 3.5 assembly.

Is there something in the code that requires 4.0 ? maybe you could provide assemblies for 3.5 and 4.0, or make the instrumentation tool detect the version of the assembly and use the appropiate versions of the assemblies.

In my specific case, I can raise the version of the root project to 4.0, but It might happen that you want to zip some old assemblies for which you no longer have the source code, or they don't compile anymore

Krashan wrote Jan 10, 2014 at 12:44 PM

I've checked Scenario 6, it looks that ir requires to include LibZ.Bootstrap (or at least, to have LibZ.bootstrap source code included
That's exactly the the point of scenario 6. You include LibZ.Bootstrap.cs in your executable and do not reference anything.
[...] but It might happen that you want to zip some old assemblies for which you no longer have the source code, or they don't compile anymore [...]
That's fair point. I will thing about that.

VicViper wrote Feb 18, 2014 at 10:24 AM

Hi, thinking again about the issue of supporting Net 3.5 Assemblies (sorry, I've just stumbled upon the issue a short while ago) ... what really bugs me is the fact that, when I try to instrument an assembly that is 3.5 I get all sorts of errors, but nothing that points to the fact that versions older than 4.0 are not supported. In fact, it took me a while to figure out the first time, but sometimes I forget. I happen to have a fairly large repository of assemblies, with a mix of 3.5 and 4.0 projects.

It's fine by me if versions older than 4.0 are not supported, but, could it be possible that, when trying to instrument an old assembly, to give a proper error message? It would save people time trying to figure out why it's failing

Thanks in advance!

Vic

Krashan wrote Mar 9, 2014 at 12:03 PM

This issue has been addressed in 1.1.0.0