dotnet / dotnet/project-system

FUTDC doesn't check packed items when GeneratePackageOnBuild is true

Open
#9,433 6 comments 0 reactions 1 assignee Claimed by @drewnoakes View on GitHub
Feature-Up-to-date Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

### Issue Description

When including content files in a NuGet package built with `true`, if only the content files change, Visual Studio considers the build up to date and doesn't create a new .nupkg, which breaks incremental build.

### Workaround

- Works on `dotnet build`
- Works when setting `true` in the .csproj

### Steps to Reproduce

1. dotnet new classlib
2. Create a file `build/Task.props` (content doesn't matter)
3. Update .csproj file so it looks like this

```diff


net8.0
repro_generatepackageonbuild_futdc
enable
enable
+ true


+
+
+

```

4. Build in Visual Studio
5. Notice that .nupkg is created
6. Edit Task.props so it has different content (actual content doesn't matter)
7. Build in Visual Studio
8. Notice that build is up-to-date and package is not updated

### Expected Behavior

- Content updates trigger a new Pack operation

### Actual Behavior

- Build is considered up-to-date and package is not updated

### dotnet / Visual Studio info
dotnet: 8.0.202
Microsoft Visual Studio Enterprise 2022
Version 17.9.3
VisualStudio.17.Release/17.9.3+34701.34
Microsoft .NET Framework
Version 4.8.09032
Installed Version: Enterprise

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.