Azure
MSBuild 在建構尋找舊版本的 Microsoft.Data.Tools.Schema.Sql 時失敗
在為 2012 年安裝和配置建構伺服器後,我嘗試進行 azure 持續部署。
我安裝了 TFS2012。伺服器上的建構控制器和單個代理。連接到雲 TFS2012。在這種情況下,我也使用 Azure 網站。我在建構伺服器上安裝了 Visual Studio 2012 Professional 和 SQL Server 2012。該項目沒有數據庫,所以我不確定它為什麼要尋找 10.3。我沒有看到那個版本的伺服器,但是我看到了 11.0.2861.0。是否需要更改一些配置才能查看較新版本?我還在建構伺服器上安裝了 SSDT June 2012。編譯成功,它實際上移動了所有文件並創建了一個包。但是我收到此錯誤,導致建構事件失敗。我錯過了什麼?
我收到以下錯誤消息:
Exception Message: The type initializer for 'Microsoft.Web.Deployment.DeploymentManager' threw an exception. (type TypeInitializationException) Exception Stack Trace: Server stack trace: at Microsoft.Web.Deployment.DeploymentProviderSettingCollection..ctor(String factoryName) at Microsoft.Web.Deployment.DeploymentProviderOptions..ctor(String factoryName) at Microsoft.Web.Deployment.DeploymentProviderOptions..ctor(DeploymentWellKnownProvider wellKnownProvider) at Microsoft.TeamFoundation.Deployment.Workflow.Activities.MSDeployWorker.RunCommand(String publishEndpoint, String targetSite, String userName, String password, String packagePath, String setParametersPath, Boolean allowUntrustedCertificates) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Inner Exception Details: Exception Message: The type initializer for 'Microsoft.Web.Deployment.BuiltInTypesCache' threw an exception. (type TypeInitializationException) Exception Stack Trace: at Microsoft.Web.Deployment.DeploymentProviderFactoryCollection.LoadFromRegistry() at Microsoft.Web.Deployment.DeploymentManager.LoadDeploymentManagerSettings() at Microsoft.Web.Deployment.DeploymentManager..cctor() Inner Exception Details: Exception Message: The provider 'Microsoft.Data.Tools.Schema.MsDeploy.MsDeployProviderFactory' could not be loaded. (type DeploymentException) Exception Stack Trace: at Microsoft.Web.Deployment.DeploymentProviderFactory.Create(Type type) at Microsoft.Web.Deployment.BuiltInTypesCache.InspectTypesForWebDeployAttributes(IEnumerable`1 types, String dllName) at Microsoft.Web.Deployment.BuiltInTypesCache..cctor() Inner Exception Details: Exception Message: The type 'Microsoft.Data.Tools.Schema.MsDeploy.MsDeployProviderFactory' could not be loaded. The configuration settings may not be valid. (type DeploymentException) Exception Stack Trace: at Microsoft.Web.Deployment.ReflectionHelper.CreateInstanceT at Microsoft.Web.Deployment.DeploymentProviderFactory.Create(Type type) Inner Exception Details: Exception Message: The type initializer for 'Microsoft.Data.Tools.Schema.MsDeploy.MsDeployProviderBaseProviderFactory' threw an exception. (type TypeInitializationException) Exception Stack Trace: at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType) at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType) at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj) at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at Microsoft.Web.Deployment.ReflectionHelper.CreateInstanceT Inner Exception Details: Exception Message: Could not load file or assembly 'Microsoft.Data.Tools.Schema.Sql, Version=10.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException) Exception Stack Trace: at Microsoft.Data.Tools.Schema.MsDeploy.MsDeployProviderBaseProviderFactory..cctor()
從系統資料庫中刪除了以下鍵並解決了問題。
HKLM\Software\Microsoft\IIS Extensions\msdeploy\3\extensibility HKLM\Software\Wow6432Node\Microsoft\IIS Extensions\msdeploy\3\extensibility