0

尝试在调试(Visual Studio 2012)中运行我的 WorkerRole 项目时,我收到一个“TargetInvocationException”,这是因为它找不到所需的 cfg 文件。暂时我已授予所有用户对 C:\Users\johsmith\AppData\Local\dftmp 的完全写入权限,但这没有任何区别。

这里的任何人都值得赞赏,因为我现在很困惑。

作为参考,我正在运行 Windows 8、VS2012 和最新的 Azure SDK。

这是堆栈跟踪

 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
   at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.GetDebugListener()
   at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.Initialize(String[] args)
   at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.Initialize(String[] args)
   at Microsoft.WindowsAzure.Hosts.Worker.Loader.CreateConsoleRole(Parameters parameters)
   at Microsoft.WindowsAzure.Hosts.Worker.Loader.Main(String[] args)

内心的讯息是

{"Could not find a part of the path 'C:\\Users\\johsmith\\AppData\\Local\\dftmp\\deployment20(21)\\config\\deployment20(21).EventHandler.WorkerRoleWithSBQueue1_IN_0.1.cfg'."}



 at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver)
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext)
   at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at System.Xml.Linq.XDocument.Load(String uri)
   at Microsoft.ServiceHosting.Tools.DevelopmentFabric.Runtime.DevelopmentFabricTraceListener.TryGetProviderGuid(Guid& ret)
   at Microsoft.ServiceHosting.Tools.DevelopmentFabric.Runtime.DevelopmentFabricTraceListener.Init()
4

1 回答 1

0

我设法通过卸载所有“Azure”相关程序并重新安装最新的 SDK 来使其正常工作。我注意到我安装了一些较旧的 Azure SDK 应用程序,这些应用程序可能搞砸了。

于 2013-06-29T18:46:42.807 回答