无法加载 Q# 语言扩展

Cannot load Q# language extension

我从微软网站安装了量子开发工具包:

https://www.microsoft.com/en-us/quantum/development-kit

但是当我尝试打开其中一个项目或创建 Q# 时,我收到消息:

There was an error activating the remote language server, Q# Language Extension. For more details, please run devenv /log and examine ....\ActivityLog.xml file.

我运行它并发现:

ERROR System.SystemException: The trust relationship between the primary domain and the trusted domain failed. at System.Security.Principal.NTAccount.TranslateToSids(IdentityReferenceCollection sourceAccounts, Boolean& someFailed) at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean& someFailed) at System.Security.Principal.NTAccount.Translate(IdentityReferenceCollection sourceAccounts, Type targetType, Boolean forceSuccess) at System.Security.Principal.NTAccount.Translate(Type targetType) at System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified) at System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule) at System.IO.Pipes.PipeSecurity.AddAccessRule(PipeAccessRule rule) at Microsoft.Quantum.QsLanguageExtensionVS.QsLanguageClient.d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.RemoteLanguageClientInstance.d__49.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.Threading.ThreadingTools.d__12.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.LanguageServer.Client.RemoteLanguageServiceBroker.RemoteLanguageClientInstance.d__47.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Q# Language Extension

所以我没有智能感知,*.qs 文件不是 Q# 识别的。

Visual Studio 2017 年 15.9

Windows 10 1809

对此有什么想法吗?

我们发布了 Visual Studio extension (0.3.1811.1501) which we believe should fix the problem. Do you mind updating the extension 的新版本并试一试?