Skip to content

Deps file and runtimeconfig are not regenerated upon assets cache invalidation. #10385

@peterhuene

Description

@peterhuene

Steps to reproduce

On Windows with an x64 SDK installed:

  1. dotnet new console
  2. dotnet build -r win-x64
  3. Run bin\Debug\netcoreapp3.0\win-x64\foo.exe (expected: it prints "hello world").
  4. dotnet build -r win-x86 /p:SelfContained=false --no-restore
  5. Run bin\Debug\netcoreapp3.0\win-x64\foo.exe

Expected behavior

The application should run as a framework-dependent application.

Actual behavior

The application fails to start because hostpolicy.dll can't be found.

This is because both the deps.json file and the runtimeconfig.json file remain unchanged from the first build, which was self-contained. The second build incrementally cleans the self-contained dependencies, so the application attempts to activate as self-contained when it really should be framework-dependent.

Making the tasks responsible for generating these files take the assets cache file as input should cause regeneration when properties that affect the nuget cache (such as SelfContained) change.

Environment data

.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview8-013052
 Commit:    9d282328f2

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions