I've poked around looking for a zip function from with Visual Studio but haven't found anything.
Is there a function? Reason I'm asking, is I'm currently creating a process within my code to call 7zip, but this program isn't installed on all user machines and installing the program is an option, just not an ideal option.
Suggestions?
Try the System.IO.Compression library that comes with C#:
ZipFile Class
I have used dotnetzip.codeplex.com with very good results. There is definitely some coding and qa work to do to ensure it's handling your data correctly. But you're quite right that it's easier to deploy to random client machines than calling out to 7zip.
Related
I have a class library dll that loads AutoCAD scripts from a network folder. However I need a way to ensure the class library can be updated silently. With Windows Form applications I would just use a ClickOnce Deployment and then use Application.Restart, however as this has to be a Class Library (as it is an AutoCAD addon) this doesn't seem to be possible.
What's the best way to handle this?
This is not possible with AutoCAD plugins because the DLL is loaded in the AppDomain. This 'silent' update is possible only with C++.
You can go the TDD way which is good practice. Here is a handout on the topic because TDD in AutoCAD is not that easy because of the above mentioned problem.
You can try to develop you algorithm in your own classes in order to have better TDD experience. Then transfer it with DTOs to AutoCADs transaction.
Some developers have 2 (or more) DLLs with AutoCAD code: the 1st main DLLs loads on AutoCAD startup, check for updates, download and install. The 2nd DLL actually contains the commands that will be demand loaded when the user run the command.
I recently built a solution that allows reloading the same copy of a .dll into AutoCAD.
Check out my blog with the full solution:
http://www.cadwiki.net/blogpost/How-to-reload-a-.dll-into-AutoCAD
Hopefully someone can tell me what I am doing wrong here. I have a SharePoint 2010 workflow I am coding in Visual Studio, and I was trying to emulate what is being done here, but as soon as I hit this line:
PdfConverter pdfConverter = new PdfConverter();
My workflow errors out.
I have Phil's book (workflow's in action) which contains an old version of the winnovative dll in one of his code samples, and thinking that might be the issue, I downloaded the newest version from winnovative's site, updated the using line at the top from:
using Winnovative.WnvHtmlConvert;
to simply:
using Winnovative;
as per the developer documentation that came with this newer version, and still no luck. Is there something else I need to do that I'm missing when using this with SharePoint? When utilizing an XSL style sheet for some transforms I had to deploy the xsl to the templates via my project utilizing the sharepoint mapped folder from within Visual Studio. Is something similar required for the winnovative dll to be utilized as well, so that the functions within the dll can be accessed? Do I need to do regsvr32 on the sharepoint server to utilize (something that literally just occurred to me as I'm writing this post), or is adding the reference in visual studio and compiling my code enough? Sorry, not the world's greatest developer, so some insight would be HUGELY appreciated. Thank you in advance for your time.
I figured it out. Following the breadcrumbs of my questions, I found out the dll needed to be deployed to the GAC. Once I did that it worked. This has been a big learning experience, but at least now I know. Thanks for looking.
I noticed the other day that the Zune PC Software exposes a type library (ZuneCore.dll). It seems to be related to the WMPLib API in some way but I can't figure out how to use it either from VB6 or C#.
Has anybody tried this and had any luck?
Dave
May be an old question, but this link might help: http://zunelcd.codeplex.com/ If you download the source for this project one of the class libraries is a decent API for communicating with the Zune Software.
i just found out about this -> http://soapitstop.com/blogs/fleamarket/archive/2008/03/03/read-the-zune-collection-in-net-from-zune-s-own-api.aspx but it seems a bit outdated Initialize method now takes some parameters and i dont know what to put there!
Try adding a reference to it from a .NET project in Visual Studio. Perhaps this namespace will appear magically: MicrosoftZuneLibrary
I have a interesting problem: Where I work we've built a home-grown ERP system in VB6 that we are slowly moving over into vb.net. There are some projects have are in .net: we have a hand-held C# project that uses a web service to talk to our database, I've built some reporting screens using Crystal and some smaller maintenance screens.
Well as we have been plotting the conversion out, we want to have a way to separate our business logic and UI so that the UI can be a win/web form or a Smart Device project. Is this even possible? I try to reference the DLL in a test I have and it gives me this error when trying to debug using a emulator
Deployment and/or registration failed with error: 0x8973190e. Error writing file '%csidl_program_files%\smartdeviceproject1\system.windows.forms.dll'. Error 0x80070070: There is not enough space on the disk.
I'm not sure what it's doing... I take my DLL out and it works fine. Does anyone know of a way I can create a DLL that can target all of these UI without may changes?
This post here
helped me alot. Using a linked projects with conditional complation would seem to work in my case.
Not sure that this is a valid programming question ... but is it possible to program infa red using vb.net express (iRDA) Got a programming project in my mind, but none of the coding examples work, IrDAClient never gets recognised
Cheers
It's a valid question but it needs to be a bit more specific. VB.Net can certainly be used to program against IRDA. There is nothing preventing you from using IrDAClient with VB.Net.
We do need to know though what problems you are having? Can you post the samples that are giving you trouble or tell us what errors you are seeing?
EDIT Update to comments
There is nothing that will prevent you from writing a program targeting IRDA from VB Express. What you appear to be missing is a reference to the DLL that contains the IrDA libraries. You'll neeed to add a reference to System.Net.Irda.dll. It will be in the following directory (assuming your programming to Windows CE)
C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE
EDIT2
I may be wrong about the ability of VB express to program against a device project. I don't have any 2008 express builds on my machine to verify right now.
The IrDAClient class is part of the .Net Compact framework. I'm not sure if it's possible to use it on a desktop machine.
You can at least add the reference by searching for the file System.Net.IrDA.dll. On my system it was under: Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\v1.0.5000\Windows CE
If it's not present you may be able to download it here: http://msdn.microsoft.com/en-us/netframework/aa497280.aspx