System.IO.FileNotFoundException:无法加载文件或程序集“Windows”;或其依赖项之一
我有一个通过BuildMaster在家庭Windows Server上部署的应用程序,最近在部署时会出现错误。大多数错误是当我重新启动服务器时,几分钟后,在再次部署时,错误似乎消失了。服务停止时发生问题。
Stopping service CustomerHost...
An unhandled exception occurred while executing this action: System.IO.FileNotFoundException: Could not load file or assembly 'Windows' or one of its dependencies. The system cannot find the file specified.
File name: 'Windows'
at Inedo.BuildMaster.Extensibility.Agents.LegacyTcp.TcpAgentClient.RunJob(ITcpAgentCommand command, Action`2 log)
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Inedo.TaskExtensions.Result[TResult](Task`1 task)
at Inedo.Agents.RemoteJobExecuter.ExecuteJob(IRemoteJobExecuter jobExecuter, RemoteJob job)
at Inedo.BuildMaster.Extensibility.Actions.RemoteActionBase.ExecuteRemoteCommand(String name, String[] args)
at Inedo.BuildMaster.Extensibility.Actions.ActionBase.ExecuteInternal(IActionExecutionContext context, ExtensionConfigurerBase extensionConfigurer, Boolean resumeNextOnError, Boolean logErrorsAsWarnings)
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable C:\BuildMasterAgent\Agent\bmtcpagent.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: DisplayName = Windows (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Windows | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/BuildMasterAgent/Agent/
LOG: Initial PrivatePath = NULL Calling assembly : InedoLib, Version=521.0.0.0, Culture=neutral, PublicKeyToken=********.
===
LOG: This bind starts in default load context. LOG: Using application configuration file: C:\BuildMasterAgent\Agent\bmtcpagent.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/BuildMasterAgent/Agent/Windows.DLL.
LOG: Attempting download of new URL file:///C:/BuildMasterAgent/Agent/Windows/Windows.DLL.
LOG: Attempting download of new URL file:///C:/BuildMasterAgent/Agent/Windows.EXE.
LOG: Attempting download of new URL file:///C:/BuildMasterAgent/Agent/Windows/Windows.EXE. Action Group 0: All Deployables
Action 0: Custom Variables: (none)
Initializing server 2...
Server ShoppingServer (ID: 2) initialized.
I have an application which I am deploying on my home Windows server through BuildMaster and lately an error occurs while deploying. Mostly the error is when I restart the server and after several minutes the error seems to disappear while deploying again. The problem occurs while services are stopping.
Stopping service CustomerHost...
An unhandled exception occurred while executing this action: System.IO.FileNotFoundException: Could not load file or assembly 'Windows' or one of its dependencies. The system cannot find the file specified.
File name: 'Windows'
at Inedo.BuildMaster.Extensibility.Agents.LegacyTcp.TcpAgentClient.RunJob(ITcpAgentCommand command, Action`2 log)
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Inedo.TaskExtensions.Result[TResult](Task`1 task)
at Inedo.Agents.RemoteJobExecuter.ExecuteJob(IRemoteJobExecuter jobExecuter, RemoteJob job)
at Inedo.BuildMaster.Extensibility.Actions.RemoteActionBase.ExecuteRemoteCommand(String name, String[] args)
at Inedo.BuildMaster.Extensibility.Actions.ActionBase.ExecuteInternal(IActionExecutionContext context, ExtensionConfigurerBase extensionConfigurer, Boolean resumeNextOnError, Boolean logErrorsAsWarnings)
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll Running under executable C:\BuildMasterAgent\Agent\bmtcpagent.exe
--- A detailed error log follows.
=== Pre-bind state information === LOG: DisplayName = Windows (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Windows | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/BuildMasterAgent/Agent/
LOG: Initial PrivatePath = NULL Calling assembly : InedoLib, Version=521.0.0.0, Culture=neutral, PublicKeyToken=********.
===
LOG: This bind starts in default load context. LOG: Using application configuration file: C:\BuildMasterAgent\Agent\bmtcpagent.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/BuildMasterAgent/Agent/Windows.DLL.
LOG: Attempting download of new URL file:///C:/BuildMasterAgent/Agent/Windows/Windows.DLL.
LOG: Attempting download of new URL file:///C:/BuildMasterAgent/Agent/Windows.EXE.
LOG: Attempting download of new URL file:///C:/BuildMasterAgent/Agent/Windows/Windows.EXE. Action Group 0: All Deployables
Action 0: Custom Variables: (none)
Initializing server 2...
Server ShoppingServer (ID: 2) initialized.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试在 web.config 文件中添加 dependentAssembly。
Try adding dependentAssembly in web.config file.