<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Peter Torr's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ptorr/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ptorr/feed.xml</link>
    <description>Posts about Windows [Phone] application development. And other stuff.</description>
    <lastBuildDate>Tue, 24 Nov 2015 08:19:35 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Async &amp; exceptions in C#</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/async-exceptions-in-c</link>
      <pubDate>Wed, 10 Dec 2014 01:43:00 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2014/12/10/async-exceptions-in-c/</guid>
      <description><![CDATA[This quick post is motivated by a question on StackOverflow. Basically it is a simple console...]]></description>
      <content:encoded><![CDATA[<p>This quick post is motivated by <a href="https://stackoverflow.com/questions/27330014/system-net-webexception-not-intercepted-on-windows-phone-8/27374776#comment43238599_27374776">a question on StackOverflow</a>. Basically it is a simple console program you can run to see how exceptions are handled in C# <strong>async</strong> methods. Common wisdom is "don't have <strong>async void</strong> methods; always return a <strong>Task</strong>" but that simple signature change is neither necessary nor sufficient to handle exceptions correctly.</p>
<p>Basically, in order to be safe you need to do one of two things:</p>
<ol>
<li>Handle exceptions within the <strong>async</strong> method itself; or</li>
<li>Return a <strong>Task&lt;T&gt;</strong> and ensure that the caller attempts to get the result whilst also handling exceptions (possibly in a parent stack frame)</li>
</ol>
<p>Failure to do either of these things will result in unwanted behaviour. Here is a simple sample to run&nbsp;- just uncomment out the method calls one at a time to see what happens.</p>
<p>----- code start -----</p>
<pre>  using System;
  using System.Runtime.CompilerServices;
  using System.Threading;
  using System.Threading.Tasks;

  namespace AsyncAndExceptions
  {

    class Program
    {
      static void Main(string[] args)
      {
        AppDomain.CurrentDomain.UnhandledException += (s, e) =&gt; Log("*** Crash! ***", "UnhandledException");
        TaskScheduler.UnobservedTaskException += (s, e) =&gt; Log("*** Crash! ***", "UnobservedTaskException");

        RunTests();

        // Let async tasks complete...
        Thread.Sleep(500);
        GC.Collect(3, GCCollectionMode.Forced, true);
      }

      private static async Task RunTests()
      {
        try
        {
          // crash
          // _1_VoidNoWait();

          // crash 
          // _2_AsyncVoidAwait();

          // OK
          // _3_AsyncVoidAwaitWithTry();

          // crash - no await
          // _4_TaskNoWait();

          // crash - no await
          // _5_TaskAwait();

          // OK
          // await _4_TaskNoWait();

          // OK
          // await _5_TaskAwait();
        }
        catch (Exception ex) { Log("Exception handled OK"); }

        // crash - no try
        // await _4_TaskNoWait();

        // crash - no try
        // await _5_TaskAwait();
      }

      // Unsafe
      static void _1_VoidNoWait()
      {
        ThrowAsync();
      }

      // Unsafe
      static async void _2_AsyncVoidAwait()
      {
        await ThrowAsync();
      }

      // Safe
      static async void _3_AsyncVoidAwaitWithTry()
      {
        try { await ThrowAsync(); }
        catch (Exception ex) { Log("Exception handled OK"); }
      }

      // Safe only if caller uses await (or Result) inside a try
      static Task _4_TaskNoWait()
      {
        return ThrowAsync();
      }

      // Safe only if caller uses await (or Result) inside a try
      static async Task _5_TaskAwait()
      {
        await ThrowAsync();
      }

      // Helper that sets an exception asnychronously
      static Task ThrowAsync()
      {
        TaskCompletionSource tcs = new TaskCompletionSource();
        ThreadPool.QueueUserWorkItem(_ =&gt; tcs.SetException(new Exception("ThrowAsync")));
        return tcs.Task;
      }
      internal static void Log(string message, [CallerMemberName] string caller = "")
      {
        Console.WriteLine("{0}: {1}", caller, message);
      }
    }
  }

</pre>
<p>----- code end -----&nbsp;</p>
<p>From this we can see that the common advice isn't actually true:</p>
<ul>
<li>It's perfectly fine to have an <strong>async void</strong> method (such as an event handler) so long as you look after exceptions within that method</li>
<li>Simply changing the signature doesn't prevent unhandled exceptions</li>
</ul>
<p>The basic reason for this is that if you don't attempt to get the result of a <strong>Task</strong> (either by using <strong>await</strong> or by getting the <strong>Result</strong> directly) then it just sits there, holding on to the exception object, waiting to get GCed. During GC, it notices that nobody ever checked the result (and therefore never saw the exception) and so bubbles it up as an unobserved exception. As soon as someone asks for the result, the <strong>Task</strong> throws the exception instead which must then be caught by someone.</p>]]></content:encoded>
    </item>
    <item>
      <title>New "Missing Platform APIs" UserVoice site for Windows Store development</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/new-missing-platform-apis-uservoice-site-for-windows-store-development</link>
      <pubDate>Sun, 25 May 2014 09:16:21 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2014/05/25/new-missing-platform-apis-uservoice-site-for-windows-store-development/</guid>
      <description><![CDATA[Hopefully you are familiar with the existing WPDev UserVoice site, where you can provide suggestions...]]></description>
      <content:encoded><![CDATA[<p>Hopefully you are familiar with the existing <a href="https://wpdev.uservoice.com/forums/110705-dev-platform">WPDev UserVoice</a> site, where you can provide suggestions (or vote on others' suggestions) for developer features to add to Windows. Note that "WP" now stands for "Windows Platform" instead of "Windows Phone," and it is intended to encompass all flavours of Windows. <p>We've just added an additional sub-site for <a href="https://wpdev.uservoice.com/forums/253374-missing-platform-apis">Missing Platform APIs</a>, where you can provide feedback on APIs that are available for traditional Desktop Windows apps, but not available in <a href="https://msdn.microsoft.com/en-us/library/windows/apps/br205757.aspx">the Store Profile</a>. This includes both Win32 / COM and .NET APIs that you'd like to use for compatibility with your existing code, or with 3rd-party libraries that you'd like to use but can't (because they have dependencies on missing APIs).</p><p>If there are specific APIs from other operating systems that you would like to see a Windows equivalent of, you can also suggest (or vote on) those.</p><p>Remember that, as always, providing an explanation of <em>why </em>you want the API is critically important as we assess what changes to make to the Store Profile over time. There are many cases where the full power of an API is fundamentally incompatible with the Store model, but a restricted use-case (or one that introduces a new capability) might be compelling.</p><p>Also, in case you didn't know there is also a UserVoice site for <a href="https://windowsphone.uservoice.com/forums/101801-feature-suggestions">general Windows Phone consumer features</a>.</p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Updated LayoutRules Code</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/updated-layoutrules-code</link>
      <pubDate>Sun, 06 Apr 2014 21:17:45 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2014/04/06/updated-layoutrules-code/</guid>
      <description><![CDATA[I updated the LayoutRules sample attached to the //build/ post I made the other day. This version is...]]></description>
      <content:encoded><![CDATA[<p><font size="2" face="Segoe UI">I updated the </font><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/51/38/66/LayoutRulesTestApp.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-51-38-66/LayoutRulesTestApp.zip"><font size="2" face="Segoe UI">LayoutRules sample</font></a><font size="2" face="Segoe UI"> attached to the </font><a href="https://blogs.msdn.com/b/ptorr/archive/2014/04/03/build-talk-quot-from-4-to-40-inches-quot.aspx"><font size="2" face="Segoe UI">//build/ post</font></a><font size="2" face="Segoe UI"> I made the other day. This version is much more comprehensive and easier to use. The sample usage is slightly more realistic, as well.</font></p>  <p><font size="2" face="Segoe UI">At its core, the sample exposes a <strong>LayoutableUserControl </strong>and a <strong>LayoutablePage </strong>that let you specify a set of layout rules that are evaluated every time the control is re-measured. Each rule implements the <strong>ILayoutRule</strong> interface that exposes a mechanism to check if the rule applies given the control's current size (<strong>ILayoutEvaluator.Evaluate</strong>) and a mechanism to invoke the functionality of the rule (<strong>ICommand.Execute</strong>).</font></p>  <p><font size="2" face="Segoe UI">From there some primitive layout evaluators (like <strong>WidthLayoutEvaluator - </strong>checks if the current control's width is smaller than a given width or not), some primitive commands (like <strong>GoToVisualStateCommand - </strong>goes to a named visual state), some compound evaluators / commands, and some more complex base types are defined.</font></p>  <p><font size="2" face="Segoe UI">The end result is a set of high-level rules that can be used for many basic operations. For example, one of the rules used in the sample is the following <strong>WidthUpdatePropertyRule</strong>:</font></p>  <blockquote>   <p><font size="3" face="Consolas"><font color="#c0504d"><font color="#0000ff">&lt;</font>layout<font color="#0000ff">:</font>WidthUpdatePropertyRule</font><font color="#0000ff">          <br />&#160; <font color="#ff0000">DisplayName</font>=&quot;Make buttons smaller&quot;           <br />&#160; <font color="#ff0000">Width</font>=&quot;550&quot;           <br />&#160; <font color="#ff0000">ComparisonType</font>=&quot;LessThan&quot;           <br />&#160; <font color="#ff0000">Name</font>=&quot;ExplorerViewProperties&quot;           <br />&#160; <font color="#ff0000">Property</font>=&quot;ButtonSize&quot;           <br />&#160; <font color="#ff0000">Value</font>=&quot;50,50&quot;           <br />&#160; <font color="#ff0000">ValueIfFalse</font>=&quot;80,80&quot;           <br />&#160; <font color="#ff0000">ValueConverter</font>=&quot;{<font color="#c0504d">StaticResource</font> SizeConverter}&quot; /&gt;</font></font></p> </blockquote>  <p><font size="2" face="Segoe UI">As the <strong>DisplayName </strong>property indicates, this is used to update the <strong>ButtonSize</strong> property of the <strong>ExplorerViewProperties</strong> named resource to <strong>50x50 </strong>if the <strong>Width </strong>of the control is less than <strong>550px</strong>, or to <strong>80x80</strong> if not. Parts of the UI are data-bound to this object, and so they will update dynamically.</font></p>  <p><font size="2" face="Segoe UI">Another example:</font></p>  <blockquote>   <p><font color="#0000ff" size="3" face="Consolas">&lt;<font color="#c0504d">layout</font>:<font color="#c0504d">HeightGoToVisualStateRule</font>         <br />&#160; <font color="#ff0000">DisplayName</font>=&quot;Make text smaller&quot;         <br />&#160; <font color="#ff0000">Height</font>=&quot;300&quot;         <br />&#160; <font color="#ff0000">ComparisonType</font>=&quot;GreaterThanOrEqualTo&quot;         <br />&#160; <font color="#ff0000">VisualStateName</font>=&quot;LargeText&quot;         <br />&#160; <font color="#ff0000">VisualStateNameIfFalse</font>=&quot;SmallText&quot;/&gt;        <br /></font></p> </blockquote>  <p><font size="2" face="Segoe UI">This rule switches to the visual state <strong>LargeText</strong> if the <strong>Height </strong>is at least <strong>300px</strong>, otherwise it switches to the <strong>SmallText</strong> visual state.</font></p>  <p><font size="2" face="Segoe UI">Of course, all pixel values are in effective pixels (aka view pixels). We don't care what the actual physical resolution of the display is. You can also use some of the building-blocks to make more complex rules (at the expense of more XAML).</font></p>  <p><font size="2" face="Segoe UI">You might ask yourself why something like this doesn't come standard as part of the platform or the SDK. When we were working on Windows Phone 8.1, we had many discussions about this very topic, but ultimately we didn't ship any layout-helper controls like those in this sample for two basic reasons:</font></p>  <ol>   <li><font size="2" face="Segoe UI">There is no tooling experience (Visual Studio or Blend design surface) for these layout rules; you need to reason about them without being able to see the results (or, more likely, take a starting guess and then use trial-and-error to perfect it). There <em>is</em> a tooling experience for Visual States, but not for automatically switching between them while designing the control</font></li>    <li><font size="2" face="Segoe UI">We weren't able to settle on what the right long-term approach should be for adaptive layout. This is just one approach of many possible approaches, and whilst it is convenient for some scenarios we don't (yet) know what the best solution will look like in the future</font></li> </ol>  <p><font size="2" face="Segoe UI">Anyway, until such time as we solve the problem in some hypothetical future release, you can use this code (or hack it any way you see fit) in order to get your own apps up and running. If you have comments, suggestions, etc. feel free to post them below! </font></p>  <p><font size="2" face="Segoe UI">(P.S. I apologize for the lack of comments in the code. Hopefully when I do a full blog post for the //build talk I will have the code properly commented... and maybe even tested!)</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Optimum Emulator Sizes for Windows Phone 8.1</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/optimum-emulator-sizes-for-windows-phone-8-1</link>
      <pubDate>Thu, 03 Apr 2014 22:19:00 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2014/04/03/optimum-emulator-sizes-for-windows-phone-8-1/</guid>
      <description><![CDATA[[4/4 changed typo: 1080p -&gt; 720p]As I mentioned in my //Build talk, the emulator is not a good...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #99ccff; font-family: Segoe UI; font-size: small;">[4/4 changed typo: 1080p -&gt; 720p]</span><p><span style="font-family: Segoe UI; font-size: small;">As I mentioned in <a href="https://channel9.msdn.com/Events/Build/2014/3-541" target="_blank">my //Build talk</a>, the emulator is not a good place to perform visual verification of assets because the display characteristics of your monitor are highly unlikely to match those of any physical devices. But it is an excellent tool for verifying the layout of your apps, and for comparing how the layout changes on the different-sized devices.</span></p><p><span style="font-family: Segoe UI; font-size: small;">If you want the emulators to appear on your monitor in the same relative sizes as they would appear in real life, you should follow this set of zoom factors:</span></p><ul>
<li><span style="font-family: Segoe UI; font-size: small;">Figure out maximum zoom for the 6" 1080p emulator that fits on your screen</span></li>
<li><span style="font-family: Segoe UI; font-size: small;">For the 5.5" 1080p emulator, multiple it by 0.92</span></li>
<li><span style="font-family: Segoe UI; font-size: small;">For the 4.7" 720p emulator, multiply it by 1.18</span></li>
<li><span style="font-family: Segoe UI; font-size: small;">For the 4.5" WXGA emulator, multiply it by 1.11 (it is mislabeled as 4" in the RC SDK)</span></li>
<li><span style="font-family: Segoe UI; font-size: small;">For the 4" WVGA emulator, multiply it by 1.57</span></li>
</ul><p><span style="font-family: Segoe UI; font-size: small;">So for example if you have a 1080p desktop monitor, these are the values you should use:</span></p><ul>
<li><span style="font-family: Segoe UI; font-size: small;">6" 1080p: 45%</span></li>
<li><span style="font-family: Segoe UI; font-size: small;">5.5" 1080p: 41%</span></li>
<li><span style="font-family: Segoe UI; font-size: small;">4.7" 720p: 50%</span></li>
<li><span style="font-family: Segoe UI; font-size: small;">4.5" WXGA: 53%</span></li>
<li><span style="font-family: Segoe UI; font-size: small;">4" WVGA: 71%</span></li>
</ul><p><span style="font-family: Segoe UI; font-size: small;">Those values will give you emulators that show content at the correct proportional size relative to each other. You might wonder why the numbers are so strange - for example, wouldn't the 4" phone just be 2/3rds the size of the 6" phone? - and the reason is that in addition to being different sizes, these devices all have different pixel densities. But your monitor has a fixed density and so we need to take that into account when calculating the sizes. Also there is a small adjustment for the 15:9 vs 16:9 aspect ratios.</span></p><p><span style="font-family: Segoe UI; font-size: small;">You can verify that you have the right ratios setup by running the sample app from <a href="https://aka.ms/wpsllarge">https://aka.ms/wpsllarge</a> and going to the "size-aware page" and looking at the bottom image of the US 1 cent coin ("penny"). The bottom image will be the same physical size on all your emulators (but probably not the same size as a real penny... that only works if you run it on an actual device :-) ).</span></p></p>
]]></content:encoded>
    </item>
    <item>
      <title>//Build talk "From 4 to 40 inches" (with sample LayoutRules code)</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/build-talk-from-4-to-40-inches-with-sample-layoutrules-code</link>
      <pubDate>Thu, 03 Apr 2014 15:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2014/04/03/build-talk-from-4-to-40-inches-with-sample-layoutrules-code/</guid>
      <description><![CDATA[[Update 4/6/2014: I uploaded a newer and better sample; see the end of the post for a link]
Thanks...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #00ccff;">[Update 4/6/2014: I uploaded a newer and better sample; see the end of the post for a link]</span></p>
<p>Thanks to everyone who made it to my talk, which is now <a href="https://channel9.msdn.com/Events/Build/2014/3-541" target="_blank">available online</a> (so if you didn't make it, you can watch it now!). Also, thanks to everyone who has provided feedback so far! If you saw the session and haven't <a href="https://channel9.msdn.com/Events/Build/2014/3-541?eval=True#evaluate" target="_blank">evaluated it</a> yet, please do (and all the other sessions you see, too!). This helps us make these events better in the future.</p>
<p>One person mentioned that the "40 inches" in the title was a bit misleading since I didn't discuss the <a href="https://www.microsoft.com/office/perceptivepixel/default.aspx" target="_blank">Perspective Pixel devices</a> (aka PPI).</p>
<p>Firstly, <strong>THANK YOU </strong>(whoever you are ;-) ) for providing the feedback!</p>
<p>Secondly, it's true that apps explicitly designed for the PPI devices benefit from specialized <em>UX </em>that is tailored to the usage pattern of those devices, and unfortunately I could not cover that in the talk. It's also a statement could apply to all specialized use-cases (any app <em>could </em>benefit from specialized UX on phones, tablets, PCs, etc. although it is not required). But in a general sense, all the concepts in the talk apply. The <a href="https://www.microsoft.com/office/perceptivepixel/products/devices/device-55.aspx" target="_blank">"small" PPI device</a> is 55" diagonally, has a raw density of 40 dpi, and a physical resolution of 1920 x 1080 pixels. It has a scale factor of 1.0 and an effective resolution of 1920 x 1080. That means that for general apps, <span style="text-decoration: underline;">the PPI is no different than a standard 24" 1920 x 1080 monitor</span>. It has the same effective resolution, the same scale factor, and would run apps exactly the same way. This is why the talk really focuses on ignoring the physical aspects of the device (size, DPI, etc.) and focusing on the effective resolution.</p>
<p>But there will always be an opportunity for developers to go further and tailor their apps for specific use-cases. In this example, if you wanted a special UX for the PPI, you could check if the <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.display.displayinformation.rawdpix.aspx" target="_blank">DisplayInformation.RawDpiX</a> property was &lt;= 40, and that the effective resolution (<a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.frameworkelement.actualwidth.aspx" target="_blank">ActualWidth</a> and <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.frameworkelement.actualheight.aspx" target="_blank">ActualHeight</a> in XAML) was &gt;= 1920 x 1080, and if so infer that you were running on a really big display.</p>
<p>Also, I wanted to give you an early look at the <strong>LayoutRules </strong>helper code I wrote for automatically switching between visual states in XAML. Eventually there should be an official post on the Windows Phone Blog, but in the mean time I put together a quick <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/30/21/8203.LayoutRulesTestApp.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-30-21/8203.LayoutRulesTestApp.zip" target="_blank">Universal Project showing how to use it</a> (the original sample, which wasn't as good, can be found <a title="old sample" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/30/21/8371.LayoutRulesTestApp.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-30-21/8371.LayoutRulesTestApp.zip">here</a>). Enjoy!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Components.PostAttachments/00/10/51/38/66/LayoutRulesTestApp.zip" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-51-38-66/LayoutRulesTestApp.zip">LayoutRulesTestApp.zip</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Opening a Windows Phone project after you have upgraded SQLite</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/opening-a-windows-phone-project-after-you-have-upgraded-sqlite</link>
      <pubDate>Wed, 18 Dec 2013 19:49:06 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2013/12/18/opening-a-windows-phone-project-after-you-have-upgraded-sqlite/</guid>
      <description><![CDATA[If you are using the SQLite for Windows Phone package in Visual Studio, and you install one of the...]]></description>
      <content:encoded><![CDATA[<p>If you are using the <a href="https://visualstudiogallery.msdn.microsoft.com/cd120b42-30f4-446e-8287-45387a4f40b7/">SQLite for Windows Phone package</a> in Visual Studio, and you install one of the upgrades (which happen relatively frequently), the next time you open C++ project that references SQLite the project will fail to load with an error similar to this in the <b>Output</b> window:</p>  <blockquote><pre>
D:\Path\ProjectName.vcxproj : error : Unable to read the project file &quot;ProjectName.vcxproj&quot;.

D:\Path\ProjectName.vcxproj(60,5): The imported project &quot;C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\ExtensionSDKs\SQLite.WP80\3.8.0.2\DesignTime\CommonConfiguration\Neutral\SQLite.WP80.props&quot; 
  was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk.</pre>
</blockquote>

<p>Fixing this is pretty easy, but requires manual editing of the project file. Here's what to do:</p>

<ol>
  <li>If the project is under source control, check it out first. You need to do this manually from the <b>Source Control Explorer</b>, since right-clicking on the <b>Solution Explorer</b> won't work</li>

  <li>Open the project file for editing (either from the <b>Source Control Explorer</b> or by right-clicking on the project in <b>Solution Explorer</b> and choosing <b>&quot;Edit ProjectName.vcxproj&quot;</b>)</li>

  <li>Search for &quot;SQLite.WP80&quot; in the source code; you should get 9 hits on 5 different lines (the number may vary depending on how many build configurations you have)</li>

  <li>The first set of hits should all be inside <b style="font-family: courier new, monospace;">&lt;Import&gt;</b> statements. Look for the version number after highlighted search text (eg, &quot;3.8.0.2&quot;) and replace it with the new version (eg, &quot;3.8.2&quot;)</li>

  <li>The last hit will be at the bottom of the file, and is in an <b style="font-family: courier new, monospace;">&lt;SDKReference&gt;</b> element. Again, replace the old version number with the new version number</li>

  <li>Save the project file</li>

  <li>Restart Visual Studio. <b>Important: do not try to re-load the project; it won't work</b>. You must restart Visual Studio</li>

  <li>Reload your project and build; it should work</li>

<li>Check the changes back into source control (if applicable)</li>
</ol>

<p>In theory you could just do a search-and-replace for the old version number with the new version number, but just in case something else in your project has that string, I prefer to do it manually (it's not very difficult).</p>]]></content:encoded>
    </item>
    <item>
      <title>Trying something new: the Windows Phone Developer Blog</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/trying-something-new-the-windows-phone-developer-blog</link>
      <pubDate>Fri, 04 Jan 2013 14:35:26 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2013/01/04/trying-something-new-the-windows-phone-developer-blog/</guid>
      <description><![CDATA[This year, the Windows Phone team is trying out something new for our blogging activity: instead of...]]></description>
      <content:encoded><![CDATA[<p>This year, the Windows Phone team is trying out something new for our blogging activity: instead of having individual team members post content on their personal blogs, we&rsquo;re centralizing the content in the <a href="https://blogs.windows.com/windows_phone/b/wpdev/" target="_blank">Windows Phone Developer Blog</a> to make it easier for you to discover and keep up with what&rsquo;s going on. Some of you may have already subscribed, but if not now&rsquo;s the time since I just posted my <a href="https://blogs.windows.com/windows_phone/b/wpdev/archive/2013/01/04/how-to-detect-that-your-app-is-running-in-kid-s-corner.aspx" target="_blank">first article</a> on there about Kid&rsquo;s Corner :-).<p>I&rsquo;ll still be posting on my personal blog (this site) from time to time on topics that don&rsquo;t &ldquo;fit&rdquo; in the larger WPDev blog, but most of the meaty stuff will be on the official blog. I have a bunch of ideas for content that should be published throughout the coming months one way or another, so stay tuned! Note that after this initial post I won&rsquo;t be announcing any of my WPDev posts here; I&rsquo;ll assume you&rsquo;ve either subscribed or that your search engine / social network / microblogging service of choice will point you in the right direction.</p><p>What do you think of this change? Love it? Hate it? Let me know in the comments below.</p><p>Oh, and Happy New Year everyone!</p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Revisiting an old post - Application.Terminate</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/revisiting-an-old-post-application-terminate</link>
      <pubDate>Mon, 31 Dec 2012 12:26:33 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2012/12/31/revisiting-an-old-post-application-terminate/</guid>
      <description><![CDATA[Well, I already did that once today, but in doing so I realized I should address another old post...]]></description>
      <content:encoded><![CDATA[<p>Well, I already did that <a href="https://blogs.msdn.com/b/ptorr/archive/2012/12/31/images-for-threat-modelling-post.aspx">once today</a>, but in doing so I realized I should address another <a href="https://blogs.msdn.com/b/ptorr/archive/2011/02/23/this-is-not-the-exit-you-are-looking-for.aspx">old post</a> (or <a href="https://blogs.msdn.com/b/ptorr/archive/2010/08/01/exiting-a-windows-phone-application.aspx">two</a>).<p>Yes, in Windows Phone 8 we have added the <a href="https://msdn.microsoft.com/en-US/library/windowsphone/develop/system.windows.application.terminate(v=vs.105).aspx">Application.Terminate</a> method so that you can quickly exit your application in the case of insurmountable roadblocks such as the user refusing to accept the EULA or not signing into their account. As noted in the docs though, this is not a "clean" shutdown (you will not receive any navigation events nor any lifecycle events) so if you have any state to save, you need to save it first.</p><p>The guidance from the previous two posts still stands -- in general you should not need an "Exit" button in your app, nor should you normally need to terminate yourself -- but in the cases where you really <em>really</em> <em><u>really</u> </em>need to, now you have a better option than just crashing.</p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Images for Threat Modelling Post</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/images-for-threat-modelling-post</link>
      <pubDate>Mon, 31 Dec 2012 11:53:23 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2012/12/31/images-for-threat-modelling-post/</guid>
      <description><![CDATA[Recently I've had several folks ask me for the images for my Threat Modelling Post, which have...]]></description>
      <content:encoded><![CDATA[<p>Recently I've had several folks ask me for the images for my <a href="https://blogs.msdn.com/b/ptorr/archive/2005/02/22/guerillathreatmodelling.aspx">Threat Modelling Post</a>, which have disappeared due to various back-end changes over the years. The first few times I just e-mailed the Visio diagram, but more people are asking so I updated the post with the images. </p>
]]></content:encoded>
    </item>
    <item>
      <title>Update on sample code</title>
      <link>https://docs.microsoft.com/archive/blogs/ptorr/update-on-sample-code</link>
      <pubDate>Tue, 27 Nov 2012 08:30:12 GMT</pubDate>
      <dc:creator><![CDATA[Peter Torr - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ptorr/2012/11/27/update-on-sample-code/</guid>
      <description><![CDATA[A lot of people are asking for access to the SQLite wrapper I demoed at //build. Rest assured we are...]]></description>
      <content:encoded><![CDATA[<p>A lot of people are asking for access to the SQLite wrapper I demoed at //build. Rest assured we are working on getting it out to you but it is taking some time. Also I should set expectations in that it is by no means a complete wrapper for all SQLite features but does allow use of basic SQL statements, accessing results, and binding query parameters. Sorry I can't give you any actual timelines at the moment.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>