Copilot Chat in Visual Studio Cannot Access or Edit Open Files #183549
Replies: 2 comments 1 reply
|
My issue was resolved. My company recently changed our login user id (email address) and while the old user account name worked as far as logging into Azure DevOps it was not working for Copilot in VS 2022. I signed out. Logged in again and re-entered my credentials with the new user account name (new email address) and my issue was resolved. It had something to do with how Agent Mode relies heavily on repo-level indexing to understand the project structure. |
|
This may be off topic, but I'm having similar ongoing issues reading open tabs in Copilot Chat in Visual Studio 2026. I created a solution item ai.txt to define the AI rules. It is open as a tab. But when I update it with a new line and save it and the star disappears, after rereading it, Copilot Chat often prints the old lines, even if I ask the chat explicitly to reread it. It can happen many times in a row. But the biggest frustration is that the chat can't read the code base of a simple project. This may have something to do with the fact that if I try to open the current project's .vcxproj file as a tab, Visual Studio itself is forbidden to do so. You can't open the solution file .slnx either. The whole situation makes me very disappointed because this is a paid product and it doesn't work for the most basic use case - code base inclusion. Visual Studio should give itself the right to open project files as tabs. |
Uh oh!
There was an error while loading. Please reload this page.
Select Topic Area
Question
Copilot Feature Area
General
Body
Hello GitHub Copilot Community,
I am experiencing a significant limitation with Copilot Chat in my IDE (Visual Studio 2022):
This started a month or so ago.
Copilot Chat is unable to access or read files that are open in my local project, even when they are open in the editor. This prevents Copilot from reviewing, editing, or providing context-aware assistance for my actual project files, which severely limits its usefulness for real-world development.
Copilot tells me the issue is not related to file or folder permissions in my operating system (Windows 11).
The Real Cause
• The limitation is in the Copilot Chat extension’s integration with Visual Studio.
• It is a known product limitation or bug, not a Windows or file system security issue.
Steps to reproduce:
Open a project in Visual Studio 2022.
Open several source files in the editor.
Ask Copilot Chat to review or edit one of the open files.
Copilot responds that it cannot access the file, even though it is open.
Expected behavior:
Copilot Chat should be able to access, read, and edit files that are open in the IDE, or at least provide a way to explicitly grant access to those files.
Actual behavior:
Copilot Chat repeatedly says it cannot access the file, even when it is open in the IDE.
Impact:
This makes it difficult to use Copilot Chat for real project work, as it cannot interact with my actual codebase unless I copy and paste code into the chat. This makes it challenging with larger projects. I might as well use Gemini in my browser.
Request:
Please share if you are experiencing the same issue and if you resolved it please provide the steps to resolutoin.
Thank you!
All reactions