8

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?
1
  • You mean it was developed in .NET 2.0 or 3.5? There is no .NET 2.5 as far as I can tell. Commented Jun 26, 2012 at 8:24

3 Answers 3

13

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.

4
  • Thank you this worked great! Unfortunately "MSUtil.COMIISW3CInputContextClassClass;" and "MSUtil.LogQueryClassClass;" give still an error that they cant be embeded... Do you have an idea why?
    – colosso
    Commented Jun 26, 2012 at 9:09
  • What exact error you get and on what stage? (compile or runtime) You can add it to your question as well. Commented Jun 26, 2012 at 9:40
  • @ShadowWizard But the Using statements in the OP's code above are now giving me the error such as: A using namespace directive can only be applied to namespaces 'LogQueryClassClass' is a type not a namespace
    – nam
    Commented Apr 4, 2019 at 0:39
  • It's so sample, Thanks!! Commented Jul 2, 2021 at 8:02
4

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.

1
  • I'm unable to install the package you recommended. I've posted a question here. Would you have any comments/suggestions?
    – nam
    Commented Apr 4, 2019 at 0:10
1

It seems is an Interop object.

An Interop object is a bridge between a .Net dll and a COM object

Perhaps this link helps you

http://www.fixdllexe.com/Interop.MSUtil.dll-149085.html

Not the answer you're looking for? Browse other questions tagged or ask your own question.