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.

Nuget packages with shaders in contentFiles are included as <Compile/> Instead of <Content/>

See original GitHub issue

When I create a nuget package with a /contentFiles/any/netcoreapp3.0/ folder and add pixel and vertex shaders to the package (*.cso) which I want deployed at build time as content, I’m met with the following build error:

image

It appears it tries to include .cso as C# <Compile /> files, despite it is located in the contentFiles nuget package folder. If I add a .cso file directly to my solution, it’s default action is None, so there must be something wrt the nuget contentFiles folder related to this.

Repro step:

  • Place a pixel shader in the /contentFiles/any/netcoreapp3.0/ folder of a nuget package, then try and use the package in a WPF .NET Core app.

Or just juse this repro app:

/cc @rrelyea

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rrelyeacommented, Oct 8, 2019

On twitter you discussed a different problem, didn’t you?

0reactions
dotMortencommented, Oct 8, 2019

@nguerrera Thanks Nick. I was slowly getting to that realization too 😃 I’d just expect it to pick Content as default and not C# Compile. It is after all called contentFiles

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuget packages with shaders in contentFiles are included ...
When I create a nuget package with a /contentFiles/any/netcoreapp3.0/ folder and add pixel and vertex shaders to the package (*.cso) which I ...
Read more >
How to setup a NuGet package to copy content files ...
PROBLEM: once I create a test project and install the NuGet package, I can build it just fine, but the whole Renderer\Templates\ShaderTemplate.
Read more >
NuGet ContentFiles Demystified - The NuGet Blog
ContentFiles are placed in a NuGet package in the /contentFiles folder and their capabilities are defined in the /package/metadata/contentFiles ...
Read more >
Copy NuGet Content Files to Output Directory on Build
It turns out, to no surprise, that including content files in a NuGet package will not result in them being automatically copied to...
Read more >
NuGetizer 0.7.2
Package content inference provides some built-in heuristics for common scenarios so you don't have to customize the project much and can instead ......
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