dotnet / dotnet/msbuild

[Directory.Build.props] NuGet package not restored when defining StyleCop in Directory.Build.props

Open
#5,628 0 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

In Visual Studio 2019 Community (Version 16.7.0), I've defined Directory.Build.props as following:

```


$(SolutionDir)StyleCop.ruleset




```

Then I removed the packages folder, and tried to restore NuGet packages (right-click on solution and "Restore NuGet Packages"), the Output printed out "All packages are already installed and there is nothing to restore." But when I checked the solution directory, "packages" folder wasn't restored, and thus the solution couldn't be built.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the restore from the solution using the shown Directory.Build.props, with StyleCop.Analyzers version 1.1.118 and the removed packages folder. Compare the restore output and resulting solution directory, then verify the solution builds successfully after the package is restored.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.