Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InstallUtil exception on Windows Server 2008 #4

Closed
gblosser opened this issue Jul 29, 2013 · 15 comments
Closed

InstallUtil exception on Windows Server 2008 #4

gblosser opened this issue Jul 29, 2013 · 15 comments
Labels

Comments

@gblosser
Copy link

I can run installutil on my assemby on my developer box with no problem. However, on my production server I get the following output from InstallUtil:

An exception occurred during the Install phase.
System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.We
bPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or o
ne of its dependencies. The system cannot find the file specified.

@aliostad
Copy link
Owner

Can you please provide more information so that we can find the problem?
Is it 2008 or 2008 R2?
Does it have latest service packs?
Do you have .NET 4.5 installed on the box (you do not have to but I need to understand the scenarios).?

In our environment we have Windows 2008 R2 without .NET 4.5 and installation works fine for us.

@aliostad
Copy link
Owner

I suggest running the command from where the DLL is rather than from the installutil.exe location. I think your DLL has a reference to webPages 2 DLL and when you run it from your current location it cannot load the DLL since it is not GACed.

As I said, try running it from the location of your DLL. I checked and PefIt itself does not have a reference to WebPages 2 DLL.

@gblosser
Copy link
Author

I have two Windows Server boxes. InstallUtil works on one and not the
other.

Both are 2008 R2 with SP1.

Both have 4.5 installed.

The box that works has the roles of Web Server and File Server. The box
that doesn't work has only Web Server.

The box that works is not as up-to-date as the one that doesn't.

I access the box that works using my domain account as an administrator.
The box that doesn't work I access with local administrator.

I run InstallUtil in the directory containing the dll that's the target.
That directory also contains the file that InstallUtil says it can't find.

I ran InstallUtil with /showcallstack. Here is the output:

An exception occurred during the Install phase.
System.IO.FileNotFoundException: Could not load file or assembly
'System.Web.WebPages, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system
cannot find the file specified.
at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly
assembly, ObjectHandleOnStack retTypes)
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at PerfIt.PerfItRuntime.b__d(Assembly x)
at System.Linq.Enumerable.d__142.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext()
at PerfIt.PerfItRuntime.FindAllFilters()
at PerfIt.PerfItRuntime.Uninstall()
at PerfIt.PerfItRuntime.Install()
at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
at System.Configuration.Install.AssemblyInstaller.Install(IDictionary
savedState)
at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
at System.Configuration.Install.TransactedInstaller.Install(IDictionary
savedState)

On Mon, Jul 29, 2013 at 5:25 PM, Ali Kheyrollahi
notifications@github.comwrote:

Can you please provide more information so that we can find the problem?
Is it 2008 or 2008 R2?
Does it have latest service packs?
Do you have .NET 4.5 installed on the box (you do not have to but I need
to understand the scenarios).?

In our environment we have Windows 2008 R2 without .NET 4.5 and
installation works fine for us.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-21752836
.

@aliostad
Copy link
Owner

You need to use fuslogvw.exe:
http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.100).aspx

You might have to do this:
http://stackoverflow.com/questions/3240278/assembly-binding-log-viewer-fuslogvw-not-logging-any-bindings

That will tell you where it is looking for file and why it cannot find it.
Please show me the result after you have run.

@gblosser
Copy link
Author

Working on getting it installed now. I have to get permission to install
the Windows SDK from the server owner. It might be a couple of days. I'll
get back to you when I finally get a result.

Thanks for your help.

On Tue, Jul 30, 2013 at 11:40 AM, Ali Kheyrollahi
notifications@github.comwrote:

You need to use fuslogvw.exe:
http://msdn.microsoft.com/en-us/library/e74a18c4(v=vs.100).aspx

You might have to do this:

http://stackoverflow.com/questions/3240278/assembly-binding-log-viewer-fuslogvw-not-logging-any-bindings

That will tell you where it is looking for file and why it cannot find it.
Please show me the result after you have run.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-21800049
.

@aliostad
Copy link
Owner

Just copy the file (fuslogvw.exe), that should be enough. It does not need anything else, that might be quicker [I know what pain it is to get access to boxes]

@gblosser
Copy link
Author

Here is the fusion log output. It appears that it is only checking the GAC
and the Framework folders. I have the file in the same bin folder as the
file I am running InstallUtil against.:

*** Assembly Binder Log Entry (7/30/2013 @ 1:55:47 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = HLMBUILD701\Administrator
LOG: DisplayName = System.Web.WebPages, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = InstallUtil.exe

Calling assembly : (Unknown).

LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/System.Web.WebPages.DLL.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/System.Web.WebPages/System.Web.WebPages.DLL.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/System.Web.WebPages.EXE.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/System.Web.WebPages/System.Web.WebPages.EXE.
LOG: All probing URLs attempted and failed.

*** Assembly Binder Log Entry (7/30/2013 @ 1:55:47 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = HLMBUILD701\Administrator
LOG: DisplayName = System.Web.WebPages, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = InstallUtil.exe

Calling assembly : (Unknown).

LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/System.Web.WebPages.DLL.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/System.Web.WebPages/System.Web.WebPages.DLL.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/System.Web.WebPages.EXE.
LOG: Attempting download of new URL
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/System.Web.WebPages/System.Web.WebPages.EXE.
LOG: All probing URLs attempted and failed.

*** Assembly Binder Log Entry (7/30/2013 @ 1:55:48 PM) ***

The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.

Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = HLMBUILD701\Administrator
LOG: DisplayName = System.Web.WebPages, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = InstallUtil.exe
Calling assembly : System.Web.Mvc, Version=4.0.0.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35.

LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
ERR: Unrecoverable error occurred during pre-download check (hr = 0x80070002).

On Tue, Jul 30, 2013 at 12:04 PM, Ali Kheyrollahi
notifications@github.comwrote:

Just copy the file, that should be enough. It does not need anything else,
that might be quicker [I know what pain it is to get access to boxes]


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-21801915
.

@aliostad
Copy link
Owner

OK, can you please set the fuslogvw.exe to log all events and try it on the machine that works and then compare?

@aliostad
Copy link
Owner

What is the command line you are running?
I ran this and found this my log instead of

Calling assembly : (Unknown).

has

Calling assembly : xxx

And I think this is the problem since the assembly is not known.

@gblosser
Copy link
Author

The command line used is
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InsttUtil.exe /i
EP.EAE.Admin.HLMAPI.dll. The working directory is the bin folder that
contains all of the application dlls. One thing to note is that the dll
that is not found is a run-time, not compile-time dependency. It's used in
a NuGet package that generates Web API help pages.

Below is the output from a successful install. The questionable assembly
is in the GAC.:

*** Assembly Binder Log Entry (7/31/2013 @ 1:13:34 PM) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = CORP\gblosser
LOG: DisplayName = System.Web.WebPages, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = InstallUtil.exe

Calling assembly : (Unknown).

LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Found assembly by looking in the GAC.
LOG: Binding succeeds. Returns assembly from
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll.
LOG: Assembly is loaded in default load context.

*** Assembly Binder Log Entry (7/31/2013 @ 1:13:34 PM) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = CORP\gblosser
LOG: DisplayName = System.Web.WebPages, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = InstallUtil.exe
Calling assembly : System.Web.Mvc, Version=4.0.0.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35.

LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Binding succeeds. Returns assembly from
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll.
LOG: Assembly is loaded in default load context.

*** Assembly Binder Log Entry (7/31/2013 @ 1:13:34 PM) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = CORP\gblosser
LOG: DisplayName = System.Web.WebPages, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = InstallUtil.exe
Calling assembly : System.Web.Mvc, Version=4.0.0.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35.

LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Binding succeeds. Returns assembly from
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll.
LOG: Assembly is loaded in default load context.

*** Assembly Binder Log Entry (7/31/2013 @ 1:13:34 PM) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
Running under executable
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = CORP\gblosser
LOG: DisplayName = System.Web.WebPages, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = InstallUtil.exe
Calling assembly : EP.EAE.Admin.Model, Version=1.0.0.0, Culture=neutral,

PublicKeyToken=null.

LOG: This bind starts in LoadFrom load context.
WRN: Native image will not be probed in LoadFrom context. Native image will
only be probed in default load context, like with Assembly.Load().
LOG: Using application configuration file:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from
C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Switch from LoadFrom context to default context.
LOG: Binding succeeds. Returns assembly from
C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.WebPages\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll.
LOG: Assembly is loaded in default load context.

On Wed, Jul 31, 2013 at 12:44 PM, Ali Kheyrollahi
notifications@github.comwrote:

What is the command line you are running?
I ran this and found this my log instead of

Calling assembly : (Unknown).

has

Calling assembly : xxx

And I think this is the problem since the assembly is not known.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-21877055
.

@aliostad
Copy link
Owner

OK,

The one the works clearly has the assembly installed in GAC. My suggestion is to install MVC4 on the server that does not work. I think working server has it.

http://www.asp.net/mvc/mvc4

@gblosser
Copy link
Author

I'll give that a shot. I was hoping that InstallUtil could be configured
to look in certain directories besides the GAC and other system folders.
It has an application config file but I couldn't find any more information
about it than that.

It might by a couple of days before I can install MVC4 on that machine.
I'll let you know what happens.

This is obviously an InstallUtil/machine setup issue and not a PerfIt
issue. Thanks a lot for your help,
Geoff

On Wed, Jul 31, 2013 at 1:46 PM, Ali Kheyrollahi
notifications@github.comwrote:

OK,

The one the works clearly has the assembly installed in GAC. My suggestion
is to install MVC4 on the server that does not work. I think working server
has it.

http://www.asp.net/mvc/mvc4


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-21881379
.

@aliostad
Copy link
Owner

Not a problem at all. I close the issue but happy to help on the thread. Please just add comments on this thread and I will be answering.

@gblosser
Copy link
Author

gblosser commented Aug 2, 2013

It turns out that the machine already had MVC4 installed. I repaired the
installation and InstallUtil ran fine.

Thanks for your support and thanks for PerfIt.

Best Regards,
Geoff

On Wed, Jul 31, 2013 at 2:52 PM, Ali Kheyrollahi
notifications@github.comwrote:

Not a problem at all. I close the issue but happy to help on the thread.
Please just add comments on this thread and I will be answering.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-21886217
.

@aliostad
Copy link
Owner

aliostad commented Aug 2, 2013

Great nice to hear that. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants