R
R
Roman Koff2021-02-19 12:54:23
visual studio
Roman Koff, 2021-02-19 12:54:23

How to add static files to .Net Core via NuGet?

Previously, for .Net Framework projects, when creating a NuGet package, I used the 'content' folder to place static files. When connecting the resulting package to the project, the static files contained in it were copied (in my case, t4 templates).

In .Net Core (.Net 5.0), when connecting NuGet packages, static files from the package are not copied anywhere (neither added to the project nor copied to the file system. Just ignore and that's it). I can't understand what is the reason. Is this a bug or a feature?

How do I package Core projects so they can host static files?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d-stream, 2021-02-19
@Zarinov

What exactly is the problem?
The normal option is to add packages to the references, then msbuild / dotnet will add the necessary to the output dir).
Creating packages - well, starting from the "make nuget" checkbox and up to creating a package using .nuspec

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question