Specifying feed for an SDK
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
Consider a custom SDK package `MySdk` that depends on another SDK package, e.g. `Microsoft.Build.CentralPackageVersions`.
The package `MySdk` contains the following `Sdk/Sdk.props` and `Sdk/Sdk.targets`:
```xml
```
```xml
```
`MySdk` package is published in `MyNuGetFeed` while `Microsoft.Build.CentralPackageVersions` is published in https://www.myget.org/F/msbuildsdks/api/v3/index.json.
I'd like repositories that use `MySdk` to not need to specify https://www.myget.org/F/msbuildsdks/api/v3/index.json in their nuget.config. In fact, I don't want them to have nuget.config at all.
Perhaps I should be able to specify `MyNuGetFeed` in `global.json` file like so:
```json
{
"msbuild-sdks": {
"MySdk": "1.0.0-beta-62601-02"
},
"msbuild-sdk-feeds": [
"MyNuGetFeed"
]
}
```
and `Microsoft.Build.CentralPackageVersions`'s feed in `Import Project` element like so:
```xml
```
Is there already some mechanism how to do it?
Note that in our repos we currently do not use nuget.config to specify feeds. We use `RestoreSources` property instead, e.g.:
```xml
$(RestoreSources);
https://dotnet.myget.org/F/symreader/api/v3/index.json;
https://dotnet.myget.org/F/symreader-native/api/v3/index.json;
https://dotnet.myget.org/F/symreader-portable/api/v3/index.json;
https://dotnet.myget.org/F/metadata-tools/api/v3/index.json;
https://dotnet.myget.org/F/roslyn/api/v3/index.json
```
This has the benefit of being able to centralize basic set of package references as well as all feeds they come from in the SDK.
We can avoid maintaining many copies of these basic package references and feeds across our many repos.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.