Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Interop.MSutil.dll

First of all i want to say that I'm still a beginner in ASP.NET development. I think this is a simple question but I cant find an answer anywhere. The following is my problem:

I have a big ASP.NET project develped in .NET 2.0 . Now I have to update thisProject to .NET 4.0. I think it worked quite well when I loaded and converted it to .NET 4.0 with VS2010 but there is this missing reference.

The missing reference is MSutil.dll and I don't have any clue what that reference is for an I cant find the dll anywhere either. In the cs code its used like this:

using LogQuery = MSUtil.LogQueryClassClass;
using IisW3cLogInputClass = MSUtil.COMIISW3CInputContextClassClass;
using LogRecordSet = MSUtil.ILogRecordset;
using LogRecord = MSUtil.ILogRecord;

Can anyone tell me...

  • what this reference is for?
  • where I can find/download it?
  • how I can include/install it in my solution?
like image 438
colosso Avatar asked Jun 26 '12 08:06

colosso


2 Answers

This is used to read the IIS log files and parse them.

To get that DLL follow those steps:

  1. Download the Log Parser package, here. (free download, small .msi file)

  2. Install the Log Parser on the machine with the your project and Visual Studio.

  3. Browse to the location of the installed program and you will see file called "LogParser.dll" in there. Copy the file to some easy location e.g. "C:\Temp" see below why.

  4. Go to All Programs --> Microsoft Visual Studio 2010 --> Visual Studio Tools and right click "Visual Studio Command Prompt" then choose Run as administrator.

  5. From within the console type:

    tlbimp "C:\temp\LogParser.dll" /out:"C:\temp\Interop.MSUtil.dll"
    

That's it - after this you will have the lost Interop.MSUtil.dll back on your machine, copy it to your project location and add reference to it like you add to any other external DLL file.

like image 72
Shadow Wizard Hates Omicron Avatar answered Sep 19 '22 21:09

Shadow Wizard Hates Omicron


Interop.MSutil.dll is a .NET interface to LogParser.dll, primarily used to parse IIS logs.

To use it, you will need LogParser 2.2 installed and LogParser.dll registered on your machine.

Interop.MSUtil is now available via nuget so you no longer have to create it yourself, but after installation you will have to manually add a reference to the DLL in your solution's packages folder.

After adding the reference, right-click it and set Embed Interop Types to false to avoid receiving an error that the classes cannot be embedded.

like image 26
Wildcat Matt Avatar answered Sep 20 '22 21:09

Wildcat Matt