Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

Manage Configuration-Specific Files

For improved control over your Debug and Release build configurations, you can create configuration-specific files using a configuration modifier between the file name and the file extension (debug and release, respectively). For example, index.debug.html and index.release.html are configuration-specific files.

AppBuilder shows configuration-specific files as file groups in the Project Navigator for the classic Windows desktop client, the universal desktop client and the in-browser client and in the Solution Explorer for the extension for Visual Studio. If the configuration-specific files are named hello-world.debug.js and hello-world.release.js, the file group is named hello-world.js.

When you run a build, AppBuilder takes the file that matches the currently set build configuration, removes the configuration identifier from its name, renames it to *.* and includes it in your application package. For example, when you run a build with the Debug configuration, AppBuilder takes index.debug.html and includes it in your application package as index.html.

Create Configuration-Specific Files

To indicate that a file is configuration-specific, insert the debug or release modifier between the name and the extension of the file.
For example, to create debug- and release-specific versions of index.html, create index.debug.html and index.release.html.

To indicate that a file is platform-specific in addition to being configuration-specific, insert a platform modifier after the configuration modifier. Your file name must be in the following format: name.configuration.platform.extension.
For example, to create an iOS version of your debug-specific index.html, create index.debug.ios.html.

For more information about adding files and folders, see Adding Files and Folders.

Reference Configuration-Specific Files

When you work with configuration-specific files (*.debug.* and *.release.*), in your code, reference these files without the configuration modifier (debug or release).
For example, the correct reference to index.debug.html is index.html.

When you work with files which are both configuration- and platform-specific (*.debug.platform.* and *.release.platform.*), in your code, reference these files without the configuration and the platform modifiers.
For example, the correct reference to index.debug.ios.html is index.html.

File Operations with Configuration-Specific Files

You can perform all file operations that AppBuilder supports on configuration-specific files. You cannot perform file operations on the file groups that nest the configuration-specific files.

This section is applicable to the in-browser client, the classic Windows desktop client and the extension for Visual Studio.

Edit

You can open and edit individual configuration-specific files as any other file in your app. You cannot open file groups for editing.

Save

You can save changes to individual configuration-specific files as any other file in your app. You cannot save changes to entire file groups.

Move by Dragging

You can move individual configuration-specific files only. You cannot move file groups.

If needed, AppBuilder will create a new file group for your moved files.

If you move all files in the file group, AppBuilder removes the file group.

Cut, Copy and Paste

You can cut, copy and paste individual configuration-specific files only. You cannot cut, copy and paste file groups.

If needed, AppBuilder will create a new file group for your moved files.

If you move all files in the file group, AppBuilder removes the file group.

Rename

You can rename individual configuration-specific files only. You cannot rename file groups.

You can rename a configuration-specific file to a configuration-specific or a non-configuration-specific name. The new file name must meet the AppBuilder requirements for file and folder names.

If needed, AppBuilder will create a new file group for your renamed file. If you rename all files in a file group, AppBuilder removes the file group.

Delete

In the in-browser client, you can delete individual configuration-specific files and file groups.

In the classic Windows desktop client and the extension for Visual Studio, you can delete individual configuration-specific files only. You cannot delete file groups.

If you delete all files in the file group, AppBuilder removes the file group.

Version Control

In the in-browser client, you can run version control operations on individual configuration-specific files and file groups.

In the classic Windows desktop client, you can run version control operations on individual configuration-specific files. You cannot run version control operations on file groups.

In the classic Windows desktop client and the in-browser client, version control icons appear next to individual configuration-specific files and do not appear for the file group.

Specifics and Limitations

When you work with configuration-specific files, keep in mind the following specifics and limitations.

Specifics

  • When you run your app on device as an application package, AppBuilder applies the files for the currently set build configuration.
  • When you run your app in the native emulators, AppBuilder applies the files for the currently set build configuration.
  • AppBuilder handles *.debug.json and *.release.json as special configuration-specific files.
    For more information, see Create Environment Settings.
  • When you modify your plugin configuration, AppBuilder stores your settings in hidden configuration-specific app files (.debug.abroject and .release.abproject).
    Always make sure to commit changes in these files.

Limitations

CAUTION: Avoid creating a new *.debug.* or *.release.* if you already have a file that matches the name of its file group. For example, avoid creating script.debug.js if you already have a script.js which is not a file group.
This might corrupt the existing file and you might lose its contents.

  • You cannot work with configuration-specific files in the App_Resources directory in your app.
  • If an existing app contains files that AppBuilder identifies as configuration-specific, you might need to change existing references or rename the files.
  • If a third-party framework contains files that AppBuilder identifies as configuration-specific, you need to reference them with the name of the file group or rename the files.
  • To work with files which are platform- and configuration-specific simultaneously (*.debug.ios.* or *.release.android.*), your file names must use the following format:

    name.configuration.platform.extension
    
    index.debug.ios.html
    index.debug.android.html
    index.release.ios.html
    index.release.android.html
    

See Also

Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.