[英]In a Windows 10 UWP WinJS App, how can I decide which files get included in the build?
I'm building a UWP app with javascript and in a subfolder, I have a node_modules folder and a bunch of files that are there for compilation and debugging, but should not be in the final build. 我正在使用javascript构建UWP应用,并且在子文件夹中,我有一个node_modules文件夹和一堆文件,可用于编译和调试,但不应在最终版本中。
I don't know how to include or exclude folders from the build, but it's important that I am able to keep them visible in the project. 我不知道如何在构建中包括或排除文件夹,但重要的是我必须使它们在项目中可见。
I don't know how to include or exclude folders from the build.
我不知道如何在构建中包括或排除文件夹。
When you build a project that contains several files, you can list each file separately in the project file, or you can use wildcards to include all the files in one directory or a nested set of directories. 构建包含多个文件的项目时,可以在项目文件中单独列出每个文件,也可以使用通配符将所有文件包括在一个目录或一组嵌套目录中。 And you can explicitly exclude that file or directory from the list of inputs.
您可以从输入列表中明确排除该文件或目录。 There may also be a file in a project that you only want to include under certain conditions.
在某些情况下,项目中也可能只包含一个文件。 You can explicitly declare the conditions under which a file is included in a build.
您可以明确声明在构建中包含文件的条件。 For more detail you could refer MSBuild Items official document.
有关更多详细信息,请参阅MSBuild Items官方文档。
I have a node_modules folder and a bunch of files that are there for compilation and debugging, but should not be in the final build.
我有一个node_modules文件夹和一堆文件,可用于编译和调试,但不应在最终版本中。
Please refer the following screenshot, if you have set file Package Action
as Content
the file will be selected to build. 如果您已将文件
Package Action
设置为Content
,请参考以下屏幕截图,将选择要构建的文件。 You could check if the value is correct. 您可以检查该值是否正确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.