Using environment variable in nuget feed

In our organization we are using a nuget-proxy within our organization. Downloading directly from nuget.org is not possible. Also we have outsourcing partner which we collaborate with. They also have a nuget-proxy within their organization. In order for us to work together we have used an environment variable for the domain part in the nuget URL in the nuget.config file like this:

<add key="nuget-proxy" value="https://artifacts.%DOMAIN%/..." />

On our developer machine we set the DOMAIN environment variable by using our internal domain. The issue is that Rider don't accept this which makes it difficult to manage the nuget packages from within Rider. How can I make sure that Rider resolves such environment variables and makes it possible to collaborate with people not using Rider?

0
2 comments

Hello Trond Andersen,

Would you mind elaborating on what exactly happens when you attempt to set up the NuGet proxy? Rider should be able to use the environment variables in NuGet feeds. I've tried to reproduce your issue in testing environment and did not encounter any issues.

It would be great if you could describe/attach a screenshot of the error message.

0

I got an error in the "Sources" tab in the nuget tool window and in the listing to the right of all sources I got an red square around the nuget-feed which used the environment variable. Tried again today after upgrading to 2022.1 and now this works. Tried also to change to %FOOBAR% to check if I could reproduce, but I am no longer able to get this error indication in the Nuget sources tab.

0

Please sign in to leave a comment.