↧
From: | Rick Strahl |
To: | Craig Tucker |
+++ Rick ---
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); } } }