Nuget packages with shaders in contentFiles are included as <Compile/> Instead of <Content/>
See original GitHub issueWhen 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:
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:
- ReproSample.zip
- Unzip, open solution and build.
/cc @rrelyea
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
On twitter you discussed a different problem, didn’t you?
@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