473,388 Members | 1,234 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Install Project Custom Action Failure

Using VS.Net 2003 .Net framework 1.1 SP1

Our installation project calls a Custom Action dll to perform post install
actions. It fails if the .msi file is launch from a directory that contains
spaces, such as:

My Install Folder\SetupDir

The exception thrown is:

Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name and, or one of its
dependencies, was not found

In the custom action project, I've overridden both Install and Commit. The
commit section is the method that does the actual work. We placed message
boxes at the top
of each function to attempt to see where the failure occurred. We see the
"Reached Install" message but not the Commit. By attaching to the process
I've also confirmed that the call to base.Install(stateSaver) is called and
does not throw the exception. So somewhere after base.Install(stateSave)
and the entry into Commit the error mentioned above is thrown. If the .msi
is launched from MyInstallFolder\SetupDir all is fine. Not sure where to go
with this at this point. Help would be appreciated.

public override void Install(IDictionary stateSaver)
{
MessageBox.Show("Reached Install");
base.Install (stateSaver);
}

public override void Commit(IDictionary savedState)
{
MessageBox.Show("Reached Commit");
base.Commit (stateSaver);
rest of code....
}
May 15 '06 #1
3 7233
Some additional info that appears to be causing the problem. In the
installation project, if you right-click on the project name select
View->Custom Actions then view the properties for the Primary output in the
Commit Folder I've specified /InstPath=[OriginalDatabase] in the
CustomActionData property. If I remove it all is well. The problem is I
need to know the folder that the .msi launched from and don't know another
way to get it.

"Eric" <ms********@noemail.nospam> wrote in message
news:eF**************@TK2MSFTNGP04.phx.gbl...
Using VS.Net 2003 .Net framework 1.1 SP1

Our installation project calls a Custom Action dll to perform post install
actions. It fails if the .msi file is launch from a directory that
contains spaces, such as:

My Install Folder\SetupDir

The exception thrown is:

Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name and, or one of its
dependencies, was not found

In the custom action project, I've overridden both Install and Commit.
The commit section is the method that does the actual work. We placed
message boxes at the top
of each function to attempt to see where the failure occurred. We see the
"Reached Install" message but not the Commit. By attaching to the process
I've also confirmed that the call to base.Install(stateSaver) is called
and does not throw the exception. So somewhere after
base.Install(stateSave) and the entry into Commit the error mentioned
above is thrown. If the .msi is launched from MyInstallFolder\SetupDir
all is fine. Not sure where to go with this at this point. Help would be
appreciated.

public override void Install(IDictionary stateSaver)
{
MessageBox.Show("Reached Install");
base.Install (stateSaver);
}

public override void Commit(IDictionary savedState)
{
MessageBox.Show("Reached Commit");
base.Commit (stateSaver);
rest of code....
}

May 15 '06 #2
You might need to quote the OriginalDatabasePath as it describes here for
TARGETDIR:
http://msdn2.microsoft.com/en-us/library/2w2fhwzz.aspx

You get the FileNotFoundException because there is a bunch of code parsing
your CustomActionData string which is concatenated with some internal
iimplementation string data, such as the name of the assembly containing the
installer class. It's tripping over the parsing of your string and winding
up with a nonsense name for the assembly (and probably the associated state
file).
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"Eric" <ms********@noemail.nospam> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Some additional info that appears to be causing the problem. In the
installation project, if you right-click on the project name select
View->Custom Actions then view the properties for the Primary output in
the Commit Folder I've specified /InstPath=[OriginalDatabase] in the
CustomActionData property. If I remove it all is well. The problem is I
need to know the folder that the .msi launched from and don't know another
way to get it.

"Eric" <ms********@noemail.nospam> wrote in message
news:eF**************@TK2MSFTNGP04.phx.gbl...
Using VS.Net 2003 .Net framework 1.1 SP1

Our installation project calls a Custom Action dll to perform post
install actions. It fails if the .msi file is launch from a directory
that contains spaces, such as:

My Install Folder\SetupDir

The exception thrown is:

Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name and, or one of
its dependencies, was not found

In the custom action project, I've overridden both Install and Commit.
The commit section is the method that does the actual work. We placed
message boxes at the top
of each function to attempt to see where the failure occurred. We see
the "Reached Install" message but not the Commit. By attaching to the
process I've also confirmed that the call to base.Install(stateSaver) is
called and does not throw the exception. So somewhere after
base.Install(stateSave) and the entry into Commit the error mentioned
above is thrown. If the .msi is launched from MyInstallFolder\SetupDir
all is fine. Not sure where to go with this at this point. Help would
be appreciated.

public override void Install(IDictionary stateSaver)
{
MessageBox.Show("Reached Install");
base.Install (stateSaver);
}

public override void Commit(IDictionary savedState)
{
MessageBox.Show("Reached Commit");
base.Commit (stateSaver);
rest of code....
}


May 15 '06 #3
Many thanks. That did it. I tried quoting the value several different
ways but was unaware of the need for the ending backslash.
"Phil Wilson" <pd*******@nospam.cox.net> wrote in message
news:uR*************@TK2MSFTNGP02.phx.gbl...
You might need to quote the OriginalDatabasePath as it describes here for
TARGETDIR:
http://msdn2.microsoft.com/en-us/library/2w2fhwzz.aspx

You get the FileNotFoundException because there is a bunch of code parsing
your CustomActionData string which is concatenated with some internal
iimplementation string data, such as the name of the assembly containing
the installer class. It's tripping over the parsing of your string and
winding up with a nonsense name for the assembly (and probably the
associated state file).
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"Eric" <ms********@noemail.nospam> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Some additional info that appears to be causing the problem. In the
installation project, if you right-click on the project name select
View->Custom Actions then view the properties for the Primary output in
the Commit Folder I've specified /InstPath=[OriginalDatabase] in the
CustomActionData property. If I remove it all is well. The problem is I
need to know the folder that the .msi launched from and don't know
another way to get it.

"Eric" <ms********@noemail.nospam> wrote in message
news:eF**************@TK2MSFTNGP04.phx.gbl...
Using VS.Net 2003 .Net framework 1.1 SP1

Our installation project calls a Custom Action dll to perform post
install actions. It fails if the .msi file is launch from a directory
that contains spaces, such as:

My Install Folder\SetupDir

The exception thrown is:

Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name and, or one of
its dependencies, was not found

In the custom action project, I've overridden both Install and Commit.
The commit section is the method that does the actual work. We placed
message boxes at the top
of each function to attempt to see where the failure occurred. We see
the "Reached Install" message but not the Commit. By attaching to the
process I've also confirmed that the call to base.Install(stateSaver) is
called and does not throw the exception. So somewhere after
base.Install(stateSave) and the entry into Commit the error mentioned
above is thrown. If the .msi is launched from MyInstallFolder\SetupDir
all is fine. Not sure where to go with this at this point. Help would
be appreciated.

public override void Install(IDictionary stateSaver)
{
MessageBox.Show("Reached Install");
base.Install (stateSaver);
}

public override void Commit(IDictionary savedState)
{
MessageBox.Show("Reached Commit");
base.Commit (stateSaver);
rest of code....
}



May 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Mullins | last post by:
I have a Windows Service that I created using Visual Studio.NET 2003. No custom code, just an empty Windows Service. In VS.NET, I right click on the service, and say "Add Installer", to create a...
2
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically...
3
by: Ryan | last post by:
I have a simple project, most of it generated by Visual Studio. Public Windows Service Installer (Also generated), with : public class ProjectInstaller : System.Configuration.Install.Installer...
3
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I...
1
by: Eric | last post by:
Our .Net installation project includes a custom action that is launched post install. When the msi is run from a desktop, all is fine. We tested an install doing an Active Directory push to...
10
by: =?Utf-8?B?SmFjayBTbWl0aA==?= | last post by:
Hello, I have a solution that contains a C# application that is installed and runs as a service. The solution also contains several DLLs, some of which are C# assemblies and some are C++ DLLs. ...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Actually, my installer package is not for a Windows Service, but for a WinForms application. Well, it is kind of both: this is a multi-project solution with its main target being a WinForms...
3
by: =?Utf-8?B?S2VuIExlbWlldXg=?= | last post by:
My clickonce app fails when the install button on the publish.htm page is clicked. User is prompted with a "Cannot Start Application" dialog. Details provided from the dialog are: PLATFORM...
3
by: KennethLundin | last post by:
Hi, i'm developing a solution in VS9/CSharp. Now I'm constructing a deployment project for my appliation (thick, database driven, winforms, standard, good old type of application). During...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.