This documentation is archived and is not being maintained.


This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The CreateFromFile method creates an instance of an ApplicationManifest object from a specified application manifest file.



public static ApplicationManifest CreateFromFile(
  String fileName


[Visual Basic .NET]

Public Shared Function CreateFromFile( _
  ByVal fileName As String _
) As ApplicationManifest



Specifies the name of the application manifest XML file, including the full path.

Return Values

This method returns a new ApplicationManifest object.


This static method simply reads the supplied XML file and creates an ApplicationManifest object containing the XML content. To compile the application manifest and its associated MSPL script, the ApplicationManifest.Compile method must be called on the newly created ApplicationManifest object.

The application manifest file is interpreted only as either UTF-8 or Unicode format. If the file is UTF-8, the \uXXXX syntax must be used for special characters in string literals within the file. Otherwise, the file should be saved as Unicode.

Example Code

The following sample demonstrates how to load an application manifest XML source document into the ApplicationManifest object and compile it.

ApplicationManifest myAppManifest = ApplicationManifest.CreateFromFile("C:\\xmldocs\\my_app_manifest_xml_file.xml");

try {


catch (CompilerErrorException cee) {

Console.WriteLine("The following MSPL compiler errors occurred:");
 System.Collections.IEnumerator myEnumerator = cee.ErrorMessages.GetEnumerator();
 while  (myEnumerator.MoveNext())
Console.Write("\t{0}", myEnumerator.Current);



Redistributable: Requires Microsoft Office Communications Server 2007 R2.


Assembly: ServerAgent (in ServerAgent.dll)