Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi Prism/Other    [ Add a report in this area ]  
Report #:  92037   Status: Closed
Cannot Install Windows Service
Project:  Embarcadero Prism Build #:  4.0.25.791
Version:    1.1 Submitted By:   Karl Bennett
Report Type:  Basic functionality failure Date Reported:  3/6/2011 2:26:35 PM
Severity:    Commonly encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    64 Bit Internal Tracking #:   282136
Resolution: As Designed (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 1
Description
I successfully build a very basic Windows Service as a test case that was to write to a file on a timed basis.

I have successfully compiled the project in PRISM XE and was ready to complete the last step namely to install the Windows Service using the "Installutil" command.

The nature of the error (below) seems to suggest the installutil is using the .Net 2.0 framework, however I am developing on .Net 4.0 framework.

How can I get an InstallUtil compatible for .Net 4.0 so I can complete my install ?
Steps to Reproduce:
I opened a command prompt (tried the only command prompts available: "RemObjects Oxygene Command Prompt" and also "RAD Studio Command Prompt").

I then changed directory to where the release .exe code was located and entered:-
InstallUtil TimerSrv.exe

I got the response:-
Microsoft (R) .NET Framework Installation utility Version 2.0.50727.4927
Copyright (c) Microsoft Corporation.  All rights reserved.

Exception occurred while initializing the installation:
System.BadImageFormatException: Could not load file or assembly 'file:///C:\User
s\Karl\Documents\Visual Studio 2010\Projects\QL-WindowServiceTimer\TimerSrv\Time
rSrv\bin\Release\timersrv.exe' or one of its dependencies. This assembly is buil
t by a runtime newer than the currently loaded runtime and cannot be loaded..
Workarounds
None - cannot install the windows service
Attachment
TimerSrv.zip
Comments

Tomohiro Takahashi at 3/6/2011 5:38:54 PM -
What OS do you use, for example Windows 7(64bit) etc...?
And, could you please attach sample project to reproduce your issue?

Karl Bennett at 3/6/2011 7:56:20 PM -
I am using Windows 64 bit OS
I am using a purchased copy of PRISM XE that I activated after installing the RAD Studio XE Trial.

I have the sample project all zipped up ready to share with you but I can't see anyway to attach it to this report.
Please advise how I can send it to you.
Thanks

Tomohiro Takahashi at 3/7/2011 12:15:09 AM -
> I have the sample project all zipped up ready to share with you but I can't see anyway to attach it to this report.
Please use Windows Native QC Client to attach a .zip fle to your report,
The standalone client is available at this URL.
http://qc.codegear.com/qualitycentral.zip

Karl Bennett at 3/7/2011 1:57:07 AM -
I have used the standalone client to upload the zip file (see attachment section)

Carlo Kok at 3/25/2011 12:59:11 AM -
Use the tool for v4, not v2.

It's in C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe (adjust for different locations of windows)

Server Response from: ETNACODE01