将我的项目从Azure sdk 1.8.0.0移动到2.0.0.0后出现问题

时间:2013-07-17 13:49:55

标签: c# asp.net-mvc-3 azure

我正在将我的项目从Azure sdk 1.8.0.0移动到2.0.0.0

它在开发环境中工作正常但是当我要在Azure门户上部署它时,它给了我错误。如下所示

An unhandled exception occurred. Type: System.IO.FileNotFoundException Process ID: 3620
Process Name: WaIISHost
Thread ID: 5
AppDomain Unhandled Exception for role Frontend_IN_0
Exception: Could not load file or assembly 'Microsoft.WindowsAzure.ServiceRuntime, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
   at DiagConfig.Config.GetRoleInstanceDiagMonitor()
   at Frontend.WebRole.OnStart()
   at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)
   at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<InitializeRole>b__0()
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

你可以帮忙吗?

1 个答案:

答案 0 :(得分:1)

您可能已将云项目更新到2.0版,但您要部署到Azure的项目仍然具有对旧Azure 1.8的引用

尝试搜索所有1.8个引用,如果您正在使用nuget,则可以通过右键单击解决方案文件并将所有azure引用更新为最新版本来执行“管理nuget包以获得解决方案”。