Index: /pjproject/branches/projects/winphone/pjmedia/build/pjmedia_audiodev.vcxproj
===================================================================
--- /pjproject/branches/projects/winphone/pjmedia/build/pjmedia_audiodev.vcxproj	(revision 4649)
+++ /pjproject/branches/projects/winphone/pjmedia/build/pjmedia_audiodev.vcxproj	(revision 4650)
@@ -432,4 +432,5 @@
       <CompileAsWinRT>false</CompileAsWinRT>
       <MinimalRebuild>true</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     </ClCompile>
     <Lib>
Index: /pjproject/branches/projects/winphone/pjsip-apps/src/pjsua/wp/build/pjsua_wp_backend.vcxproj
===================================================================
--- /pjproject/branches/projects/winphone/pjsip-apps/src/pjsua/wp/build/pjsua_wp_backend.vcxproj	(revision 4649)
+++ /pjproject/branches/projects/winphone/pjsip-apps/src/pjsua/wp/build/pjsua_wp_backend.vcxproj	(revision 4650)
@@ -152,5 +152,5 @@
       <AdditionalIncludeDirectories>../../../../../pjsip/include;../../../../../pjlib/include;../../../../../pjlib-util/include;../../../../../pjmedia/include;../../../../../pjnath/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <AdditionalOptions>/D "_WIN32_WINPHONE" /D "PJ_M_ARMV7=1" %(AdditionalOptions)</AdditionalOptions>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
     </ClCompile>
     <Link>
@@ -188,4 +188,5 @@
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Default</CompileAs>
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">CompileAsC</CompileAs>
+      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
     </ClCompile>
     <ClCompile Include="..\..\pjsua_app_cli.c">
@@ -193,4 +194,5 @@
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Default</CompileAs>
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">CompileAsC</CompileAs>
+      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
     </ClCompile>
     <ClCompile Include="..\..\pjsua_app_common.c">
@@ -198,4 +200,5 @@
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Default</CompileAs>
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">CompileAsC</CompileAs>
+      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
     </ClCompile>
     <ClCompile Include="..\..\pjsua_app_config.c">
@@ -203,4 +206,5 @@
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Default</CompileAs>
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">CompileAsC</CompileAs>
+      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
     </ClCompile>
     <ClCompile Include="..\..\pjsua_app_legacy.c">
@@ -208,6 +212,9 @@
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Default</CompileAs>
       <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">CompileAsC</CompileAs>
-    </ClCompile>
-    <ClCompile Include="..\backend\Globals.cpp" />
+      <CompileAsWinRT Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">false</CompileAsWinRT>
+    </ClCompile>
+    <ClCompile Include="..\backend\Globals.cpp">
+      <RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">MultiThreadedDLL</RuntimeLibrary>
+    </ClCompile>
     <ClCompile Include="..\backend\PjsuaCallback.cpp" />
   </ItemGroup>
Index: /pjproject/branches/projects/winphone/pjsip-apps/src/pjsua/wp/pjsua_wp/App.xaml.cs
===================================================================
--- /pjproject/branches/projects/winphone/pjsip-apps/src/pjsua/wp/pjsua_wp/App.xaml.cs	(revision 4649)
+++ /pjproject/branches/projects/winphone/pjsip-apps/src/pjsua/wp/pjsua_wp/App.xaml.cs	(revision 4650)
@@ -24,23 +24,6 @@
     public partial class App : Application
     {
-        /// <summary>
-        /// Provides easy access to the root frame of the Phone Application.
-        /// </summary>
-        /// <returns>The root frame of the Phone Application.</returns>
         public PhoneApplicationFrame RootFrame { get; private set; }
 
-        /// <summary>
-        /// The push channel URI for this application
-        /// </summary>
-        //public Uri PushChannelUri { get; private set; }
-
-        /// <summary>
-        /// An event that is raised when the push channel URI changes
-        /// </summary>
-        //public event EventHandler<Uri> PushChannelUriChanged;
-
-        /// <summary>
-        /// Constructor for the Application object.
-        /// </summary>
         public App()
         {
@@ -53,13 +36,4 @@
             // Phone-specific initialization
             InitializePhoneApplication();
-
-            // Initialize the push channel
-            //InitPushChannel();
-
-            // Initialize the task to listen to incoming call notifications on the push channel
-            //InitHttpNotificationTask();
-
-            // Initalize the task to perform periodic maintenance
-            //InitKeepAliveTask();
 
             // Show graphics profiling information while debugging.
@@ -84,54 +58,22 @@
         }
 
-        // Code to execute when the application is launching (eg, from Start)
-        // This code will not execute when the application is reactivated
         private void Application_Launching(object sender, LaunchingEventArgs e)
         {
             Debug.WriteLine("[App] Launching");
-
-            // Call this method below at the beginning of this handler,
-            // to let the background process that the UI is entering the foreground.
-            //BackgroundProcessController.Instance.ConnectUi();
-
-            // Do something, if required
         }
 
-        // Code to execute when the application is activated (brought to foreground)
-        // This code will not execute when the application is first launched
         private void Application_Activated(object sender, ActivatedEventArgs e)
         {
             Debug.WriteLine("[App] Activated");
-
-            // Call this method below at the beginning of this handler,
-            // to let the background process that the UI is entering the foreground.
-            //BackgroundProcessController.Instance.ConnectUi();
-
-            // Do something, if required
         }
 
-        // Code to execute when the application is deactivated (sent to background)
-        // This code will not execute when the application is closing
         private void Application_Deactivated(object sender, DeactivatedEventArgs e)
         {
             Debug.WriteLine("[App] Deactivated");
-
-            // Do something, if required
-
-            // Call this method below at the end of this handler,
-            // to let the background process that the UI is leaving the foreground.
-            //BackgroundProcessController.Instance.DisconnectUi();
         }
 
-        // Code to execute when the application is closing (eg, user hit Back)
-        // This code will not execute when the application is deactivated
         private void Application_Closing(object sender, ClosingEventArgs e)
         {
             Debug.WriteLine("[App] Closing");
-
-            // Do something, if required
-
-            // Call this method below at the end of this handler,
-            // to let the background process that the UI is leaving the foreground.
-            //BackgroundProcessController.Instance.DisconnectUi();
         }
 
@@ -190,121 +132,4 @@
         }
 
-        // The name of our push channel.
-        //private const string pushChannelName = "PhoneVoIPApp.PushChannel";
-
-        //private void InitPushChannel()
-        //{
-        //    // Try to find the push channel.
-        //    HttpNotificationChannel httpChannel = HttpNotificationChannel.Find(App.pushChannelName);
-
-        //    // If the channel was not found, then create a new connection to the push service.
-        //    if (httpChannel == null)
-        //    {
-        //        // We need to create a new channel.
-        //        httpChannel = new HttpNotificationChannel(App.pushChannelName);
-        //        httpChannel.Open();
-        //    }
-        //    else
-        //    {
-        //        // This is an existing channel.
-        //        this.PushChannelUri = httpChannel.ChannelUri;
-
-        //        Debug.WriteLine("[App] Existing Push channel URI is {0}", this.PushChannelUri);
-
-        //        //  Let listeners know that we have a push channel URI
-        //        if (this.PushChannelUriChanged != null)
-        //        {
-        //            this.PushChannelUriChanged(this, this.PushChannelUri);
-        //        }
-
-        //        // TODO: Let your cloud server know that the push channel to this device is this.PushChannelUri.
-        //    }
-
-        //    // Register for all the events.
-        //    httpChannel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>(PushChannel_ChannelUriUpdated);
-        //    httpChannel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>(PushChannel_ErrorOccurred);
-        //    httpChannel.HttpNotificationReceived += new EventHandler<HttpNotificationEventArgs>(PushChannel_HttpNotificationReceived);
-        //}
-
-        //private void PushChannel_ChannelUriUpdated(object sender, NotificationChannelUriEventArgs e)
-        //{
-        //    Debug.WriteLine("[App] New Push channel URI is {0}", e.ChannelUri);
-
-        //    // Store the push channel URI
-        //    this.PushChannelUri = e.ChannelUri;
-
-        //    //  Let listeners know that we have a push channel URI
-        //    if (this.PushChannelUriChanged != null)
-        //    {
-        //        this.PushChannelUriChanged(this, this.PushChannelUri);
-        //    }
-
-        //    // TODO: Let your cloud server know that the push channel to this device is e.ChannelUri.
-        //}
-
-        //private void PushChannel_ErrorOccurred(object sender, NotificationChannelErrorEventArgs e)
-        //{
-        //    // TODO: Let your cloud server know that the push channel to this device is no longer valid.
-        //}
-
-        //private void PushChannel_HttpNotificationReceived(object sender, HttpNotificationEventArgs e)
-        //{
-        //    // TODO: Process raw push notifications here, if required.
-        //}
-
-        // The name of the incoming call task.
-        //private const string incomingCallTaskName = "PhoneVoIPApp.IncomingCallTask";
-
-        //public void InitHttpNotificationTask()
-        //{
-        //    // Obtain a reference to the existing task, if any.
-        //    VoipHttpIncomingCallTask incomingCallTask = ScheduledActionService.Find(App.incomingCallTaskName) as VoipHttpIncomingCallTask;
-        //    if (incomingCallTask != null)
-        //    {
-        //        if (incomingCallTask.IsScheduled == false)
-        //        {
-        //            // The incoming call task has been unscheduled due to OOM or throwing an unhandled exception twice in a row
-        //            ScheduledActionService.Remove(App.incomingCallTaskName);
-        //        }
-        //        else
-        //        {
-        //            // The incoming call task has been scheduled and is still scheduled so there is nothing more to do
-        //            return;
-        //        }
-        //    }
-
-        //    // Create a new incoming call task.
-        //    incomingCallTask = new VoipHttpIncomingCallTask(App.incomingCallTaskName, App.pushChannelName);
-        //    incomingCallTask.Description = "Incoming call task";
-        //    ScheduledActionService.Add(incomingCallTask);
-        //}
-
-        // The name of the keep-alive task.
-        //private const string keepAliveTaskName = "PjsuaWP.KeepAliveTask";
-
-        //public void InitKeepAliveTask()
-        //{
-        //    // Obtain a reference to the existing task, if any.
-        //    VoipKeepAliveTask keepAliveTask = ScheduledActionService.Find(App.keepAliveTaskName) as VoipKeepAliveTask;
-        //    if (keepAliveTask != null)
-        //    {
-        //        if (keepAliveTask.IsScheduled == false)
-        //        {
-        //            // The keep-alive task has been unscheduled due to OOM or throwing an unhandled exception twice in a row
-        //            ScheduledActionService.Remove(App.keepAliveTaskName);
-        //        }
-        //        else
-        //        {
-        //            // The keep-alive task has been scheduled and is still scheduled so there is nothing more to do
-        //            return;
-        //        }
-        //    }
-
-        //    keepAliveTask = new VoipKeepAliveTask(App.keepAliveTaskName);
-        //    keepAliveTask.Interval = new TimeSpan(12, 0, 0); // Every 12 hours
-        //    keepAliveTask.Description = "keep-alive task";
-        //    ScheduledActionService.Add(keepAliveTask);
-        //}
-
         #endregion
     }
