I added the Microsoft.PowerShell.SDK
NuGet package to my project and these folders appeared in it.
Why does it happen?
I added the Microsoft.PowerShell.SDK
NuGet package to my project and these folders appeared in it.
Why does it happen?
NuGet 4.0+ with PackageReference
supports content files. Content files are used to include artifacts like text files, XML files, images or even C# or VB code in a package that are are included with a predefined build action into the consuming project, optionally with a specific copy action.
The Microsoft.PowerShell.SDK
package defines the content folders ref
and runtimes
that contain psd1
, ps1xml
files that are included with build action None
in your project. They are copied to the output directory if newer. Visual Studio shows them with that little blue link arrow so that you know that they are referenced and not created in your own project.
Below you see the internal structure of the package. The path of the files inside of the package is given by /contentFiles/{codeLanguage}/{TargetFrameworkMoniker}
, where any
is like a wildcard.
Note that if you install the Microsoft.PowerShell.SDK
package in an older project type that uses packages.config
you will not see them, because content files are not supported there.