最近做的一个windows service的程序,在开发用的电脑上测试一切正常,能够正常地安装为服务。但在另一台电脑上安装时,却出现了以下的错误Microsoft (R) .NET Framework Installation utility Version 2.0.50727.1433
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 E:\YingSi\YingSi.exe assembly's progress.
The file is located at E:\YingSi\YingSi.InstallLog.
Installing assembly 'E:\YingSi\YingSi.exe'.
Affected parameters are:
   logtoconsole = 
   assemblypath = E:\YingSi\YingSi.exe
   logfile = E:\YingSi\YingSi.InstallLog
An exception occurred while trying to find the installers in the E:\YingSi\YingSi.exe assembly.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Aborting installation for E:\YingSi\YingSi.exe.An exception occurred during the Install phase.
System.InvalidOperationException: Unable to get installer types in the E:\YingSi\YingSi.exe assembly.
The inner exception System.Reflection.ReflectionTypeLoadException was thrown with the following error message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..The Rollback phase of the installation is beginning.
See the contents of the log file for the E:\YingSi\YingSi.exe assembly's progress.
The file is located at E:\YingSi\YingSi.InstallLog.
Rolling back assembly 'E:\YingSi\YingSi.exe'.
Affected parameters are:
   logtoconsole = 
   assemblypath = E:\YingSi\YingSi.exe
   logfile = E:\YingSi\YingSi.InstallLog
An exception occurred while trying to find the installers in the E:\YingSi\YingSi.exe assembly.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Aborting installation for E:\YingSi\YingSi.exe.
An exception occurred during the Rollback phase of the System.Configuration.Install.AssemblyInstaller installer.
System.InvalidOperationException: Unable to get installer types in the E:\YingSi\YingSi.exe assembly.
The inner exception System.Reflection.ReflectionTypeLoadException was thrown with the following error message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.The Rollback phase completed successfully.The transacted install has completed.
The installation failed, and the rollback has been performed.
An exception occurred while trying to find the installers in the E:\YingSi\YingSi.exe assembly.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
这个程序里引用了ADO 2.8,一个vb6做的activex dll,以及一个web service服务引用。为了测试
我又另外做了一个简单的windows services,同样添加ADO2.8 vb6做的dll,在那台电脑上安装时,却又可以正常安装。
真是莫名其妙啊~~
有没有遇到类似问题的同仁?望指点一二。

解决方案 »

  1.   

    刚刚又在那个简单的windows service中添加了web service服务引用,结果再到另一台电脑上安装,就安装不了了。出现同样的错误。
    难道在windows Service中不能有服务引用web Service么????!!!
    求大侠现身啊~
      

  2.   

    http://blog.csdn.net/march1111/article/details/1151648看看这个是否可以解决呢!
      

  3.   

    谢谢你的关注。
    在开发用的电脑上就是这样做的,也添加了安装程序。
    在未添加webService时,在另一台电脑上可以用installutil.exe安装,但添加了服务引用webservice后,就出错了。
      

  4.   


    我错了。
    以前安装都是直接把bin下的文件拷到另一台电脑上,然后再手动地用installutil.exe安装。
    刚才试了下用“安装项目”所产生的setup.exe来安装,就成功了?
    但这是为什么呢?两者有什么不同?
      

  5.   

    刚才试了下用“安装项目”所产生的setup.exe来安装,就成功了?
    setup.exe包含判断条件,安装需要的其他信息,依赖环境等其他的东西的
      

  6.   

    在运行setup.exe的时候,出现安装.net 3.5的提示。
    而之前没有加入webService时,手动都可以安装成功。
    是不是可以理解为:web Service需要.net 3.5的支持才行?
      

  7.   

    是不是可以理解为:web Service需要.net 3.5的支持才行?web Service .net2.0也可以开发,不过估计你的web Service应该是.net 3.5开发的