Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for "local" NuGet.Config files in analyzer tests #551

Closed
KatoStoelen opened this issue Jun 23, 2020 · 2 comments · Fixed by #639
Closed

Support for "local" NuGet.Config files in analyzer tests #551

KatoStoelen opened this issue Jun 23, 2020 · 2 comments · Fixed by #639
Assignees
Labels
Area-MS.CA.Testing Microsoft.CodeAnalysis.Testing fixed

Comments

@KatoStoelen
Copy link
Contributor

The current implementation

only loads machine and user wide NuGet configuration. In some scenarios you might want to keep the configuration local to the solution, to avoid cluttering the user/machine wide configuration (on build agents etc.).

Would it be possible to find a sensible value for the root parameter to enable configuration file search by traversal? Or would we then run into all sorts of issues with test frameworks running the tests in different working directories?

@sharwell
Copy link
Member

It would not be desirable to use the same NuGet configuration as the analyzer project. It would be good to support other NuGet sources via a test API of some sort though (likely a property of the ReferenceAssemblies type).

@sharwell sharwell added the Area-MS.CA.Testing Microsoft.CodeAnalysis.Testing label Jun 25, 2020
@KatoStoelen
Copy link
Contributor Author

Makes sense. APIs for adding/customizing NuGet sources would be great!

KatoStoelen added a commit to KatoStoelen/roslyn-sdk that referenced this issue Oct 14, 2020
This opt-in feature enables use of a specific nuget.config file in
analyzer tests, instead of machine and user wide settings. When
specifying a path to a nuget.config file, only that file is loaded.

Closes: dotnet#551
@sharwell sharwell added the fixed label Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-MS.CA.Testing Microsoft.CodeAnalysis.Testing fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants