mercredi 29 juin 2011 11:31
I am having an installation related error .
Error 1001: Exception occurred while initializing the installation:
System.IO.FileNotFoundException.Could not load file or assembly.
'file ///C:\\Windows\system32\Files\Default' or one of its dependencies .
The system cannot find the file mentioned.
Also let me know few tips about debugging an installation.
Toutes les réponses
samedi 3 septembre 2011 14:47
I had the same error related to where I wanted to install a service.
I had an INI and an Icon file that were also being outputed to the Application Folder within the Installer project. I think my problem came in when I specified another location ([TARGETDIR]) during my installation of the service than the default [ProgramFilesFolder][ManufacturerPath]\blah that it has in one of those installer properties. I needed to simulate on my Dev server how Production is, though - with a D: drive as to where Program Files are really stored. Problem is on my Dev server, doing an "echo %ProgramFiles%" on a command prompt shows my Program Files directory is on my C:, not D: (opposite of Production). So when I told it to install to a D: location (even though D: was really just a map back to my C$ share on my Dev server), it did not work and I got the same error as you. When I told it to install to C:, it did work. It's funny, though, because the files still tracked with my D: location and would copy what I specified in the installer project when I chose D: instead of C: - it was only at the end of the installation where I would get the error and everything would get rolled back/deleted. Maybe an edge case, but might help you.
Also, while "debug" doesn't work here, some tips for how you can troubleshoot this error include making sure every parameter you obtain via installation dialogs has been filled in and is correct for what it's supposed to do in your installer file's (ProjectInstaller.cs or .vb file) "Install" routine. Try hard-coding the values you're trying to put into the dialog, but put them into your installer code instead and comment-out the Context.Parameters lines you have. Re-run the installation. Try commenting out the custom parameters one at a time til the error goes away. Ensure that your installer removes any previous installation (it's a property on the setup project) when you install. Ensure that any file paths you capture via the dialog either end in a file name or a trailing slash or put it in the Custom Action parameter: /path="[EDITA1]\" . For each parameter, no delimiters besides spaces are needed if you have multiple variables to capture: /path="[EDITA1]\" /username="[EDITA2]"