I’ve created an essentially empty windows service to test in an Octopus deployment. After a couple false starts (packing the MSI from an installer project instead of the output from the windows service project) I ended up getting the service to install to a Windows 7 machine, but it fails to install on Win2008R2.
The Failing Installation:
2011-07-08 19:35:34 INFO Deploying release '1.0.2' of project 'AwesomeService' into environment 'Development'
2011-07-08 19:35:34 INFO Downloading NuGet package AwesomeService 1.0.2 from feed: '\\d1515b-cmcbride\Files'
2011-07-08 19:35:34 DEBUG Completed download of NuGet package AwesomeService 1.0.2
2011-07-08 19:35:34 DEBUG Uploading package AwesomeService 1.0.2 to tentacle http://KUCY2DAPPFAB01:10933
2011-07-08 19:35:35 DEBUG Package AwesomeService 1.0.2 has already been uploaded to tentacle 'http://KUCY2DAPPFAB01:10933', no need to upload it
2011-07-08 19:35:35 DEBUG Deploying package AwesomeService 1.0.2 to tentacle http://KUCY2DAPPFAB01:10933
2011-07-08 19:35:36 INFO Deployment successful. Tentacle output follows:
2011-07-08 19:35:35 DEBUG Tasks will be run in the following order:
- PowerShellPreDeployScript
- XmlConfigTransforms
- XmlConfigVariables
- PowerShellDeployScript
- Installers
- IisWebSite
- PowerShellPostDeployScript
2011-07-08 19:35:35 INFO Updating any .config files
2011-07-08 19:35:35 INFO Installing any Installers
2011-07-08 19:35:35 DEBUG Scanning assembly: C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe
2011-07-08 19:35:35 DEBUG Running InstallUtil /i "C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe" /OctopusEnvironmentName="Development"
2011-07-08 19:35:35 DEBUG InstallUtil 'C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe' completed.
2011-07-08 19:35:35 DEBUG InstallUtil output:
2011-07-08 19:35:35 DEBUG Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe' or one of its dependencies. An attempt was made to load a program with an incorrect format..
2011-07-08 19:35:35 DEBUG A web.config file was not found, so no IIS configuration will be performed.
2011-07-08 19:35:35 INFO Deployment complete!
The Same Service/Package Installing Successfully:
2011-07-08 19:31:25 INFO Deploying release '1.0.2' of project 'AwesomeService' into environment 'Development'
2011-07-08 19:31:25 INFO Downloading NuGet package AwesomeService 1.0.2 from feed: '\\XXX\Files'
2011-07-08 19:31:25 DEBUG Completed download of NuGet package AwesomeService 1.0.2
2011-07-08 19:31:25 DEBUG Uploading package AwesomeService 1.0.2 to tentacle http://XXX:10933
2011-07-08 19:31:26 DEBUG Package AwesomeService 1.0.2 has already been uploaded to tentacle 'http://XXX:10933', no need to upload it
2011-07-08 19:31:26 DEBUG Deploying package AwesomeService 1.0.2 to tentacle http://XXX:10933
2011-07-08 19:31:29 INFO Deployment successful. Tentacle output follows:
2011-07-08 19:31:26 DEBUG Tasks will be run in the following order:
- PowerShellPreDeployScript
- XmlConfigTransforms
- XmlConfigVariables
- PowerShellDeployScript
- Installers
- IisWebSite
- PowerShellPostDeployScript
2011-07-08 19:31:26 INFO Updating any .config files
2011-07-08 19:31:26 INFO Installing any Installers
2011-07-08 19:31:26 DEBUG Scanning assembly: C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe
2011-07-08 19:31:26 DEBUG Running InstallUtil /i "C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe" /OctopusEnvironmentName="Development"
2011-07-08 19:31:28 DEBUG InstallUtil 'C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe' completed.
2011-07-08 19:31:28 DEBUG InstallUtil output:
2011-07-08 19:31:28 DEBUG Microsoft (R) .NET Framework Installation utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Running a transacted installation.
Beginning the Install phase of the installation.
See the contents of the log file for the C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe assembly's progress.
The file is located at C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.InstallLog.
Installing assembly 'C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe'.
Affected parameters are:
logtoconsole =
i =
logfile = C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.InstallLog
assemblypath = C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe
Installing service AwesomeService...
Service AwesomeService has been successfully installed.
Creating EventLog source AwesomeService in log Application...
The Install phase completed successfully, and the Commit phase is beginning.
See the contents of the log file for the C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe assembly's progress.
The file is located at C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.InstallLog.
Committing assembly 'C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe'.
Affected parameters are:
logtoconsole =
i =
logfile = C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.InstallLog
assemblypath = C:\Octopus\Tentacle\Applications\AwesomeService.1.0.2\content\AwesomeService.exe
The Commit phase completed successfully.
The transacted install has completed.
2011-07-08 19:31:28 DEBUG A web.config file was not found, so no IIS configuration will be performed.
2011-07-08 19:31:28 INFO Deployment complete!
(btw, if this appears as a double post, i can’t get to my original post which was improperly placed in “Questions” to remove it)