VS 2017 Azure计算模拟器异常System.Runtime.Serialization.SerializationException

时间:2017-05-30 18:17:10

标签: azure visual-studio-2017

我有azure云服务项目,每当我尝试构建或运行时,我都会收到以下错误

`The "DeleteCurrentDeployment" task failed unexpectedly.
System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabricConfig. The data at the root level is invalid. Line 1, position 1. ---> System.Xml.XmlException: The data at the root level is invalid. Line 1, position 1.
   at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
   at System.Xml.XmlUTF8TextReader.Read()
   at System.Xml.XmlBaseReader.IsStartElement()
   at System.Xml.XmlBaseReader.IsStartElement(XmlDictionaryString localName, XmlDictionaryString namespaceUri)
   at System.Runtime.Serialization.XmlReaderDelegator.IsStartElement(XmlDictionaryString localname, XmlDictionaryString ns)
   at System.Runtime.Serialization.XmlObjectSerializer.IsRootElement(XmlReaderDelegator reader, DataContract contract, XmlDictionaryString name, XmlDictionaryString ns)
   at System.Runtime.Serialization.DataContractSerializer.InternalIsStartObject(XmlReaderDelegator reader)
   at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   --- End of inner exception stack trace ---
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader reader)
   at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(Stream stream)
   at Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabricConfig.TryGetConfig(Boolean forceRefresh, DevFabricConfig& result)
   at Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabric.InitDF(Boolean tryRunDFInit)
   at Microsoft.ServiceHosting.Tools.DevelopmentFabric.DevFabric..ctor(Boolean singleInstance)
   at Microsoft.Cct.Debugging.DevFabricService..ctor()
   at Microsoft.Cct.CctProjectNode.<>c.<get_DevFabricService>b__104_0()
   at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Func`1 valueFactory)
   at System.Threading.LazyInitializer.EnsureInitialized[T](T& target, Func`1 valueFactory)
   at Microsoft.Cct.CctProjectNode.get_DevFabricService()
   at Microsoft.Cct.CctBuildDeploymentTaskHost.DeleteCurrentDeployment()
   at Microsoft.CloudExtensions.MSBuildTasks.DeleteCurrentDeployment.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Windows Azure Tools\2.9\Microsoft.WindowsAzure.targets    1218`

我多次卸载VS 2017并再次安装它仍然无法正常工作并出现同样的错误,有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

可以解决问题......经过大量的分析。这是由于损坏的DevFabric.config文件

尝试从天蓝色模拟器工作的机器(来自同一路径)替换C:\ ProgramData \ dftmp \ DevFabric.config