简体   繁体   English

TFS生成服务生成的包引用了错误版本的msshrtmi(应为1.7,最终引用为1.8)

[英]TFS build service produces a package with a reference to the wrong version of msshrtmi (should be 1.7, ends up referencing 1.8)

I just set up a continuous deployment build (using the azure TFS service aka visualstudio.com) for my project, but it doesn't work right. 我只是为我的项目设置了一个连续的部署构建(使用azure TFS服务aka visualstudio.com),但是它不能正常工作。 The build seems to be fine, and the deployment starts, but my worker role always recycles continuously. 构建似乎很好,并且部署开始了,但是我的工作人员角色总是不断回收。 My manual builds in Visual Studio deployed through the management portal work just fine. 我在通过管理门户部署的Visual Studio中构建的手册工作正常。 When I remoted into one of the worker VMs to see what was going on, I found this in the event log: 当我远程访问其中一个工作器虚拟机以查看发生了什么情况时,我在事件日志中发现了这一点:

An unhandled exception occurred. Type: Autofac.Core.DependencyResolutionException Process ID: 2488
Process Name: WaWorkerHost
Thread ID: 13
AppDomain Unhandled Exception for role MyProject.Worker_IN_1
Exception: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.WindowsAzure.CloudStorageAccount)' on type 'TemplateRepository'.
  at MyProject.Worker.WorkerRole.Run() in c:\a\src\MyProject\Dev\MyProject.Worker\WorkerRole.cs:line 383
  at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.StartRoleInternal()
  at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<startrole>b__1()
  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()

Inner Exception: The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception.
  at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName)
  at MyProject.Worker.Core.Repositories.TemplateRepository..ctor(CloudStorageAccount account) in c:\a\src\MyProject\Dev\MyProject.Worker.Core\Repositories\TemplateRepository.cs:line 24
  at lambda_method(Closure , Object[] )
  at Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate()

Inner Exception: Could not load file or assembly 'msshrtmi, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT:
 0x80131040)
  at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeEnvironment()
  at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment..cctor()

It seems that for some reason, builds performed on the TFS build servers wind up with an incorrect reference to version 1.8 of msshrtmi, rather than 1.7 (which is what all my projects actually reference). 似乎由于某种原因,在TFS生成服务器上执行的生成最终会错误地引用了msshrtmi的1.8版,而不是1.7版(这是我所有项目实际引用的内容)。 I tried adding an explicit reference of msshrtmi, and I also tried the suggestion found here (http://tomkrueger.wordpress.com/2010/07/27/azure-deployment-issue-after-upgrading-to-visual-studio-2010-and-net-4-0/) and neither one seemed to work. 我尝试添加msshrtmi的显式引用,也尝试了此处找到的建议(http://tomkrueger.wordpress.com/2010/07/27/azure-deployment-issue-after-upgrading-to-visual-studio- 2010-and-net-4-0 /),但似乎都无法正常工作。

Any other suggestions? 还有其他建议吗?

update : here's a link to my cross-post on MSDN forums 更新 :这是我在MSDN论坛上的交叉帖子的链接

Could you be referencing 1.8 versions of the Azure assemblies? 您可以引用1.8版的Azure程序集吗?

The 1.8 version of Microsoft.WindowsAzure.ServiceRuntime references version 1.8 of msshrtmi.dll and will fail with this message if the target Azure environment does not have the dll. Microsoft.WindowsAzure.ServiceRuntime的1.8版引用了msshrtmi.dll的1.8版,如果目标Azure环境中没有dll,它将失败并显示此消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM