如何添加媒体文件/文件夹到一个winform应用程序.NET应用程序、文件夹、媒体文件、winform

2023-09-08 08:42:51 作者:有什么可以挽回

我想提出一个游戏的示例应用程序。我有一个文件夹,我设置为当前目录从视觉工作室,其中包括PNG格式,OGG,config.json内等。

I am making an example app of a game. I have a folder i set as the current directory from within visual studios which includes pngs,ogg,config.json,etc.

当我发布不包括这些文件。我如何正确添加媒体文件/文件夹到项目?

When i 'publish' these files are not included. How do i properly add a media files/folders into the project?

推荐答案

您右键点击你需要的文件,选择属性,并设置复制到输出目录设置为复制始终如果副本更新

You right click on the files you need, select Properties and set the Copy To Output Directory setting to either Copy Always or Copy if Newer.

这将确保他们发表。