云服务:无法加载文件或程序集 'System.Runtime, Version=4.1.0.0'
Cloud Service: Could not load file or assembly 'System.Runtime, Version=4.1.0.0'
我通过从 Visual Studio 创建一个包并将其导入 Azure 门户,将项目部署到 Azure。
部署成功,但实例保持 'Busy' 状态。
我已通过远程桌面连接到一个实例,但看到以下错误。
除非我弄错了,否则我不应该自己包含 System.Runtime 库。最重要的是,我的 GAC 中的版本是 4.0.0.0。我已经安装了最新版本的 Visual Studio、Azure SDK 等。
该项目本身针对.Net Framework 4.5
我不知道为什么云服务需要 System.Runtime 4.1.0.0...
任何帮助将不胜感激!
Log Name: Windows Azure
Source: Windows Azure Runtime 2.7.0.0
Date: 10/11/2017 10:33:54 AM
Event ID: 2001
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: ***
Description:
An unhandled exception occurred. Type: System.IO.FileNotFoundException Process ID: 3252
Process Name: WaIISHost
Thread ID: 5
AppDomain Unhandled Exception for role ***
Exception: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at ***.***.WebRole.OnStart()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<InitializeRole>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Windows Azure Runtime 2.7.0.0" />
<EventID Qualifiers="49152">2001</EventID>
<Level>2</Level>
<Task>1</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2017-10-11T10:33:54.000000000Z" />
<EventRecordID>726</EventRecordID>
<Channel>Windows Azure</Channel>
<Computer>***</Computer>
<Security />
</System>
<EventData>
<Data>System.IO.FileNotFoundException</Data>
<Data>Process ID: 3252
Process Name: WaIISHost
Thread ID: 5
AppDomain Unhandled Exception for role ***
Exception: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at ***.***.WebRole.OnStart()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<InitializeRole>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
</Data>
</EventData>
</Event>
事实证明,由于某种原因,我的项目中添加了一些核心内容。我将我的项目文件还原为旧版本并重新包含了我所有的代码更改。然后包裹会再次运行在云服务上。
我通过从 Visual Studio 创建一个包并将其导入 Azure 门户,将项目部署到 Azure。 部署成功,但实例保持 'Busy' 状态。
我已通过远程桌面连接到一个实例,但看到以下错误。
除非我弄错了,否则我不应该自己包含 System.Runtime 库。最重要的是,我的 GAC 中的版本是 4.0.0.0。我已经安装了最新版本的 Visual Studio、Azure SDK 等。 该项目本身针对.Net Framework 4.5
我不知道为什么云服务需要 System.Runtime 4.1.0.0... 任何帮助将不胜感激!
Log Name: Windows Azure
Source: Windows Azure Runtime 2.7.0.0
Date: 10/11/2017 10:33:54 AM
Event ID: 2001
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: ***
Description:
An unhandled exception occurred. Type: System.IO.FileNotFoundException Process ID: 3252
Process Name: WaIISHost
Thread ID: 5
AppDomain Unhandled Exception for role ***
Exception: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at ***.***.WebRole.OnStart()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<InitializeRole>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Windows Azure Runtime 2.7.0.0" />
<EventID Qualifiers="49152">2001</EventID>
<Level>2</Level>
<Task>1</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2017-10-11T10:33:54.000000000Z" />
<EventRecordID>726</EventRecordID>
<Channel>Windows Azure</Channel>
<Computer>***</Computer>
<Security />
</System>
<EventData>
<Data>System.IO.FileNotFoundException</Data>
<Data>Process ID: 3252
Process Name: WaIISHost
Thread ID: 5
AppDomain Unhandled Exception for role ***
Exception: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
at ***.***.WebRole.OnStart()
at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<InitializeRole>b__0()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
</Data>
</EventData>
</Event>
事实证明,由于某种原因,我的项目中添加了一些核心内容。我将我的项目文件还原为旧版本并重新包含了我所有的代码更改。然后包裹会再次运行在云服务上。