Producing a .NET 2.0 SFX from a .NET 4.0 application

Aug 10, 2011 at 4:33 PM

Hi,

     DotNetZip Library is working for 2.0 Solutions ,But we are using the same code for 4.0 . we are unable to Extact the SelfExtractable File.It is asking to install the .NET Framework4.0 in the Extracted Machine.

Regards

Balaji

 

 

Aug 10, 2011 at 4:35 PM

Hi,

     DotNetZip Library is working for 2.0 Solutions ,But we are using the same code for 4.0 . we are unable to Extact the SelfExtractable File.It is asking to install the .NET Framework4.0 in the Extracted Machine.

 

Using zip1 As New ZipFile 
() 
zip1.AddDirectory(



"E:\\ABC" 
) 
zip1.Comment =



"This will be embedded into a self-extracting exe"



 


Dim sSaveOptions As New 
SelfExtractorSaveOptions



sSaveOptions.Flavor =


SelfExtractorFlavor 
.WinFormsApplication 
sSaveOptions.Quiet =



False



zip1.SaveSelfExtractor(StageDir &


"\" & sTargetFile & ".exe" 
, sSaveOptions) 
 



End 

Using



Regards

Balaji

 

Coordinator
Aug 10, 2011 at 11:38 PM

yes - I see.  I think this is a bug in DotNetZip. 

It requires a change in the code to allow the SFX generated by a .NET 4.0 application, to run on a .NET 2.0 application.  I'm going to open a workitem, and then post a new library there, for you to try.  It should allow you to do what you want. Please try it and let me know.

Coordinator
Aug 10, 2011 at 11:38 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Aug 11, 2011 at 4:45 AM

ok, I've put a build of DotNetZip up on that workitem.  Try it and see.

http://dotnetzip.codeplex.com/workitem/14062

Aug 26, 2011 at 8:41 PM

Rebuilt my application with the workaround posted in the ticket. Booted up an XP VM and installed .NET2.0 redistirutable.

Get a "encounted a problem and and needs to close message". Not a very helpful error message.



EventType : clr20r3     P1 : 4dro3gcxmhxyiwtmooefein51d5httrv    
P2 : 1.9.1.9000     P3 : 4e57fce9    
P4 : ionic.zip-2011aug26-150702-88101ec9-6bd4-4adc-8d3e-51152969a6f1    
P5 : 1.9.1.9000     P6 : 4e57fce9     P7 : 36     P8 : b    

Coordinator
Aug 26, 2011 at 9:06 PM

what do you mean by "rebuilt your application with the workaround posted in the ticket"?    Do you mean you linked to the DLL posted there?

Aug 26, 2011 at 9:16 PM

Sorry, yes, that's what I meant. I linked to the DLL attached to the workitem.

Aug 31, 2011 at 4:11 PM

Created a new VM with SP3 XP (directly from MSDN image). It can tell that the older .EXE files created using the library prior to the work-around are .NET4 (gives an error message), but it still has issues with them after the work-around. Is there more info I can gather to help with this issue?