Where can I get Mono.Cecil.Pdb.dll? - mono

I'm trying to write a IL Weaver with Mono.Cecil, and for it to remain debugable in VS2010, I need the PdbReaderProvider class, or some similar implementation of ISymbolProvider. I've downloaded the latest Mono dlls from http://mono.ximian.com/daily/, but in the zip there is no Mono.Cecil.Pdb.dll. I've downloaded the source code from https://github.com/jbevain/cecil/tree/master/Mono.Cecil but I can't seem to be able to get that particular project compile under .net 4.
Could somebody help me out and point to a compiled working .net dll of Mono.Cecil.Pdb, preferably with a working PdbReaderProvider inside?

Indeed, you need to get the source from Cecil's github repository. Then you just have to open Mono.Cecil.sln inside VS 2010, select the solution configuration net_4_0_Debug (or net_4_0_Release) and build the solution. The solution is self contained so you don't need anything else.
You'll get both Mono.Cecil.dll and Mono.Cecil.Pdb.dll inside bin/net_4_0_Debug (or bin/net_4_0_Release).

Alternatively, get the NuGet package which includes all Cecil assemblies. If you're on the MS stack, of course.

Related

ExcelRichTextHtmlUtility is missing from nuget package

ExcelRichTextHtmlUtility does not appear in the EPPlus 4.5.1 library (or 4.1 for that matter). I see it's in the code in source control but doesn't get shipped I guess. Is there a particular reason or maybe I'm doing something wrong.
It's in the source code but not compiled as part of the project anymore. When I include ExcelRichTextHtmlUtility.cs, the following line does not compile:
s = System.Web.HttpUtility.HtmlDecode(s);
In taking a look at the project settings, EPPlus targets the .NET 3.5 Client Profile framework. The Client Profile is a subset of the framework which for example does not include System.Web, so HttpUtility cannot be used so they must have just simply excluded the class.
I couldn't find any reference to exactly when and why this was changed so this probably does not completely answer your question.

Umbraco xmltree update dll

I had to change the xmltree.cs file and now i need to move the dll of the compiled code into another project to update the project. There are a ton of dlls in the presentation bin. I wanted to know if anyone would know which specific ones would need to be moved.
Thanks,
Corey
Assuming that you have created your project from the Umbraco source, you will need to get a clean set of the source (same version) and compile it without your change. Then make your change and recompile. The affected DLLs will have changed their modified dates, and these will be the ones that are dependent on your code change.
You should never base your project directly on the source, especially if you don't know what you're doing. If you need to modify the source, keep it separate (and under source control) and build your project on the compiled version.

Error when trying to zip files VB.NET 2003

I have to make a simple zip file using Visual Studio and VB.NET 2003.
After some googling I got to this page: http://www.digioz.com/tutorials/zip_unzip_vbNET/Zip_and_Unzip_VB_NET_1.html wich basically provides me 3 DLLs with classes that are ready to zip files.
When I try to create an instance of the class like the tutorial tells me to:
Dim zp As New CGZipLibrary.CGZipFiles
I get this error:
COM object with CLSID {293364BA-43F8-11D3-BC2D-4000000A2806} is either not valid or not registered.
Ideas?
If anybody got a better/easier approach to zip files using VB.NET 2003 it would be helpful too.
Thanks.
EDIT:
Thanks for all who answered, but I've used a different approach than the suggested ones to zip my files.
I used the Shell function of the Microsoft.VisualBasic.Interaction class like this:
Shell("zip -j " & fileName, AppWinStyle.Hide, True)
Thanks again for those who dedicated their time trying to help me!
It looks like that library you are trying to use is an old COM dll. That means you have to register the dll first using regsvr32.exe before you can use it. However, I would recommend using a native .NET (managed) library. Unless it doesn't meet your needs, I'd simply recommend looking at the GZipStream class which is part of the .NET framework.
Have you tried this one? This is pretty good: ionic.zip.reduced, a dotnetzip library.
Example:
Using zip As ZipFile = New ZipFile()
zip.AddFile("c:\photos\personal\7440-N49th.png")
zip.AddFile("c:\Desktop\2008_Annual_Report.pdf")
zip.AddFile("ReadMe.txt")
zip.Save("MyZipFile.zip")
End Using
More VB.NET examples of Ionic.ZIP
UPDATE:
Your problem is that VS2003 can't use the targeting of the dll which was created in a newer (eg. VS2005) version of VS. For many have tried to use that, a tool was created which you can download here. For more information, visit this site.
Another option that I use in most of my projects is #ZipLib (SharpZipLib), downloads available here:
http://www.icsharpcode.net/opensource/sharpziplib/Download.aspx
Documentation and samples for both VB and C# are available at the same site. It has specific binary assemblies (dll) for .NET framework 1.1, as well as later versions. It's likely that some of the other libraries that you're run across are compiled for .NET 2.0 or later, which won't work in VS2003.
Don't let the name fool you -- it's written in C# (hence the name) but the compiled assemblies work just fine in VB.NET. It supports Zip, GZip, tar, and BZip2 archives.

using a legacy (VB6) DLL in new visual studio express (C++ prefrred) project

I've got an old legacy application for communicating via serial port to an embedded controller communications bus. that someone else developed.
The application is written in VB6, and is structured as two projects - a DLL to handle the connection and communications logic, with an application GUI project.
I was hoping to be able to write a new application GUI (in C++ ideally) to use the existing DLL as-is, but I'm having lots of problems working out how to import it.
So I'm wondering, is it even going to be possible to use this old DLL into a C++ project as is? or is it possible to import into a C# project? or a VB.NET project? (would prefer not to use VB, but can if I have to)
Where I am now:
I have the existing compiled executable and DLL, and these run on my system.
I also have the project files, and they're all readable in notepad++ but I don't have VB6, and importing the project into visual studio VB.NET 2008 express isn't at all straightforward. Especially not without a working example to dig through and play with first (DLL project may be importable, but has 50+ things indicated as needing changing in the upgrade report. It also seems to be ignoring three .cls files that look very important to my not particularly VB6-savvy eyes... The application project has a message in the upgrade report about something "missing a design time license" and the only project files that actually seem to come into the project explorer for imported project is the project file itself, and the assembly info file.)
Most examples of how to import a DLL into VS C++ assume you have a solution with the DLL project all compiling nicely alongside your project that will use it. Or at least a .DLL and .lib and .h file... I spoke with the original developer of the code (in another city, we don't work directly) and got a .lib to match my .dll, but still have no .h file.
I'm usually fine to bash through something new, but without a baseline working example of the project even in VB6 that I can get my understanding from, it makes this very hard. Also a lack of similar questions anywher google can find them on the net makes me wonder if this is something i should be even attempting.
I'm working on getting a non-express copy of visual studio if that will make any difference (express worked fine for everything up until now so I never needed anything more) but that will take a number of weeks, most likely.
Any suggestions would be very much appreciated.
thanks for reading!
I have to disclaim this as I have no experience doing it, but merely found that it should be possible given some reading of the docs on the subject.
I'm not sure you'll have much luck with the VB to .NET import/conversion process if there is a lot of low level stuff going on. The existing dll is likely a COM object, no?
It seems like there is some MSDN documentation to get you started from C++ using COM object dlls - and it looks like the #import directive will generate some .h (header) files as well.
http://msdn.microsoft.com/en-us/library/8etzzkb6.aspx
So I would try simply adding an #import directive for it.
#import "somelibrary.dll"
and see what visual studio generates.
Have a look at the following example as well, (copied shamelessly from another forum)
#import "F:\proj\VB6\ActiveXDLL\VBTestDLL.dll"
using namespace VBTestLib;
void CDialogTestDlg::OnButton1()
{
HRESULT hresult;
CLSID clsid;
_CTest *t; // a pointer to the CTest object
_bstr_t bstrA = L"hello";
_bstr_t bstrB = L" world";
_bstr_t bstrR;
::CoInitialize(NULL);
hresult=CLSIDFromProgID(OLESTR("VBTestLib.CTest"), &clsid);
hresult= CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,
__uuidof(_CTest),(LPVOID*) &t);
if(hresult == S_OK)
{
bstrR = t->vbConcat(bstrA , bstrB);
AfxMessageBox((char*)bstrR);
}
}

Problem getting version number from assembly file with msbuild

I'm working on msbuild to get version info from assembly file. But i got a problem that the value $(MaxAssemblyVersion) is always empty. The only difference here is that i got a .Net solution including several projects. So i have a GlobalAssemblyInfo.cs at the root folder and Assemblyinfo.cs inside every included project. Anyone has any suggestion for my situation? Is there any way to work with GlobalAssemblyinfo.cs?
Look forward to your reply!
Every comment will be very helpful and appropriated.
Many thanks,
Depending on what point during the build you need the assembly version, you could extract it from your outputs using the GetAssemblyIdentity Task.