What is Interop.MSutil.dll

2019-04-25 02:37发布

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?

3条回答
够拽才男人
2楼-- · 2019-04-25 03:13

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.

查看更多
甜甜的少女心
3楼-- · 2019-04-25 03:20

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.

查看更多
\"骚年 ilove
4楼-- · 2019-04-25 03:23

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

查看更多
登录 后发表回答