question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Contentfiles pollute the root of the project

See original GitHub issue

Visual Studio Version: 2019, seems to happen with all versions I have used so far up to 16.6.1

Summary: Currently contenfiles seem to just get dumped in the root of the project in the solution explorer: 84692048-81974480-af45-11ea-9f32-1565373e3615

This is very confusing behavior as its not clear where these files are coming from. In our usecase we use contentfiles to deliver some resource files such as textures in our sample packages for our game engine. We would prefer to not show all these files. I saw you can solve it partially with hacks like these:

    <None Update="@(None)">
      <Visible>false</Visible>
    </None>

But you still end up with empty folders appearing.

Steps to Reproduce:

  1. Add a nuget package with contenfiles to the solution (for instance our AdamsLair.Duality.Samples.Tilemaps 4.0.0-alpha2 package)

  2. See all the contenfiles appear in the solution explorer

Expected Behavior: Show these files in Dependencies/Packages/Packageid. Alternatively make it possible to hide these files by adding a attribute to the nuspec file and csproj.

Actual Behavior: All contenfiles are visible in the root of the project in the solution explorer

User Impact: Very confusing for users, on top of that these files are editable which they shouldn’t be and this leads to nasty bugs. This was already reported in #2141 though but is still not fixed.

Contentfiles have been around for a while now but the bugs in the tooling don’t seem to get fixed. Whats the holdup? This is not production ready like this. Are there any major blockers to fix this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
davkeancommented, Oct 29, 2020

To follow up, the issue where linked folders continue to show after their items have been marked Visible=false, has been fixed in the latest ~16.8 Preview~.

3reactions
davkeancommented, Oct 29, 2020

Correction; the fix will be in 16.9 Preview 2 when it releases.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuget package contentFiles not copied to .NET Core project
I install this Nuget package in my .NET Core 2.1 project but the image is missing. No trace of the image in the...
Read more >
Distributing Content and Showing a ReadMe file in a .NET ...
Bad package etiquette - polluting projects with extra files ... can hold arbitrary content that's dumped into the project's root folder.
Read more >
nuspec File Reference for NuGet
The .nuspec file contains package metadata used when building a package and to provide information to package consumers.
Read more >
nuget install real text file
I need to have a text file installed in the consuming project that ... file in the app root using target=content/contentFiles by marking...
Read more >
VII. REFERENCES
City of Carson General Plan Environmental Impact Report, Exhibit 4.6-2 (October 22, 2002), based on State of California Seismic Hazard Zone Maps: Inglewood ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found