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



  Copy imageCopy Code
public static ApplicationManifest CreateFromFile(
  String fileName


[Visual Basic .NET]

  Copy imageCopy Code
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.

  Copy imageCopy Code
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 Lync Server 2010


Assembly: ServerAgent (in ServerAgent.dll)

See Also