Closed icelava closed 1 month ago
Current workaround is to manually execute aws codeartifact login
.
Hi @icelava , can you please share the toolkit log from a session where you have this problem? I suspect this is related to the issues we have been seeing in version 1.54.* around extension initialization.
Also, could you please share a list of all other Visual Studio extensions you have installed (if any)?
Like this one? log_2024-07-09_16-21-04_34468.txt
Yes thank you. I'm guessing you are seeing a message along the lines of "Some functionality may not work during this IDE session." in the Toolkit's Output pane (titled "Amazon Web Services"). The CodeArtifact credentials provider is one of the extension's components that Visual Studio is having problems finding. This problem relates to the underlying issues in #441, which we're still looking to understand more about.
Could you please share a list of all other Visual Studio extensions you have installed (if any)?
A couple of things you can try:
Please let us know whether or not you are able to connect to CodeArtifact after running through these steps.
What I have are
I don't see how updating Visual Studio will solve the problem since they don't include the implementation for AWS Toolkit or CodeArtifact credentials helper. And sure enough after updating to 17.10.4 the problem still persists.
We are still trying to understand why Visual Studio is failing to load some components of the AWS Toolkit. At this time, we don't know if this is a problem in Visual Studio, or in the extension. That is why we ask to update Visual Studio.
Something that is worth trying is to have Visual Studio rebuild its cache of MEF components. To do this, you need to close all instances of Visual Studio, remove the cache folder, and then re-launch Visual Studio. Visual Studio will then rebuild its component cache.
The cache folder is located at %localappdata%\Microsoft\VisualStudio\XXX\ComponentModelCache
where "XXX" is specific to your instance, and would start with "17.0". Alternatively, there is an extension called Clear MEF Component Cache which helps do this for you.
Greetings. Having a similar issue with my Visual Studio 2022 copy. Ever since upgrading the latest AWS Toolkit (v1.55.0.0) my CodeArtifact credentials have ceased to work. Keeps prompting me for credentials every time. We are using IAM Roles to authenticate. I tried configuring the tool with the credentials using the "Get Started" wizard, but to no avail. Prompts me every time I load a solution in Visual Studio. I have tried clearing the component cache suggested above. No change. Have reinstalled nuget, reinstalled the credential provider, reconfigured everything from scratch. Rebooted several times. Can't log into CodeArtifact.
Hi, we have released a new version of the Toolkit (1.55.1.0) that intends to minimize the extension's component-loading problems to Amazon Q instead of all of the extension's features. Please install this latest version and share whether or not you are able to access CodeArtifact using the Toolkit.
This fixed it for me. Thank you.
Thanks for letting us know @fendric , glad to hear it.
@icelava I'll wait to hear from you before closing this issue
After installing 1.55.1.0 Visual Studio can launch and check for Nuget package updates without me having to manually log into CodeArtifact. Thanks.
Thanks for confirming!
@awschristou not sure if you want me to open another ticket or not, but this behavior is still manifesting for me with 1.55.1.0 and Visual Studio 2022 17.10.4, after clearing the component cache, and after repairing VS & rebooting.
Hi @baughj , thanks for letting us know that you still have problems. We are now going to consolidate similar issues on an issue representing the core problem.
Can you please have a look at https://github.com/aws/aws-toolkit-visual-studio/issues/452, and if your system is still in a bad state, please follow through the "help us out" section to help us collect more data about the problem.
If you are getting the "Some Toolkit components could not be initialized. Some functionality may not work during this IDE session." message, please comment on that issue going forward. Otherwise, please file a new issue, but try going through the guidance in 452.
Looks like the auto-credentials function is unstable. Some times it works transparently, some times it cannot connect.
error NU1301: Unable to load the service index for source https://domain-accountid.d.codeartifact.ap-southeast-1.amazonaws.com/nuget/repo/v3/index.json.
Describe the bug With the latest version of AWS Toolkit Amazon Q, it looks like Visual Studio is no longer able to automatically obtain credentials for CodeArtifact (with the designated AWS profile). The Windows Credential Manager pop-up will actually appear asking for password for the CodeArtifact user.
Even re-creating the NuGet source for https://domain-accountid.d.codeartifact.ap-southeast-1.amazonaws.com/nuget/repo/v3/index.json does not get Visual Studio to get new credentials for authentication session with CodeArtifact. Deleting the Credential Manager user does not help.
Severity Code Description Project File Line Suppression State Error (active) NU1301 Unable to load the service index for source https://domain-accountid.d.codeartifact.ap-southeast-1.amazonaws.com/nuget/repo/v3/index.json. Project C:\projects\Project.csproj 1
To Reproduce
Expected behavior Visual Studio can seamlessly connect to CodeArtifact as NuGet source and download/update packages. Used to be able to in the past.
Screenshots
Toolkit Logs Where to find?
Development System (please complete the following information):
Additional context