<?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>Kristoffer's tidbits</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/kristoffer/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/kristoffer/feed.xml</link>
    <description>Bits and pieces of useful information by Kristoffer Henriksson</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:16:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Calling WinRT functions from low level C++</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/calling-winrt-functions-from-low-level-c</link>
      <pubDate>Mon, 26 Mar 2012 14:19:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2012/03/26/calling-winrt-functions-from-low-level-c/</guid>
      <description><![CDATA[The high level projection available in C++ targeting WinRT make working with WinRT from C++&nbsp;a...]]></description>
      <content:encoded><![CDATA[<p>The high level projection available in C++ targeting WinRT make working with WinRT from C++&nbsp;a much easier task. It handles error reporting, reference counting, string conversions etc for you. As an example let's consider the following high level C++ code to retrieve the path of the temporary folder:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #0000ff;">void</span> GetTempFolderPathHighLevel(std::wstring&amp; path)</span><br /><span style="font-family: courier new,courier;">{</span><br /><span style="font-family: courier new,courier;">&nbsp; path = Windows::Storage::ApplicationData::Current-&gt;TemporaryFolder-&gt;Path-&gt;Data();</span><br /><span style="font-family: courier new,courier;">}</span></p>
<p>Short, simple, and to the point. The equivalent low level code to get this is heinous:</p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #0000ff;">#include</span> <span style="color: #800000;">&lt;windows.storage.h&gt;</span><br /><span style="color: #0000ff;">#include</span> <span style="color: #800000;">&lt;wrl/client.h&gt;</span><br /><span style="color: #0000ff;">#include</span> <span style="color: #800000;">&lt;wrl/wrappers/corewrappers.h&gt;</span><br /><br />HRESULT GetTempFolderPath(std::wstring&amp; path)</span><br /><span style="font-family: courier new,courier;">{</span><br /><span style="font-family: courier new,courier;">&nbsp; HRESULT hr;</span><br /><span style="font-family: courier new,courier;">&nbsp; Microsoft::WRL::ComPtr&lt;ABI::Windows::Storage::IApplicationDataStatics&gt; applicationDataStatics;</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">&nbsp; hr = Windows::Foundation::GetActivationFactory(Microsoft::WRL::Wrappers::HStringReference(RuntimeClass_Windows_Storage_ApplicationData).Get(), &amp;applicationDataStatics);</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp; if</span> (FAILED(hr))</span><br /><span style="font-family: courier new,courier;">&nbsp; {</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; return</span> hr;</span><br /><span style="font-family: courier new,courier;">&nbsp;&nbsp;}</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">&nbsp; Microsoft::WRL::ComPtr&lt;ABI::Windows::Storage::IApplicationData&gt; applicationData;</span><br /><span style="font-family: courier new,courier;">&nbsp; hr = applicationDataStatics-&gt;get_Current(&amp;applicationData);</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp; if</span> (FAILED(hr))</span><br /><span style="font-family: courier new,courier;">&nbsp; {</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; return</span> hr;</span><br /><span style="font-family: courier new,courier;">&nbsp; }</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">&nbsp; Microsoft::WRL::ComPtr&lt;ABI::Windows::Storage::IStorageFolder&gt; storageFolder;</span><br /><span style="font-family: courier new,courier;">&nbsp; hr = applicationData-&gt;get_TemporaryFolder(&amp;storageFolder);</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp; if</span> (FAILED(hr))</span><br /><span style="font-family: courier new,courier;">&nbsp; {</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp;&nbsp; &nbsp;return</span> hr;</span><br /><span style="font-family: courier new,courier;">&nbsp; }</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">&nbsp; Microsoft::WRL::ComPtr&lt;ABI::Windows::Storage::IStorageItem&gt; storageItem;</span><br /><span style="font-family: courier new,courier;">&nbsp; hr = storageFolder.As(&amp;storageItem);</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp; if</span> (FAILED(hr))</span><br /><span style="font-family: courier new,courier;">&nbsp; {</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp;&nbsp; &nbsp;return</span> hr;</span><br /><span style="font-family: courier new,courier;">&nbsp; }</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">&nbsp; HSTRING folderName;</span><br /><span style="font-family: courier new,courier;">&nbsp; hr = storageItem-&gt;get_Path(&amp;folderName);</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp; if</span> (FAILED(hr))</span><br /><span style="font-family: courier new,courier;">&nbsp; {</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp;&nbsp; &nbsp;return</span> hr;</span><br /><span style="font-family: courier new,courier;">&nbsp; }</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;">&nbsp; UINT32 length;</span><br /><span style="font-family: courier new,courier;">&nbsp; PCWSTR value = WindowsGetStringRawBuffer(folderName, &amp;length);</span><br /><span style="font-family: courier new,courier;">&nbsp; path = value;</span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;"><span style="font-family: courier new,courier;"><span style="color: #000000;">&nbsp; WindowsDeleteString(folderName);</span><br /></span>&nbsp; return</span> S_OK;</span><br /><span style="font-family: courier new,courier;">}</span></p>]]></content:encoded>
    </item>
    <item>
      <title>A concise history of the Bing Maps Windows 8 Map control.</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/a-concise-history-of-the-bing-maps-windows-8-map-control</link>
      <pubDate>Tue, 20 Mar 2012 14:05:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2012/03/20/a-concise-history-of-the-bing-maps-windows-8-map-control/</guid>
      <description><![CDATA[The Windows 8 Bing map XAML control (as opposed to the javascript control which is an entirely...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #800000;">The Windows 8 Bing map XAML control (as opposed to the javascript control which is an entirely different beast)&nbsp;has a slightly different API when compared to earlier Bing Map XAML controls. Previous XAML controls have all been written in managed code whereas the Windows 8 map control is written in native code. </span><span style="color: #800000;">Written in mostly cross platform C++ it originally shipped inside the Bing iPhone app. It was later branched and shipped as an iPhone map control without functional parity with the script and XAML map controls. With some more work we shipped it as part of the Bing Android app and now as a separate control for Windows 8. The Windows 8 version has had adjustments to make it behave as a native Windows 8 XAML control allowing data binding, native XAML child elements and all the good stuff you would expect from a XAML control. </span></p>
<p><span style="color: #800000;">Since we do our own Direct3D rendering we can get better performance with polygons and polylines on our map by managing the vertices ourselves and just adjusting the camera per frame instead of pushing across new vertices. As a side effect of this MapPolygon and MapPolyline do not descend from UIElement and can't be placed just anywhere in the UI tree but instead need to be children of the separate Map.ShapeLayers property to differentiate them from XAML overlay controls. XAML children still go on the Children property like you would expect.</span></p>
<p><span style="color: #0000ff; font-family: courier new,courier;">&lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span> <span style="color: #ff0000;">x</span>:<span style="color: #ff0000;">Name</span>="map" <span style="color: #ff0000;">Width</span>="800" <span style="color: #ff0000;">Height</span>="600" <span style="color: #ff0000;">Credentials</span>="INSERT_YOUR_BING_MAPS_KEY"&gt;<br />&nbsp; <span style="color: #008000;">&lt;!-- UIElements go under Map.Children&nbsp;--&gt;</span><br />&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map.Children</span>&gt;<br />&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Pushpin</span> <span style="color: #ff0000;">bm</span>:<span style="color: #ff0000;">MapLayer</span>.<span style="color: #ff0000;">PositionAnchor</span>="11,11"&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapLayer</span>.<span style="color: #800000;">Position</span>&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Location</span> <span style="color: #ff0000;">Latitude</span>="0" <span style="color: #ff0000;">Longitude</span>="0" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapLayer</span>.<span style="color: #800000;">Position</span>&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">Pushpin</span>&gt;<br />&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span>.<span style="color: #800000;">Children</span>&gt;<br />&nbsp; <span style="color: #008000;">&lt;!--&nbsp;MapPolygon and MapPolyline go under Map.ShapeLayers&nbsp;--&gt;</span><br />&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span>.<span style="color: #800000;">ShapeLayers</span>&gt;<br />&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapShapeLayer</span>&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapShapeLayer</span>.<span style="color: #800000;">Shapes</span>&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapPolygon</span>&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapPolygon</span>.<span style="color: #800000;">Locations</span>&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Location</span> <span style="color: #ff0000;">Latitude</span>="-10" <span style="color: #ff0000;">Longitude</span>="-10" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Location</span> <span style="color: #ff0000;">Latitude</span>="-10" <span style="color: #ff0000;">Longitude</span>="10" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Location</span> <span style="color: #ff0000;">Latitude</span>="10" <span style="color: #ff0000;">Longitude</span>="10" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Location</span> <span style="color: #ff0000;">Latitude</span>="10" <span style="color: #ff0000;">Longitude</span>="-10" /&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapPolygon</span>.<span style="color: #800000;">Locations</span>&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapPolygon</span>&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapShapeLayer</span>.<span style="color: #800000;">Shapes</span>&gt;<br />&nbsp;&nbsp;&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapShapeLayer</span>&gt;<br />&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span>.<span style="color: #800000;">ShapeLayers</span>&gt;<br />&lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span>&gt;</span></p>
<p><span style="color: #800000;">Side note: there's a XAML compiler bug in the consumer preview that prevents setting FillColor on MapPolygon but you can set it via code fine or wait until the final release where it can be set from XAML as well.</span></p>
<p><span style="color: #800000;">Side note 2: We're already hard at work creating the final version of the Map control with tons of tweaks and fixes. As an example Pushpin no longer requires setting PositionAnchor on it as it will default to the center of the pushpin.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Working with the Bing Maps Metro style map in XAML</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/working-with-the-bing-maps-metro-style-map-in-xaml</link>
      <pubDate>Thu, 15 Mar 2012 10:31:29 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2012/03/15/working-with-the-bing-maps-metro-style-map-in-xaml/</guid>
      <description><![CDATA[Win 8 xaml unfortunately does not supporting anything similar to TypeConverters to convert from...]]></description>
      <content:encoded><![CDATA[<p>Win 8 xaml unfortunately does not supporting anything similar to TypeConverters to convert from strings to objects so some properties like Location end up being more verbose and less intuitive than in previous versions of Bing Maps xaml-compatible controls like Silverlight and WPF. In Silverlight one could set the Center inline:</p>
<p><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span> <span style="color: #ff0000;">Center</span>=<span style="color: #0000ff;">"0,0"</span> <span style="color: #0000ff;">/&gt;</span></span></p>
<p>On the Win8 metro version of the map this looks a bit different:</p>
<p><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&lt;</span><span style="color: #800000;">bm</span><span style="color: #0000ff;">:</span><span style="color: #800000;">Map</span><span style="color: #0000ff;">&gt;</span></span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp; &lt;</span><span style="color: #800000;">bm</span><span style="color: #0000ff;">:</span><span style="color: #800000;">Map</span>.<span style="color: #800000;">Center</span><span style="color: #0000ff;">&gt;</span></span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp;&nbsp;&nbsp; &lt;</span><span style="color: #800000;">bm</span><span style="color: #0000ff;">:</span><span style="color: #800000;">Location</span> <span style="color: #ff0000;">Latitude</span>=<span style="color: #0000ff;">"0"</span> <span style="color: #ff0000;">Longitude</span>=<span style="color: #0000ff;">"0"</span> <span style="color: #0000ff;">/&gt;</span></span><br /><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&nbsp; &lt;/</span><span style="color: #800000;">bm</span><span style="color: #0000ff;">:</span><span style="color: #800000;">Map</span>.<span style="color: #800000;">Center</span><span style="color: #0000ff;">&gt;</span></span><br /><span style="font-family: courier new,courier;"></span><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&lt;/</span><span style="color: #800000;">bm</span><span style="color: #0000ff;">:</span><span style="color: #800000;">Map</span><span style="color: #0000ff;">&gt;</span></span></p>
<p>Other properties are similarly affected. The attached property MapLayer.Position for example:</p>
<p><span style="font-family: courier new,courier; color: #0000ff;">&lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span>&gt;</span><br /><span style="font-family: courier new,courier; color: #0000ff;"></span><span style="font-family: courier new,courier; color: #0000ff;">&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span>.<span style="color: #800000;">Children</span>&gt;</span><br /><span style="font-family: courier new,courier; color: #0000ff;">&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">Button</span> <span style="color: #ff0000;">Width</span>="100" <span style="color: #ff0000;">Height</span>="40" <span style="color: #ff0000;">Content</span>="Button" <span style="color: #ff0000;">bm</span>:<span style="color: #ff0000;">MapLayer</span>.<span style="color: #ff0000;">PositionAnchor</span>="50,40" <span style="color: #ff0000;">Background</span>="Black"&gt;</span><br /><span style="font-family: courier new,courier; color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapLayer</span>.<span style="color: #800000;">Position</span>&gt;</span><br /><span style="font-family: courier new,courier; color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;<span style="color: #800000;">bm</span>:<span style="color: #800000;">Location</span> <span style="color: #ff0000;">Latitude</span>="0" <span style="color: #ff0000;">Longitude</span>="0" /&gt;</span><br /><span style="font-family: courier new,courier; color: #0000ff;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">MapLayer</span>.<span style="color: #800000;">Position</span>&gt;</span><br /><span style="font-family: courier new,courier; color: #0000ff;">&nbsp;&nbsp;&nbsp; &lt;/<span style="color: #800000;">Button</span>&gt;</span><br /><span style="font-family: courier new,courier; color: #0000ff;">&nbsp; &lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span>.<span style="color: #800000;">Children</span>&gt;</span><br /><span style="font-family: courier new,courier; color: #0000ff;">&lt;/<span style="color: #800000;">bm</span>:<span style="color: #800000;">Map</span>&gt;</span></p>
<p>Note that MapLayer.PositionAnchor can be set inline since it is of type Point which is natively supported by the Xaml parser whereas it does not know how to convert from a string to a Location object so it needs a little help there.</p>]]></content:encoded>
    </item>
    <item>
      <title>Using Bing Maps in a Windows 8 Metro style app</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/using-bing-maps-in-a-windows-8-metro-style-app</link>
      <pubDate>Fri, 09 Mar 2012 09:46:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2012/03/09/using-bing-maps-in-a-windows-8-metro-style-app/</guid>
      <description><![CDATA[The recently released Bing Maps controls for Windows 8 (available in the Visual Studio Gallery)...]]></description>
      <content:encoded><![CDATA[<p><span style="color: #800000;">The recently released Bing Maps controls for Windows 8 (available in the <a href="https://go.microsoft.com/fwlink/?LinkId=242709">Visual Studio Gallery</a></span><span style="color: #800000;">) actually contains two separate map controls to support the two types of Windows 8 applications. One is a port of our existing Javascript map control and is used to write html/javascript applications, the other is written in native C++ and is usable by any Xaml application whether it's using C#, VB.NET, or C++. We've helpfully included a template to make it easy to get started with the Xaml control. Once the Bing Maps SDK for Metro style apps is installed there will be a Bing Maps Application template available under the Visual C#</span>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/77/33/BingMapsMetro/2605.NewBingMapsApplication.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-77-33-BingMapsMetro/2605.NewBingMapsApplication.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/77/33/BingMapsMetro/2605.NewBingMapsApplication.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x658/__key/communityserver-blogs-components-weblogfiles/00-00-00-77-33-BingMapsMetro/2605.NewBingMapsApplication.png" alt="" border="0" /></a></p>
<p><span style="color: #800000;">It's also easy enough to use Bing Maps in an application from scratch. First add a Reference to Bing Maps for C#, C++, or Visual Basic (Beta) and Microsoft Visual C++ Runtime Package (if you're writing a managed app, C++ only needs Bing Maps).</span></p>
<p><a aiotarget="false" aiotitle="" href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/77/33/BingMapsMetro/6708.ReferenceManager.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-77-33-BingMapsMetro/6708.ReferenceManager.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/77/33/BingMapsMetro/6708.ReferenceManager.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x266/__key/communityserver-blogs-components-weblogfiles/00-00-00-77-33-BingMapsMetro/6708.ReferenceManager.png" alt="" border="0" /></a><span style="color: #800000;"></span></p>
<p><span style="color: #800000;">If you try to build at this point you'll be presented</span><span style="color: #800000;"> with a most confusing set of error messages:</span></p>
<ul>
<li><span style="font-family: courier new,courier;">Could not find SDK "Microsoft.VCLibs, Version=11.0".</span></li>
<li><span style="font-family: courier new,courier;">"APPX" attributes were found in the SDK manifest file however none of the attributes matched the targeted configuration and architecture and no "APPX" attribute without configuration and architecture could be found. If an appx is required then the project will fail at runtime.</span></li>
<li><span style="font-family: courier new,courier;">The referenced component 'Microsoft Visual C++ Runtime Package' could not be found.</span></li>
</ul>
<p><span style="color: #800000;">Don't be alarmed. This just means you're writing a managed application and have left the platform target at the default Any CPU and both Bing Maps and Visual C++ Runtime require a specific architecture to be set. Change the Active solution platform to x64 or x86 and then it will build properly. The Visual C++ Runtime package is required to deploy on computers that do not have Visual Studio installed. To use the Map control you can drag it from the Toolbox and drop it on your page or declare it yourself with the following two snippets:</span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #ff0000;">xmlns</span><span style="color: #0000ff;">:</span><span style="color: #ff0000;">bm</span><span style="color: #0000ff;">="using:Bing.Maps"</span></span></p>
<p style="padding-left: 30px;"><span style="font-family: courier new,courier;"><span style="color: #0000ff;">&lt;<span style="color: #800000;">bm</span></span><span style="color: #0000ff;">:</span><span style="color: #800000;">Map</span> <span style="color: #ff0000;">Width</span><span style="color: #0000ff;">="800"</span> <span style="color: #ff0000;">Height</span><span style="color: #0000ff;">="600"</span> <span style="color: #ff0000;">Credentials</span><span style="color: #0000ff;">="INSERT_YOUR_BING_MAPS_KEY"</span> /&gt;</span></p>
<p><span style="color: #800000;">You will need a Bing Maps Key to use the map but fortunately we have generous pre-release licensing terms that permit you to use it for free during the beta period. You can read more the licensing terms on the <a href="https://msdn.microsoft.com/en-us/library/ff428642.aspx">Bing Maps blog</a>. For digging deeper we have also worked hard to make sure the <a href="https://go.microsoft.com/fwlink/?LinkID=242866">documentation</a> is helpful and up to date.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Shrinking .NET assemblies by removing unnecessary attributes</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/shrinking-net-assemblies-by-removing-unnecessary-attributes</link>
      <pubDate>Wed, 28 Apr 2010 10:47:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2010/04/28/shrinking-net-assemblies-by-removing-unnecessary-attributes/</guid>
      <description><![CDATA[Normal
  0
  
  
  
  
  false
  false
  false
  
  EN-US
  X-NONE...]]></description>
      <content:encoded><![CDATA[<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 14"><meta name="Originator" content="Microsoft Word 14"><link href="file:///C:%5CUsers%5Ckrihenri%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" mce_href="file:///C:%5CUsers%5Ckrihenri%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml" rel="File-List"><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:AllowPNG/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><link href="file:///C:%5CUsers%5Ckrihenri%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" mce_href="file:///C:%5CUsers%5Ckrihenri%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx" rel="themeData"><link href="file:///C:%5CUsers%5Ckrihenri%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" mce_href="file:///C:%5CUsers%5Ckrihenri%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml" rel="colorSchemeMapping"><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:TrackMoves/>
  <w:TrackFormatting/>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-US</w:LidThemeOther>
  <w:LidThemeAsian>X-NONE</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:EnableOpenTypeKerning/>
   <w:DontFlipMirrorIndents/>
   <w:OverrideTableStyleHps/>
  </w:Compatibility>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="&#45;-"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="267">
  <w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
  <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
  <w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/>
  <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
  <w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
  <w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
  <w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
  <w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
  <w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
  <w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
  <w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
  <w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
  <w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
  <w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
  <w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
  <w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
 </w:LatentStyles>
</xml><![endif]--><style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;
	mso-font-charset:0;
	mso-generic-font-family:swiss;
	mso-font-pitch:variable;
	mso-font-signature:-520092929 1073786111 9 0 415 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:"";
	margin-top:0in;
	margin-right:0in;
	margin-bottom:10.0pt;
	margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	mso-themecolor:hyperlink;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-noshow:yes;
	mso-style-priority:99;
	color:purple;
	mso-themecolor:followedhyperlink;
	text-decoration:underline;
	text-underline:single;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-fareast-font-family:Calibri;
	mso-fareast-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
.MsoPapDefault
	{mso-style-type:export-only;
	margin-bottom:10.0pt;
	line-height:115%;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.WordSection1
	{page:WordSection1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-priority:99;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin-top:0in;
	mso-para-margin-right:0in;
	mso-para-margin-bottom:10.0pt;
	mso-para-margin-left:0in;
	line-height:115%;
	mso-pagination:widow-orphan;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	mso-ascii-font-family:Calibri;
	mso-ascii-theme-font:minor-latin;
	mso-hansi-font-family:Calibri;
	mso-hansi-theme-font:minor-latin;
	mso-bidi-font-family:"Times New Roman";
	mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->

<p class="MsoNormal" style="line-height: normal;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">.NET assemblies contain a rich set
of metadata for use by the run time, debugger, and compiler. This information
is stored in the assembly whether it will be used or not which for certain
types of shipping assemblies is unnecessary. For example when you create a new
automatic property:<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">public</span><span style="font-size: 10pt; font-family: 'Courier New';"> <span style="color: blue;">int</span>
MyProperty { <span style="color: blue;">get</span>; <span style="color: blue;">set</span>;
}</span></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;">&nbsp;</p>

<p class="MsoNormal" style="line-height: normal;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif';">The compiler generates the following
disassembled code:<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">.field private int32
'&lt;MyProperty&gt;k__BackingField'<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">.method public hidebysig
specialname instance int32 <o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp; get_MyProperty() cil managed<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp; {<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; <b style="">.custom instance void
[mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() =
( 01<span style=""> 00 00 00 )</span> <o:p></o:p></b></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; //
Code size&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 11 (0xb)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
.maxstack&nbsp; 1<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
.locals init (int32 V_0)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; IL_0000:&nbsp;
ldarg.0<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
IL_0001:&nbsp; ldfld&nbsp;&nbsp;&nbsp; &nbsp; int32 ConsoleApplication1.Test::'&lt;MyProperty&gt;k__BackingField'<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
IL_0006:&nbsp; stloc.0<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
IL_0007:&nbsp; br.s&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; IL_0009<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
IL_0009:&nbsp; ldloc.0<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
IL_000a:&nbsp; ret<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp; } // end of
method Program::get_MyProperty<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp; .method private
hidebysig specialname instance void <o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp; set_MyProperty(int32 'value') cil managed<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp; {<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; <b>.custom
instance void
[mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() =
( 01 00 00 00 )</b> <o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;" lang="DE">&nbsp;&nbsp;&nbsp;
// Code size&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 8 (0x8)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;" lang="DE">&nbsp;&nbsp;&nbsp;
.maxstack&nbsp; 8<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;" lang="DE">&nbsp;&nbsp;&nbsp;
IL_0000:&nbsp; ldarg.0<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;" lang="DE">&nbsp;&nbsp;&nbsp;
IL_0001:&nbsp; ldarg.1<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; IL_0002:&nbsp;
stfld&nbsp;&nbsp;&nbsp; &nbsp; int32 ConsoleApplication1.Test'&lt;MyProperty&gt;k__BackingField'<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
IL_0007:&nbsp; ret<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp; } // end of
method Program::set_MyProperty<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;">Note the extra <b style="">CompilerGeneratedAttribute</b> that the
compiler inserts to note that this code was generated by the compiler. This
attribute is used by the debugger to step over code but when you’re done
debugging and ready to ship it adds little value.<o:p></o:p></span></p>

<p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;">Thanks to the <a href="https://ccimetadata.codeplex.com/" mce_href="https://ccimetadata.codeplex.com/">Common Compiler Infrastructure Metadata
Components</a> we can easily create a tool to remove attributes from an
assembly. Using MetadataMutor we override Visit(List&lt;ICustomAttribute&gt;)
and return a modified list of attributes by removing all attributes of a
certain type:<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">public</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">class</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">AttributeMutator</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> : </span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">MetadataMutator</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">{<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">private</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">Dictionary</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&lt;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">string</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">, </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">string</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&gt; attributesToRemove;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">public</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> AttributeMutator(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">IMetadataHost</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> host, </span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">IEnumerable</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&lt;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">string</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&gt; attributesToRemove)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; : </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">base</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">(host)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">this</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">.attributesToRemove = </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">new</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">Dictionary</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&lt;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">string</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">, </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">string</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&gt;();<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">foreach</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> (</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">string</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> attribute </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">in</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> attributesToRemove)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">this</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">.attributesToRemove.Add(attribute.ToUpperInvariant(), attribute);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">public</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">override</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">List</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&lt;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">ICustomAttribute</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&gt;
Visit(</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">List</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&lt;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">ICustomAttribute</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&gt; customAttributes)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">List</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&lt;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">ICustomAttribute</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&gt; result = </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">new</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">List</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&lt;</span><span style="font-size: 10pt; font-family: 'Courier New'; color: rgb(43, 145, 175);">ICustomAttribute</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&gt;(customAttributes);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">for</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> (</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">int</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> i = result.Count - 1; i &gt;= 0; i--)<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">if</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> (</span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">this</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">.attributesToRemove.ContainsKey(result[i].Type.ToString().ToUpperInvariant()))<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; result.RemoveAt(i);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">return</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;"> </span><span style="font-size: 10pt; font-family: 'Courier New'; color: blue;">base</span><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">.Visit(result);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Courier New'; color: black;">}<o:p></o:p></span></p>

<p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;">The rest of the code to read
and write assemblies can be copied from the CCI samples.<o:p></o:p></span></p>

<p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;"><a href="https://kristoffer.members.winisp.net/StripAttributes.zip" mce_href="https://kristoffer.members.winisp.net/StripAttributes.zip">Download the
Visual Studio 2010 project</a><o:p></o:p></span></p>

<p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;">To use this program run:<o:p></o:p></span></p>

<p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>StripAttributes.exe C:\Input\MyAssembly.dll C:\Output
@attributes.txt<o:p></o:p></span></p>

<p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;">where attributes.txt is
a list of attributes, one per line, to be removed from the assembly. The
resulting file is written to C:\Output. Since the assembly is rewritten it will
need to be resigned with sn.exe before shipping.<o:p></o:p></span></p>

<p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;">The cost savings per
assembly will vary depending on your attribute usage and how the PE pages line
up. Sometimes no savings can be achieved even if attributes are removed because
the assembly is written in 512 byte chunks. </span></p><p class="MsoNormal" style="line-height: normal; background: none repeat scroll 0% 0% white;"><span style="font-size: 10pt; font-family: 'Arial','sans-serif'; color: black;">For desktop CLR assemblies disk size is relatively unimportant but when the end user has to download your code (Silverlight for example) every byte matters.</span></p>]]></content:encoded>
    </item>
    <item>
      <title>Streetside photos is live!</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/streetside-photos-is-live</link>
      <pubDate>Thu, 11 Feb 2010 16:11:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2010/02/11/streetside-photos-is-live/</guid>
      <description><![CDATA[Bing Maps just shipped a tech preview of Streetside photos which overlays Flickr photos on...]]></description>
      <content:encoded><![CDATA[Bing Maps just shipped a tech preview of Streetside photos which overlays Flickr photos on Streetside to show where the photos were taken. The team worked hard to get it out the door and we're proud to share it with the rest of the world. <a href="https://www.bing.com/maps/explore/#5003/0.6044=s:http%253A%2f%2ffarm3.static.flickr.com%2f2651%2f4115828663_437e2ab815.jpg&amp;o=&amp;a=0&amp;n=0/5872/lat=47.606988&amp;lon=-122.338356&amp;alt=1.34&amp;z=30&amp;h=30.7&amp;p=5.9&amp;pid=5082" mce_href="https://www.bing.com/maps/explore/#5003/0.6044=s:http%253A%2f%2ffarm3.static.flickr.com%2f2651%2f4115828663_437e2ab815.jpg&amp;o=&amp;a=0&amp;n=0/5872/lat=47.606988&amp;lon=-122.338356&amp;alt=1.34&amp;z=30&amp;h=30.7&amp;p=5.9&amp;pid=5082">Check it out on Bing Maps</a>.<br>]]></content:encoded>
    </item>
    <item>
      <title>Streetside smoove</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/streetside-smoove</link>
      <pubDate>Wed, 20 Jan 2010 14:41:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2010/01/20/streetside-smoove/</guid>
      <description><![CDATA[Bing Maps Streetside just released a minor update that allows you to smoothly glide through streets...]]></description>
      <content:encoded><![CDATA[Bing Maps Streetside just released a minor update that allows you to smoothly glide through streets like a first-person shooter or pacman. <a href="https://www.bing.com/maps/explore/#5003/o=&amp;a=&amp;s=w&amp;n=0/5872/lat=39.952219&amp;lon=-75.162033&amp;alt=-19.8&amp;z=30&amp;h=108.3&amp;p=-4&amp;pid=5082" mce_href="https://www.bing.com/maps/explore/#5003/o=&amp;a=&amp;s=w&amp;n=0/5872/lat=39.952219&amp;lon=-75.162033&amp;alt=-19.8&amp;z=30&amp;h=108.3&amp;p=-4&amp;pid=5082">Try it out</a> yourself, just hold down the Up key and turn with Left and Right. Faster connections give a more pleasant experience.<br>]]></content:encoded>
    </item>
    <item>
      <title>It's 10 pm, do you know what your JITter is doing?</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/its-10-pm-do-you-know-what-your-jitter-is-doing</link>
      <pubDate>Fri, 13 Nov 2009 13:52:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2009/11/13/its-10-pm-do-you-know-what-your-jitter-is-doing/</guid>
      <description><![CDATA[Ever have that awkward feeling like you don't know what actually gets executed as a result of your...]]></description>
      <content:encoded><![CDATA[<p>Ever have that awkward feeling like you don't know what actually gets executed as a result of your managed code? Visual Studio allows you to inspect the JITted code easily but does require a few tweaks first:</p>
<ol>
<li>First set your project to build in <b>Release</b> mode.</li>
<li>Next go to <b>Tools|Options|Debugging</b> and uncheck both <b>Suppress JIT optimization on module load (Managed only)</b> and <b>Enable Just My Code (Managed only)</b></li></ol>
<p>Now you can run your project and set a breakpoint where you want to look at code and go to <b>Debug | Windows | Disassembly</b> to get an annotated disassembly like the following:&nbsp;</p>
<div style="background: white none repeat scroll 0% 0%; font-family: Courier New; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: black; font-size: 10pt;">&nbsp;&nbsp;&nbsp; static void Main(string[] args)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DoTest();<br><span style="color: gray;">00000000 push ebp <br>00000001 mov ebp,esp <br>00000003 push esi <br>00000004 call dword ptr ds:[00159B7Ch] </span><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Console.WriteLine(s);<br><span style="color: gray;">0000000a mov esi,dword ptr ds:[037D5B20h] <br>00000010 call 6B20BE78 <br>00000015 mov ecx,eax <br>00000017 mov edx,esi <br>00000019 mov eax,dword ptr [ecx] <br>0000001b call dword ptr [eax+000000D8h] <br>00000021 pop esi </span><br>&nbsp;&nbsp;&nbsp; }<br><span style="color: gray;">00000022 pop ebp <br>00000023 ret &nbsp;</span></div>]]></content:encoded>
    </item>
    <item>
      <title>OutOfMemoryException is special</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/outofmemoryexception-is-special</link>
      <pubDate>Wed, 25 Feb 2009 12:25:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2009/02/25/outofmemoryexception-is-special/</guid>
      <description><![CDATA[Consider the humble OutOfMemoryException and its most common usage. If it is thrown when the system...]]></description>
      <content:encoded><![CDATA[<p>Consider the humble OutOfMemoryException and its most common usage. If it is thrown when the system is well and truly out of memory then how would the system allocate enough memory to create a new instance of OutOfMemoryException? Luckily this problem has a simple solution: OutOfMemoryException is allocated up front so it's available when it needs to be thrown.</p><p>The .NET runtime does first try to create a new OutOfMemoryException instance but if it fails it will fall back to the preallocated instance so there is always an exception available to be thrown. </p><p>Some other exceptions are preallocated: StackOverflowException, ExecutionEngineException, and ThreadAbortException.<br></p>]]></content:encoded>
    </item>
    <item>
      <title>Troubleshooting a failed Virtual Earth 3D installation</title>
      <link>https://docs.microsoft.com/archive/blogs/kristoffer/troubleshooting-a-failed-virtual-earth-3d-installation</link>
      <pubDate>Fri, 16 May 2008 15:54:00 GMT</pubDate>
      <dc:creator><![CDATA[Kristoffer]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/kristoffer/2008/05/16/troubleshooting-a-failed-virtual-earth-3d-installation/</guid>
      <description><![CDATA[The Virtual Earth 3D setup program is a small executable that downloads and installs pre-requisites...]]></description>
      <content:encoded><![CDATA[<p>The Virtual Earth 3D setup program is a small executable that downloads and installs pre-requisites if they're not already installed and then the correct MSI for your OS flavor (32 or 64 bit). The pre-requisites are Windows Imaging Components and .NET Framework 2.0. WIC comes with Vista and XP sp3 and doesn't need to be downloaded on those platforms. The setup program logs its status to a file named VirtualEarth3DInstallLog.txt in the Temp folder. On a default Windows XP installation the Temp folder is located at C:\Documents and Settings\[username]\Local Settings\Temp.<br></p><p>After the pre-requisites have been validated VirtualEarth3D.msi or VirtualEarth3D64.msi are downloaded and installed.&nbsp; The 64 bit MSI contains both 32 and 64 bit modules so you can run internet explorer in 32 or 64 bit mode. The MSI log is stored in MsiInstall.log, also in the Temp folder.</p><p>So what errors go to what log?</p><ul><li>If the error happens in the Setup program, for example a failure to download a prerequisite or the MSI, VirtualEarth3DInstallLog.txt will have an error message with the details.</li><li>If the error happens once Setup starts running the Virtual Earth 3D MSI MsiInstall.log will contain the details.</li></ul><br>If you still have problems installing Virtual Earth 3D, <a href="https://support.live.com/eform.aspx?productKey=wllocal&amp;ct=eformts" mce_href="https://support.live.com/eform.aspx?productKey=wllocal&amp;ct=eformts">Live Maps support</a> is only a click away.<br>]]></content:encoded>
    </item>
  </channel>
</rss>