-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
I have the following nuget config in my project:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="privateFeed" value="https://pkgs.dev.azure.com/myfunnycompany/_packaging/myfunnycompany/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="privateFeed">
<package pattern="privatepackage.*" />
</packageSource>
<packageSource key="nuget">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>
Local with a for expample dotnet restore
it works. If I run it in azure devops I get the following error:
path/project.jscproj : error NU1100: Unable to resolve 'privatepackage.numberone (>= 0.1.1-15)' for 'net8.0'. PackageSourceMapping is enabled, the following source(s) were not considered: , feed-privateFeed, nuget. [/path/solution.sln]
In my nuget config the feed is called privateFeed
but in the error message feed-privateFeed
. That will mean that the source mapping get's invalid.
The issue is produced in the following line:
Line 102 in 142a943
source.feedName = 'feed-' + source.feedName; |
For me their a two ways to fix the issue:
- stop prefixing the feed.
- on the current implementation are some nuget issues linked that are maybe important to solve that
- make a string replace in the whole config that adds everywhere the prefix
- this can be quite complecated because you want only replace sourcekey strings and not other substrings that have maybe the name letters but different meaning
AleksandrKomarov
Metadata
Metadata
Assignees
Labels
No labels