|
-
Mar 13th, 2013, 04:12 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] windows service could not load file or assembly
I have created windows services before and able to load. For this windows service solution I have two projects. When I build the project it creates the following files: base.dll, service.exe and service.exe.config. Here is how I am trying to install the windows service on a Microsoft Windows Server 2003 R2 Standard x64 Edition SP2 server:
run cmd as administrator and enter:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil "C:\Service\service.exe"
The return I get is:
Exception occurred while initializing the installation: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Service\service.exe' or one of it's dependencies. The system cannot find the file specified.
Here is how I have my solution in Visual Studio 2010:
-Base (a base project that will be shared for different services)
--My Project
--References
--bin
--obj
--app.config
--mainclass1.vb
--anotherclass2.vb
--anotherclass3.vb
-service (the unique code for this service)
--My Project
--References
--ServiceReferences
--Web References
--bin
--obj
--app.config
--main.vb
--anotherclass1.vb
--anotherclass2.vb
--modGlobal.vb
--ProjectInstaller.vb
--Service1.vb
My main questions:
1) Does the 'base' project when compiled to base.dll include it's associated app.config file?
2) Is there a way to determine what the missing file is that it says I am missing?
Some other settings in Visual Studio 2010 solution:
Application > Application type > Windows service
Application > Startup object > Service1
Compile > Advanced Compiler Settings > TargetCPU > AnyCPU
Compile > Advanced Compiler Settings > Target framework > .NET Framework 3.5
Thanks for any help or ideas for me to try.
Last edited by lleemon; Mar 13th, 2013 at 04:46 PM.
Reason: Resolved
-
Mar 13th, 2013, 04:45 PM
#2
Thread Starter
Fanatic Member
Re: windows service could not load file or assembly
Figured it out. I had typed in C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil "C:\Service\serviice.exe" instead of C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil "C:\Service\service.exe"
-
Mar 13th, 2013, 07:02 PM
#3
Re: [RESOLVED] windows service could not load file or assembly
Aye, aye, Cap'n!
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|