Copylot does not work in Visual Studio 22/26. #173955
Replies: 5 comments 1 reply
-
|
same here |
Beta Was this translation helpful? Give feedback.
-
|
I also get this error about static UseApproximateTokenCounter thats not available. I uninstalled/re-installed both Visual Studio community 2022, and 2026 insider. Same problem. I do not get this error in copilot on github nor from Windows Copilot. "There was a problem completing your request. Please try again". I'm now in my third day of trying again. |
Beta Was this translation helpful? Give feedback.
-
|
i uninstalled vs 2022 & 26 & re-installed still same issue.. GHCP in VS code works though |
Beta Was this translation helpful? Give feedback.
-
|
I am seeing a similar issue |
Beta Was this translation helpful? Give feedback.
-
|
Yes, I have the same issue with VS2022 and 2026 -- GHCP seems to be hosed completely. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Copilot Feature Area
Visual Studio
Body
[Conversations Error] Loading GitHub account information...
[Conversations Information] Need to get an auth token.
[HttpClientFactoryProvider Information] Environment variable COPILOT_USE_DEFAULTPROXY found: False
[Conversations Information] Status Code: 200, Reason Phrase: OK
[Conversations Information] Response Content: HasToken: True, ChatEnabled: True, ExpiresAt: 1758208536, RefreshIn: 1500, SKU: free_limited_copilot, CopilotExclusion: False, ChatQuota: '500', CompletionsQuota: '4000', LimitedUserResetDate: '1760745600', CanSignupForLimited: ''
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
Logging to: C:\Users\Mirage Echo\AppData\Local\Temp\VSGitHubCopilotLogs\20250918_144535.575_VSGitHubCopilot.chat.log
[Conversations Information] Copilot chat version 17.14.1204-rc+b61ceb34e2.RR (17.14.1204.46620). VS: VisualStudio.17.Release/17.14.15+36511.14.-september.2025-. Session: cdfe62c8-c353-4f6f-a6ce-dcaee3f53e88.
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[Conversations Information] [Conversations] MCP sources changed
[Conversations Information] [Conversations] Active solution path changed to
[Conversations Information] [Conversations] MCP sources changed
[Conversations Information] [Conversations] Found 0 MCP server(s) defined in "C:\Users\Mirage Echo.mcp.json":
[Conversations Information] [Conversations] Out-of-process service (PID: 11764) finished initializing.
[Conversations Information] [CopilotAgents] Environment variable COPILOT_USE_DEFAULTPROXY found: False
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[Conversations Information] [GetQuota] Environment variable COPILOT_USE_DEFAULTPROXY found: False
[PersistedCopilotSessionRepository Information] Persisted sessions are stored under C:\Users\Mirage Echo\Desktop\GameTurtle.vs\GameTurtle\copilot-chat\45b5f30c\sessions
[Conversations Information] [CopilotClient] Copilot Internal User response: Conversations.Abstractions.Auth.CopilotUserData
[Conversations Information] [CopilotModels] Environment variable COPILOT_USE_DEFAULTPROXY found: False
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[PersistedCopilotSessionRepository Information] Persisted sessions are stored under C:\Users\Mirage Echo\Desktop\GameTurtle.vs\GameTurtle\copilot-chat\45b5f30c\sessions
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[CopilotClientManager Information] LSP: Activated (38200571)
[CopilotClientManager Information] LSP: Debug Server: http://localhost:8180
[CopilotClientManager Information] LSP: Process 8800
[Conversations Information] [ChunkIndex] Index db path: C:\Users\Mirage Echo\Desktop\GameTurtle.vs\GameTurtle\CopilotIndices\17.14.1204.46620\CodeChunks.db
[CopilotClientManager Information] Initial auth status: OK
[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\GameTurtle.csproj: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Food.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\obj\Debug.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Program.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Properties\AssemblyInfo.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[CopilotClientManager Information] CopilotClientManager: model list fetched as of 18.09.2025 17:45:54.
[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Food.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\GameTurtle.csproj: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\obj\Debug.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\obj\Release.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Program.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Properties\AssemblyInfo.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Food.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\GameTurtle.csproj: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\obj\Debug.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\obj\Release.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Program.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[Conversations Warning] [ChunkIndex] Failed to index file C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Properties\AssemblyInfo.cs: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Information] CopilotClientManager: Wrote the following allowed models to registry: "gpt-41-copilot"
[CopilotClientManager Information] CopilotClientManager: Wrote the default model to registry: gpt-41-copilot
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[CopilotClientManager Error] [default] User selected model gpt-4o-copilot is not in the list of generic models: gpt-41-copilot, falling back to default model.
[Conversations Information] [SemanticContextService] Generating semantic context for C:\Users\Mirage Echo\Desktop\GameTurtle\GameTurtle\Food.cs.
[Conversations Information] [SemanticContextService] ContextBuilder instance created. Initial fetched types from document count: 5, Initial fetched context from document count: 0.
[Conversations Information] [SemanticContextService] Generating context with reference hops...
[Conversations Information] [SemanticContextService] Processing reference hop 1...
[Conversations Information] [SemanticContextService] Context with reference hops generated. Total types: 5, Total context: 0.
[Conversations Information] [SemanticContextService] Calculating Jaccard Similarity for definition context and taking top 100 from max of 1000 files
[Conversations Information] [SemanticContextService] Finished getting ordered context.
[CopilotSessionProvider Information] Begin sending message (ConversationId:44faaaae-c981-4fe4-b457-7e7c2fbf3749, CorrelationId:0dca5518-9ee4-4d1f-b72c-c61f4819a7bb, MessageId: 577e240a-03b7-42aa-972e-8fc89875ec40)
[CopilotSessionProvider Information] Request content: "пояему не задаются границы изображения яблока?"
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[Conversations Error] [Conversations] Unhandled exception in AskInConversationAsync: System.InvalidOperationException: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.at Microsoft.VisualStudio.Copilot.Internal.TokenCounter.get_UseApproximateTokenCounterEnabled() in D:\a_work\1\s\src\Copilot\Encoders\TokenCounter.cs:line 69
at Microsoft.VisualStudio.Copilot.CopilotEncoder.FromModelAsync(CopilotModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotEncoder.cs:line 29
at Microsoft.VisualStudio.Copilot.CopilotTextEncoder.FromModelAsync(CopilotLanguageModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotTextEncoder.cs:line 51
at Microsoft.VisualStudio.Copilot.CopilotTextEncoder.FromModelOrDefaultAsync(CopilotLanguageModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotTextEncoder.cs:line 63
at Conversations.Kernel.ChatRequest.CreateAsync(String systemPrompt, String responseInstructions, IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.ChatRequest.CreateAsync(IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.Intents.NoneIntent.ExecuteAsync(IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.ConversationBase.AskAsync(ConversationRequest requestContext, CancellationToken cancellation)
at Conversations.Kernel.ConversationBase.AskAsync(ConversationRequest requestContext, CancellationToken cancellation)
at Microsoft.VisualStudio.Conversations.Service.ServiceTarget.AskInConversationAsync(CopilotSessionId sessionId, CopilotRequest request, ActiveInteractions activeInteractions, IReadOnlyList
1 history, CopilotRequestOptions requestOptions, CancellationToken cancellation) [CopilotSessionProvider Error] Unhandled exception invoking responder GitHub Copilot: StreamJsonRpc.RemoteInvocationException: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flagUseApproximateTokenCounterhas been initialized on ConversationsInitializer. в StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__1561.MoveNext()--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
в Microsoft.VisualStudio.Copilot.ResponderBroker.d__9.MoveNext()
--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
в Microsoft.VisualStudio.Copilot.ResponderBroker.d__9.MoveNext()
--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
в Microsoft.VisualStudio.Copilot.ResponderBroker.d__3.MoveNext()
--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
в System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore
1.GetResult(Int16 token) в Microsoft.VisualStudio.Copilot.Core.Agents.DefaultChatAgent.<GenerateThoughtsAsync>d__15.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() в Microsoft.VisualStudio.Copilot.Core.Agents.DefaultChatAgent.<GenerateThoughtsAsync>d__15.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) в Microsoft.VisualStudio.Copilot.Core.Agents.DefaultChatAgent.<RespondAsync>d__1.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() в System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore1.GetResult(Int16 token)в Microsoft.VisualStudio.Copilot.CopilotDefaultOrchestrator.d__22.MoveNext()
RPC server exception:
System.InvalidOperationException: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.at Microsoft.VisualStudio.Copilot.Internal.TokenCounter.get_UseApproximateTokenCounterEnabled() in D:\a_work\1\s\src\Copilot\Encoders\TokenCounter.cs:line 69
at Microsoft.VisualStudio.Copilot.CopilotEncoder.FromModelAsync(CopilotModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotEncoder.cs:line 29
at Microsoft.VisualStudio.Copilot.CopilotTextEncoder.FromModelAsync(CopilotLanguageModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotTextEncoder.cs:line 51
at Microsoft.VisualStudio.Copilot.CopilotTextEncoder.FromModelOrDefaultAsync(CopilotLanguageModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotTextEncoder.cs:line 63
at Conversations.Kernel.ChatRequest.CreateAsync(String systemPrompt, String responseInstructions, IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.ChatRequest.CreateAsync(IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.Intents.NoneIntent.ExecuteAsync(IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.ConversationBase.AskAsync(ConversationRequest requestContext, CancellationToken cancellation)
at Conversations.Kernel.ConversationBase.AskAsync(ConversationRequest requestContext, CancellationToken cancellation)
at Microsoft.VisualStudio.Conversations.Service.ServiceTarget.AskInConversationAsync(CopilotSessionId sessionId, CopilotRequest request, ActiveInteractions activeInteractions, IReadOnlyList
1 history, CopilotRequestOptions requestOptions, CancellationToken cancellation) at Microsoft.VisualStudio.Conversations.Service.CopilotServiceContainer.AskInConversationAsync(CopilotSessionId sessionId, CopilotRequest request, ActiveInteractions activeResponse, IReadOnlyList1 history, CopilotRequestOptions requestOptions, CancellationToken cancellationToken)[CopilotSessionProvider Information] Begin sending message (ConversationId:44faaaae-c981-4fe4-b457-7e7c2fbf3749, CorrelationId:c1125157-2a4b-49c9-b81b-c863608d4fe3, MessageId: 8bd5bda6-ab06-48e8-90fd-d9bb4fffd337)
[CopilotSessionProvider Information] Request content: "пояему не задаются границы изображения яблока?"
[Conversations Information] Copilot auth status: OK. Copilot badge status: Active
[Conversations Error] [Conversations] Unhandled exception in AskInConversationAsync: System.InvalidOperationException: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.at Microsoft.VisualStudio.Copilot.Internal.TokenCounter.get_UseApproximateTokenCounterEnabled() in D:\a_work\1\s\src\Copilot\Encoders\TokenCounter.cs:line 69
at Microsoft.VisualStudio.Copilot.CopilotEncoder.FromModelAsync(CopilotModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotEncoder.cs:line 29
at Microsoft.VisualStudio.Copilot.CopilotTextEncoder.FromModelAsync(CopilotLanguageModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotTextEncoder.cs:line 51
at Microsoft.VisualStudio.Copilot.CopilotTextEncoder.FromModelOrDefaultAsync(CopilotLanguageModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotTextEncoder.cs:line 63
at Conversations.Kernel.ChatRequest.CreateAsync(String systemPrompt, String responseInstructions, IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.ChatRequest.CreateAsync(IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.Intents.NoneIntent.ExecuteAsync(IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.ConversationBase.AskAsync(ConversationRequest requestContext, CancellationToken cancellation)
at Conversations.Kernel.ConversationBase.AskAsync(ConversationRequest requestContext, CancellationToken cancellation)
at Microsoft.VisualStudio.Conversations.Service.ServiceTarget.AskInConversationAsync(CopilotSessionId sessionId, CopilotRequest request, ActiveInteractions activeInteractions, IReadOnlyList
1 history, CopilotRequestOptions requestOptions, CancellationToken cancellation) [CopilotSessionProvider Error] Unhandled exception invoking responder GitHub Copilot: StreamJsonRpc.RemoteInvocationException: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flagUseApproximateTokenCounterhas been initialized on ConversationsInitializer. в StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__1561.MoveNext()--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
в Microsoft.VisualStudio.Copilot.ResponderBroker.d__9.MoveNext()
--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
в Microsoft.VisualStudio.Copilot.ResponderBroker.d__9.MoveNext()
--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
в Microsoft.VisualStudio.Copilot.ResponderBroker.d__3.MoveNext()
--- Конец трассировка стека из предыдущего расположения, где возникло исключение ---
в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
в System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore
1.GetResult(Int16 token) в Microsoft.VisualStudio.Copilot.Core.Agents.DefaultChatAgent.<GenerateThoughtsAsync>d__15.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() в Microsoft.VisualStudio.Copilot.Core.Agents.DefaultChatAgent.<GenerateThoughtsAsync>d__15.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() в System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) в Microsoft.VisualStudio.Copilot.Core.Agents.DefaultChatAgent.<RespondAsync>d__1.MoveNext() --- Конец трассировка стека из предыдущего расположения, где возникло исключение --- в System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() в System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore1.GetResult(Int16 token)в Microsoft.VisualStudio.Copilot.CopilotDefaultOrchestrator.d__22.MoveNext()
RPC server exception:
System.InvalidOperationException: Trying to access a static method when the static class has not been properly initialized. It is likely you are trying to request this value before a required static flag
UseApproximateTokenCounterhas been initialized on ConversationsInitializer.at Microsoft.VisualStudio.Copilot.Internal.TokenCounter.get_UseApproximateTokenCounterEnabled() in D:\a_work\1\s\src\Copilot\Encoders\TokenCounter.cs:line 69
at Microsoft.VisualStudio.Copilot.CopilotEncoder.FromModelAsync(CopilotModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotEncoder.cs:line 29
at Microsoft.VisualStudio.Copilot.CopilotTextEncoder.FromModelAsync(CopilotLanguageModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotTextEncoder.cs:line 51
at Microsoft.VisualStudio.Copilot.CopilotTextEncoder.FromModelOrDefaultAsync(CopilotLanguageModel model, CancellationToken cancellationToken) in D:\a_work\1\s\src\Copilot\Encoders\CopilotTextEncoder.cs:line 63
at Conversations.Kernel.ChatRequest.CreateAsync(String systemPrompt, String responseInstructions, IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.ChatRequest.CreateAsync(IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.Intents.NoneIntent.ExecuteAsync(IntentExecutionContext context, CancellationToken cancellationToken)
at Conversations.Kernel.ConversationBase.AskAsync(ConversationRequest requestContext, CancellationToken cancellation)
at Conversations.Kernel.ConversationBase.AskAsync(ConversationRequest requestContext, CancellationToken cancellation)
at Microsoft.VisualStudio.Conversations.Service.ServiceTarget.AskInConversationAsync(CopilotSessionId sessionId, CopilotRequest request, ActiveInteractions activeInteractions, IReadOnlyList
1 history, CopilotRequestOptions requestOptions, CancellationToken cancellation) at Microsoft.VisualStudio.Conversations.Service.CopilotServiceContainer.AskInConversationAsync(CopilotSessionId sessionId, CopilotRequest request, ActiveInteractions activeResponse, IReadOnlyList1 history, CopilotRequestOptions requestOptions, CancellationToken cancellationToken)20250918_144535.575_VSGitHubCopilot.chat.log
Beta Was this translation helpful? Give feedback.
All reactions