dotnet / dotnet/msbuild

Allow NuGet MSBuild SDK import in solution metaproj

Open
#5,832 0 comments 0 reactions 0 assignees View on GitHub
Area: Solution (.sln) For consideration Partner request triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

## Background

Since 15.0, NuGet restore has been integrated into MSBuild. The way it works is that NuGet.targets is imported by default, which defined the `Restore` target. There's more to it than that, but that's all that's relevant for this request. This happens not only for projects, but also the solution metaproj, allowing restore to run on the solution, not just on projects individually.

## Use case

NuGet would like the ability to ship experimental features out-of-band and iterate more quickly than waiting for VS/.NET SDK shipping cycles. We can do this today for individual project restores using a MSBuild SDK, that causes NuGet.targets to be loaded from the package instead of from MSBuild's default location. I'm looking for a solution for solution restore.

## Feature request/repro

I'd like to be able to have a `Directory.Solution.props` or `Directory.Solution.targets` with ``, so that a `dotnet restore my.sln` will load the props/targets from my package in the solution metaproj.

## Actual

If I try this today, the `

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.