Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

VS 2010 [RESOLVED] windows service could not load file or assembly

$
0
0
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.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>