Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2007

Tip: Looking for answers? Try searching our database.

Assembly Loading Failure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Olivier Matrot - 11 Sep 2007 16:29 GMT
Hello,
I have a .NET application that is called from within an installer custom
action.
The custom action is written in c# and called from a web site setup project.
The application is installed in the web site's bin directory.
It depends on libraries that are installed in the GAC.

The call to the application in the custom action is done through
Process.Start (not using shell execute).
Here is the fusion log :
________________________________________________

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or
assembly 'FaxBoxCustomer, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=cb1c7cff7286f087' or one of its dependencies. Le fichier
sp,cifi, est introuvable.
File name: 'FaxBoxCustomer, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=cb1c7cff7286f087'
  at RTEFAXExpressCustomer.Program.Main(String[] args)

=== Pre-bind state information ===
LOG: User = RTENETWORK\olivier.matrot
LOG: DisplayName = FaxBoxCustomer, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=cb1c7cff7286f087
(Fully-specified)
LOG: Appbase = file:///C:/inetpub/wwwroot/NAWEB3/bin/
LOG: Initial PrivatePath = NULL
Calling assembly : RTEFAXExpressCustomer, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=cb1c7cff7286f087.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file:
C:\inetpub\wwwroot\NAWEB3\bin\RTEFAXExpressCustomer.exe.config
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: FaxBoxCustomer, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=cb1c7cff7286f087
LOG: Attempting download of new URL
file:///C:/inetpub/wwwroot/NAWEB3/bin/FaxBoxCustomer.DLL.
LOG: Attempting download of new URL
file:///C:/inetpub/wwwroot/NAWEB3/bin/FaxBoxCustomer/FaxBoxCustomer.DLL.
LOG: Attempting download of new URL
file:///C:/inetpub/wwwroot/NAWEB3/bin/FaxBoxCustomer.EXE.
LOG: Attempting download of new URL
file:///C:/inetpub/wwwroot/NAWEB3/bin/FaxBoxCustomer/FaxBoxCustomer.EXE.
___________________________________________________

The problem is that 'FaxBoxCustomer' library  is located in the GAC, and
that the application is working fine when launched from the command line !
In both case the user is the same.

Previously the libraries were located alongside the application.

TIA.
Vadym Stetsiak - 12 Sep 2007 09:25 GMT
Hello, Olivier!

Are there any assemblyBinding elements in the
RTEFAXExpressCustomer.exe.config?

Consult the following article
http://msdn2.microsoft.com/en-us/library/yx7xezcf.aspx, particularly the
section about
"steps to resolve an assembly reference".

--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com

You wrote  on Tue, 11 Sep 2007 17:29:23 +0200:

OM> Hello,
OM> I have a .NET application that is called from within an installer
OM> custom  action.
OM> The custom action is written in c# and called from a web site setup
OM> project.
OM> The application is installed in the web site's bin directory.
OM> It depends on libraries that are installed in the GAC.

OM> The call to the application in the custom action is done through
OM> Process.Start (not using shell execute).
OM> Here is the fusion log :
OM> ________________________________________________

OM> Unhandled Exception: System.IO.FileNotFoundException: Could not load
OM> file or  assembly 'FaxBoxCustomer, Version=1.0.0.0, Culture=neutral,
OM> PublicKeyToken=cb1c7cff7286f087' or one of its dependencies. Le
OM> fichier  sp,cifi, est introuvable.
OM> File name: 'FaxBoxCustomer, Version=1.0.0.0, Culture=neutral,
OM> PublicKeyToken=cb1c7cff7286f087'
OM>    at RTEFAXExpressCustomer.Program.Main(String[] args)

OM> === Pre-bind state information ===
OM> LOG: User = RTENETWORK\olivier.matrot
OM> LOG: DisplayName = FaxBoxCustomer, Version=1.0.0.0, Culture=neutral,
OM> PublicKeyToken=cb1c7cff7286f087  (Fully-specified)
OM> LOG: Appbase = file:///C:/inetpub/wwwroot/NAWEB3/bin/
OM> LOG: Initial PrivatePath = NULL
OM> Calling assembly : RTEFAXExpressCustomer, Version=1.0.0.0,
OM> Culture=neutral,
OM> PublicKeyToken=cb1c7cff7286f087.
OM> ===
OM> LOG: This bind starts in default load context.
OM> LOG: Using application configuration file:
OM> C:\inetpub\wwwroot\NAWEB3\bin\RTEFAXExpressCustomer.exe.config
OM> LOG: Using machine configuration file from
OM> C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
OM> LOG: Post-policy reference: FaxBoxCustomer, Version=1.0.0.0,
OM> Culture=neutral, PublicKeyToken=cb1c7cff7286f087
OM> LOG: Attempting download of new URL
OM> file:///C:/inetpub/wwwroot/NAWEB3/bin/FaxBoxCustomer.DLL.
OM> LOG: Attempting download of new URL
OM> file:///C:/inetpub/wwwroot/NAWEB3/bin/FaxBoxCustomer/FaxBoxCustomer.
OM> DLL.
OM> LOG: Attempting download of new URL
OM> file:///C:/inetpub/wwwroot/NAWEB3/bin/FaxBoxCustomer.EXE.
OM> LOG: Attempting download of new URL
OM> file:///C:/inetpub/wwwroot/NAWEB3/bin/FaxBoxCustomer/FaxBoxCustomer.
OM> EXE.
OM> ___________________________________________________

OM> The problem is that 'FaxBoxCustomer' library  is located in the GAC,
OM> and  that the application is working fine when launched from the
OM> command line !
OM> In both case the user is the same.

OM> Previously the libraries were located alongside the application.

OM> TIA.
Phil Wilson - 13 Sep 2007 20:39 GMT
Assemblies aren't commited to the GAC during an MSI install until after your
custom actions run, so if you run code that has a dependency on a GAC custom
action it will fail to load it.

Signature

Phil Wilson
[MVP Windows Installer]

> Hello,
> I have a .NET application that is called from within an installer custom
[quoted text clipped - 51 lines]
>
> TIA.
Olivier MATROT - 14 Sep 2007 07:34 GMT
Thanks for that.

> Assemblies aren't commited to the GAC during an MSI install until after your
> custom actions run, so if you run code that has a dependency on a GAC custom
[quoted text clipped - 55 lines]
> >
> > TIA.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.