File Properties, JavaScript
You can use file properties to indicate what actions the project system should perform on the files. For example, you can set file properties to indicate whether a file should be added to the package as a resource file.
You can select any file in Solution Explorer and then examine its properties in the Properties window. JavaScript files have four properties: Copy to Output Directory, Package Action, File Name, and File Path.
This section describes properties common to JavaScript files.
This property specifies the conditions under which the selected source file will be copied to the output directory. Select Do not copy if the file is never to be copied to the output directory. Select Copy always if the file is always to be copied to the output directory. Select Copy if newer if the file is to be copied only when it is newer than an existing file of the same name in the output directory.
The Package Action property indicates what Visual Studio does with a file when a build is executed. Package Action can have one of several values:
-
None - The file is not included in the package manifest. An example is a text file that contains documentation, such as a Readme file.
-
Content - The file is included in the package manifest. For example, this setting is the default value for an .htm, .js, .css, image, audio, or video file.
-
Manifest – The file is not included in the package manifest. Instead, the file is used for input when generating the package manifest. This is the default value for the package.appxmanifest file.
-
Resource - The file is not included in the package manifest. Instead, the contents of the file are indexed in the Package Resource Index (PRI) that goes into the package manifest. It is typically used for resource files.
The default value for Package Action depends on the extension of the file that you add to the solution.
This section describes properties common to files referenced from a Windows Store app built for Windows using JavaScript. When you select a reference such as a .winmd file, an SDK reference, a project-to-project reference, or an assembly reference in Solution Explorer, other properties may display in the Properties window, according to the file type.