Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: ZipFiles Class and wwDotNetBridge

$
0
0
Re: ZipFiles Class and wwDotNetBridge
.NET Development
Re: ZipFiles Class and wwDotNetBridge
Jul. 24, 2013
02:03 pm
3U80U45XNShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:Craig Tucker
There's no version 4.5. Only version V4. Look at the error messages returned from the various functions and verify the .NET version returned from loBridge.GetDotnetVersion(). Most likely the 4.5 version you specified actually falls back to the default 2.0 runtime.

+++ Rick ---



Hi Rick,
I am trying to use the .NET ZipFile class in System.IO.Compression.FileSystem assembly in VFP using wwDotNetBridge.
Please help.
Thanks, Craig

My .net version is ".NET Version: 4.0.30319.18052".

loBridge = CreateObject("wwDotNetBridge","V4.5")
loBridge good...

I could not get loBridge.InvokeStaticMethod() to work. However, I could on other assemblies such as 'System.IO.Directory'.

I can even load the assembly from ..\.NETFramework\v4.5\ folder but can't get the ZipFile class to instantiate.

.NET equivalent from http://msdn.microsoft.com/en-us/library/system.io.compression.zipfile.aspx

using System;using System.IO;using System.IO.Compression;namespace ConsoleApplication {class Program {staticvoid Main(string[] args) {string startPath = @"c:\example\start";string zipPath = @"c:\example\result.zip";string extractPath = @"c:\example\extract"; ZipFile.CreateFromDirectory(startPath, zipPath); ZipFile.ExtractToDirectory(zipPath, extractPath); } } }




Rick Strahl
West Wind Technologies


from Slovenia


Viewing all articles
Browse latest Browse all 10393

Trending Articles