Home: With the package format PackageReference, contentfiles are not shown in the project tree, and not editable

Created on 1 Apr 2017  路  2Comments  路  Source: NuGet/Home

Details about Problem

With the package format PackageReference, contentfiles are not shown in the project tree, and not editable.

NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
VS UI, Package Manager Console

NuGet version:
4.1.0.2427

VS version:
Microsoft Visual Studio Enterprise 2017 Preview (2) 15.1 (26323.1)

OS version (i.e. win10 v1607 (14393.321)):
win10

Worked before? If so, with which NuGet version:
Worked with package format packages.config (visual studio 2015)

Detailed repro steps so we can see the same problem

  1. Open VS project in "VS2015 - WebApplication4.zip" in Visual Studio 2015, the class ExampleInternals is still editable and shown in the project tree (class ExampleInternals installed from the nuget package ContentFilesExample.vs2015.1.0.5.nupkg ) -Note: package format: packages.config

  2. Open VS project in "VS2017 preview (2) - WebApplication3.zip" in Microsoft Visual Studio Enterprise 2017 Preview (2) 15.1 (26323.1), the class ExampleInternals is not editable and not shown in the project tree (installed from the nuget package ContentFilesExample.1.0.5.nupkg ) -Note: package format: PackageReference

VS2015 - WebApplication4.zip
VS2017 preview (2) - WebApplication3.zip
ContentFilesExample.1.0.5.zip
ContentFilesExample.vs2015.1.0.5.zip

ByDesign

All 2 comments

Seems some folks at NuGet decided contentfiles to be immutable:
https://github.com/NuGet/Home/issues/4803

ContentFiles are immutable, copy them to the project manually if you need to edit the files.

Was this page helpful?
0 / 5 - 0 ratings