<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Striving for Laziness</title><link>http://blogs.msdn.com/b/cgreene/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Publishing Symbol Data with a Manual Build</title><link>http://blogs.msdn.com/b/cgreene/archive/2012/10/10/publishing-symbol-data-with-a-manual-build.aspx</link><pubDate>Wed, 10 Oct 2012 22:55:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10358479</guid><dc:creator>cgreene</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/cgreene/rsscomments.aspx?WeblogPostID=10358479</wfw:commentRss><comments>http://blogs.msdn.com/b/cgreene/archive/2012/10/10/publishing-symbol-data-with-a-manual-build.aspx#comments</comments><description>&lt;p&gt;I was recently working with a customer where an automated build process was not possible.&amp;#160; Thus, we couldn’t use the steps found in &lt;a href="http://msdn.microsoft.com/en-us/library/hh190722(VS.100).aspx"&gt;Publish Symbol Data&lt;/a&gt;.&amp;#160; After a few hours of research, here’s what we did:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Install the Debugging Tools for Windows.&amp;#160; This is needed because we’ll be using SymStore.exe.&lt;/li&gt;    &lt;li&gt;Create a network share for the symbol store.&amp;#160; Make sure the account you use to do the build has write permissions.&lt;/li&gt;    &lt;li&gt;Add a Post-build event with a command line like this:&lt;/li&gt; &lt;/ol&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;&amp;quot;%ProgramW6432%\Debugging Tools for Windows (x64)\symstore.exe&amp;quot; add /r /f&amp;#160; &amp;quot;$(TargetDir)*.pdb&amp;quot; /s&amp;#160; &lt;a href="file://\\server\symbols"&gt;\&lt;font color="#000000"&gt;\server\symbols&lt;/font&gt;&lt;/a&gt; /t $(ProjectName)&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Pretty easy.&amp;#160; SymStore.exe has several command line parameters.&amp;#160; So there are many more options to choose from to suit your needs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10358479" width="1" height="1"&gt;</description></item><item><title>C-Style Array COM-Interop</title><link>http://blogs.msdn.com/b/cgreene/archive/2012/10/10/c-style-array-com-interop.aspx</link><pubDate>Wed, 10 Oct 2012 18:02:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10358398</guid><dc:creator>cgreene</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/cgreene/rsscomments.aspx?WeblogPostID=10358398</wfw:commentRss><comments>http://blogs.msdn.com/b/cgreene/archive/2012/10/10/c-style-array-com-interop.aspx#comments</comments><description>&lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt; line-height: 13pt; list-style-type: disc;" class="MsoNormal"&gt;&lt;font style="font-size: 11pt;"&gt;You are developing an application with large arrays and you want the best of both worlds.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;You want to use the .NET Framework for the ease of creating managed applications but you also want to use Native Code so that you take advantage of hardware accelerators like GPGPUs (for which you would consider &lt;a style="cursor: auto;" href="http://blogs.msdn.com/b/vcblog/archive/2011/06/15/introducing-amp.aspx"&gt;C++ AMP&lt;/a&gt;) or &lt;a style="cursor: auto;" href="http://blogs.msdn.com/b/nativeconcurrency/archive/2012/07/10/auto-vectorizer-in-visual-studio-11-cookbook.aspx"&gt;Auto-Vectorization&lt;/a&gt;.&lt;/font&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 11pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt; line-height: 13pt; list-style-type: disc;" class="MsoNormal"&gt;&lt;font style="font-size: 11pt;"&gt;The managed application in this post performs vector addition and dot products on C-style arrays.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160;&lt;/span&gt;It shows you how to pass C-style arrays to and from Native Code.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;There’s already a post on using &lt;a style="cursor: auto;" href="http://blogs.msdn.com/b/pfxteam/archive/2011/09/21/10214538.aspx"&gt;C++ AMP from C#&lt;/a&gt; that uses P/Invoke.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;This post will show you how to do it through COM Interop with C++/ATL.&lt;/font&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 11pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt; line-height: 13pt; list-style-type: disc;" class="MsoNormal"&gt;&lt;font style="font-size: 11pt;"&gt;The dot product and vector addition implementations are basic because there are already several posts on the &lt;a style="cursor: auto;" href="http://blogs.msdn.com/b/nativeconcurrency/"&gt;&lt;span style="mso-ansi-language: en;" lang="EN"&gt;Parallel Programming in Native Code&lt;/span&gt;&lt;/a&gt;&lt;span style="mso-ansi-language: en;" lang="EN"&gt; &lt;/span&gt;blog to bring you up to speed with these new technologies for even faster execution. &lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;This post also assumes you are familiar with basic Visual Studio, C++ and C# development.&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt; line-height: 13pt; list-style-type: disc;" class="MsoNormal"&gt;&lt;font style="font-size: 11pt;"&gt;Let’s get started.&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;1.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Start Visual Studio with elevated privileges.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;(It has to be elevated so you can register your COM object)      &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;2.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Create a new Visual C++ ATL Project.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;I called mine “NativeVectorOps”.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;(Since there’s existing documentation on how to create &lt;a style="cursor: auto;" href="http://msdn.microsoft.com/en-us/library/035x3kbh.aspx"&gt;ATL projects&lt;/a&gt; as well, I won’t get into the details here)       &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;3.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Define the interface (this listing does not show the IDL attributes)&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;interface&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;ICVectorOps : IDispatch{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-tab-count: 1;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;HRESULT Add(DOUBLE a[], DOUBLE b[], &lt;span&gt;int&lt;/span&gt; size, DOUBLE c[]);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-tab-count: 1;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;HRESULT DotProduct(DOUBLE a[], DOUBLE b[], &lt;span&gt;int&lt;/span&gt; size, DOUBLE* c);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;};       &lt;br /&gt;        &lt;br style="mso-special-character: line-break;" /&gt;        &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpFirst"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;4.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Build the ATL project.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;This will also register your COM DLL.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;[Note: If you build this as a 64-bit binary, you’ll have to set the &lt;b style="mso-bidi-font-weight: normal;"&gt;Target Environment&lt;/b&gt; to “Microsoft Windows 64-bit on x64 (/env x64)” on your ATL project]      &lt;br /&gt;&lt;span style="mso-no-proof: yes;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-19-26-metablogapi/0285.clip_5F00_image0014_5F00_477AC710.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="clip_image001[4]" border="0" alt="clip_image001[4]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-19-26-metablogapi/3835.clip_5F00_image0014_5F00_thumb_5F00_1848DB79.png" width="555" height="392" /&gt;&lt;/a&gt;&lt;/span&gt;      &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;5.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Open a Visual Studio Command Prompt and create the Interop Assembly with the following command line:     &lt;br /&gt;&lt;span&gt;tlbimp NativeVectorOps.DLL&lt;/span&gt;      &lt;br /&gt;      &lt;br /&gt;This creates a new interop assembly named NativeVectorOps&lt;b style="mso-bidi-font-weight: normal;"&gt;Lib&lt;/b&gt;.DLL      &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;6.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Disassemble the Interop Assembly.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;From the Visual Studio command prompt, run      &lt;br /&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size: 11pt;"&gt;ildasm NativeVectorOpsLib.DLL /out:NativeVectorOpsLib.il       &lt;br style="mso-special-character: line-break;" /&gt;        &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;7.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Now it’s time to fix the Intermediate Language (IL).&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;By default, tlbimp will only create an interop assembly that passes arrays as a pointer.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;Not a big deal.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;You could certainly use this. &lt;span style="mso-spacerun: yes;"&gt;&amp;#160;&lt;/span&gt;I just want to use the C-style arrays because I prefer not to use pointer arithmetic.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;      &lt;br /&gt;      &lt;br /&gt;Open NativeVectorOpsLib.il in your favorite text editor.      &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;8.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;You’ll have to change each method twice.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;Once for the interface and once for the class.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;We’ll start by fixing the Add method:      &lt;br /&gt;Before:&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;.method public hidebysig newslot abstract virtual &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;instance void&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;Add([in] float64&amp;amp; a,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in] float64&amp;amp; b,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in] int32 size,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in][out] float64&amp;amp; c) &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 2in; line-height: normal; text-indent: 0.5in; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;runtime managed internalcall&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-add-space: auto; mso-layout-grid-align: none;" class="MsoListParagraphCxSpFirst"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-add-space: auto; mso-layout-grid-align: none;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-add-space: auto; mso-layout-grid-align: none;" class="MsoListParagraphCxSpLast"&gt;&lt;font style="font-size: 11pt;"&gt;After&lt;/font&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;:       &lt;br style="mso-special-character: line-break;" /&gt;        &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;.method public hidebysig newslot abstract virtual &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;instance void&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;Add([in] float64&lt;b style="mso-bidi-font-weight: normal;"&gt;[] marshal([+2])&lt;/b&gt; a,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in] float64&lt;b style="mso-bidi-font-weight: normal;"&gt;[] marshal([+2])&lt;/b&gt; b,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in] int32 size,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in][out] float64&lt;b style="mso-bidi-font-weight: normal;"&gt;[] marshal([+2])&lt;/b&gt; c) &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 2in; line-height: normal; text-indent: 0.5in; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;runtime managed internalcall&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-add-space: auto; mso-layout-grid-align: none;" class="MsoListParagraphCxSpFirst"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; list-style-type: disc; mso-add-space: auto; mso-layout-grid-align: none;" class="MsoListParagraphCxSpMiddle"&gt;&lt;font style="font-size: 11pt;"&gt;The “&amp;amp;” is the interop assembly default and it signifies the parameter was passed as a pointer.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;The &lt;span&gt;[] marshal([+2])&lt;/span&gt; says it should be passed as a C-Style array.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;The marshal “+2” part is a zero-based index which tells the interop layer which method parameter contains the size of the arrays.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;In this case, +2 turns out to be the &lt;span&gt;size&lt;/span&gt; parameter.       &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;9.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Now we’ll change the DotProduct method.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;Remember – you’ll have to do it twice.&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt 0.5in; line-height: 13pt; list-style-type: disc;" class="MsoListParagraphCxSpLast"&gt;&lt;font style="font-size: 11pt;"&gt;Before:&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;.method public hidebysig newslot virtual &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;instance float64&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;DotProduct([in] float64&amp;amp; a,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in] float64&amp;amp; b,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in] int32 size) &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 3in; line-height: normal; text-indent: 0.5in; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;runtime managed internalcall&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt 0.5in; line-height: 13pt; list-style-type: disc;" class="MsoListParagraph"&gt;&lt;font style="font-size: 11pt;"&gt;After:&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span style="mso-tab-count: 1;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;.method public hidebysig newslot abstract virtual &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;instance float64&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;DotProduct([in] float64[] marshal([+2]) a,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[in] float64[] marshal([+2]) b,&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;[in] int32 size) &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 3in; line-height: normal; text-indent: 0.5in; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;runtime managed internalcall&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; list-style-type: disc;" class="MsoListParagraphCxSpFirst"&gt;   &lt;br /&gt;&lt;font style="font-size: 11pt;"&gt;Again, we’re just replacing &lt;span&gt;float64&amp;amp;&lt;/span&gt;with &lt;span&gt;float64[] marshal(+2)&lt;/span&gt;.      &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;10.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Save NativeVectorOpsLib.il     &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;11.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Now it’s time to reassemble the interop assembly.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;From the Visual Studio command prompt run the following command:      &lt;br /&gt;&lt;span&gt;ilasm /dll NativeVectorOpsLib.il&lt;/span&gt;      &lt;br /&gt;      &lt;br /&gt;This recreates the NativeVectorOpsLib.DLL assembly.      &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;12.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Create a managed project like a simple C# console application.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;I called mine VectorClient.      &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;13.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Decorate the Main method with the &lt;a style="cursor: auto;" href="http://msdn.microsoft.com/en-us/library/system.stathreadattribute.aspx"&gt;STAThread&lt;/a&gt;attribute.      &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: 13pt; text-indent: -0.25in; list-style-type: disc; mso-list: l0 level1 lfo1;" class="MsoListParagraphCxSpMiddle"&gt;&lt;span style="mso-bidi-font-family: calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 11pt;"&gt;14.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Add a reference to the NativeVectorOpsLib.DLL assembly.     &lt;br style="mso-special-character: line-break;" /&gt;      &lt;br style="mso-special-character: line-break;" /&gt;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt 0.5in; line-height: normal; text-indent: -0.25in; list-style-type: disc; mso-add-space: auto; mso-list: l0 level1 lfo1; mso-layout-grid-align: none;" class="MsoListParagraphCxSpLast"&gt;&lt;span style="mso-fareast-font-family: consolas;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;font style="font-size: 9.5pt;"&gt;15.&lt;/font&gt;&lt;span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"&gt;&lt;font style="font-size: 7pt;"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size: 11pt;"&gt;Here’s the code:&lt;/font&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;[&lt;span&gt;STAThread&lt;/span&gt;]&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt;void&lt;/span&gt; Main(&lt;span&gt;string&lt;/span&gt;[] args)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;// Define a couple of arbitrary arrays&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;double&lt;/span&gt;[] a = { 1.0, 1.0, 1.0 };&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;double&lt;/span&gt;[] b = { 2.0, 3.0, 4.0 };&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;// Instantiate the Native COM Object&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;NativeVectorOpsLib.&lt;span&gt;CVectorOps&lt;/span&gt; vectors = &lt;span&gt;new&lt;/span&gt; &lt;span&gt;CVectorOps&lt;/span&gt;();&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;// Calculate and print the dot product&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;double&lt;/span&gt; dotProduct = 0.0;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;dotProduct = vectors.DotProduct(a, b, a.Length);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;Console&lt;/span&gt;.WriteLine(&lt;span&gt;&amp;quot;{0} . {1} = {2}&amp;quot;&lt;/span&gt;, FormatArray(a), FormatArray(b), dotProduct);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;// Calculate and print the vector addition&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;double&lt;/span&gt;[] c = &lt;span&gt;new&lt;/span&gt;&lt;span&gt;double&lt;/span&gt;[a.Length];&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;vectors.Add(a, b, a.Length, c);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;Console&lt;/span&gt;.Write(&lt;span&gt;&amp;quot;{0} + {1} = {2}&amp;quot;&lt;/span&gt;, FormatArray(a), FormatArray(b), FormatArray(c));&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;public&lt;/span&gt;&lt;span&gt;static&lt;/span&gt; &lt;span&gt;string&lt;/span&gt; FormatArray(&lt;span&gt;double&lt;/span&gt;[] array)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;StringBuilder&lt;/span&gt; sb = &lt;span&gt;new &lt;/span&gt;&lt;span&gt;StringBuilder&lt;/span&gt;();&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;sb.Append(&lt;span&gt;&amp;quot;{ &amp;quot;&lt;/span&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;for&lt;/span&gt; (&lt;span&gt;int&lt;/span&gt; i = 0; i&amp;lt; array.Length; i++)&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;sb.Append(&lt;span&gt;string&lt;/span&gt;.Format(&lt;span&gt;&amp;quot;{0} &amp;quot;&lt;/span&gt;, array[i]));&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;sb.Append(&lt;span&gt;&amp;quot;}&amp;quot;&lt;/span&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;&lt;span&gt;return&lt;/span&gt; sb.ToString();&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 0pt; line-height: normal; list-style-type: disc; mso-layout-grid-align: none;" class="MsoNormal"&gt;&lt;span&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size: 9.5pt;"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt; line-height: 13pt; list-style-type: disc;" class="MsoNormal"&gt;&lt;font style="font-size: 11pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;  &lt;p style="margin: 0in 0in 10pt; line-height: 13pt; list-style-type: disc;" class="MsoNormal"&gt;&lt;font style="font-size: 11pt;"&gt;And that’s what it takes to do C-style arrays with COM interop.&lt;span style="mso-spacerun: yes;"&gt;&amp;#160; &lt;/span&gt;That wasn’t too bad, was it?&lt;/font&gt;&lt;span style="mso-spacerun: yes;"&gt;&lt;font style="font-size: 11pt;"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/p&gt; &lt;font style="font-size: 12pt;"&gt;&lt;/font&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10358398" width="1" height="1"&gt;</description></item><item><title>UserProfileApplicationNotAvailableException</title><link>http://blogs.msdn.com/b/cgreene/archive/2010/08/24/userprofileapplicationnotavailableexception.aspx</link><pubDate>Tue, 24 Aug 2010 18:05:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10053705</guid><dc:creator>cgreene</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/cgreene/rsscomments.aspx?WeblogPostID=10053705</wfw:commentRss><comments>http://blogs.msdn.com/b/cgreene/archive/2010/08/24/userprofileapplicationnotavailableexception.aspx#comments</comments><description>&lt;p&gt;I was experimenting with the SharePoint 2010 User Profile Service.&amp;#160; I had a simple console application and used the code found in the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofilemanager.aspx" target="_blank"&gt;UserProfileManager&lt;/a&gt; documentation as a starting point.&amp;#160; But any time I tried to create a new UserProfileManager object I got an &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofileapplicationnotavailableexception.aspx" target="_blank"&gt;UserProfileApplicationNotAvailableException&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I made sure I followed all of the steps in &lt;a href="http://technet.microsoft.com/en-us/library/ee721049.aspx" target="_blank"&gt;Configure profile synchronization&lt;/a&gt; but I still was getting the exception.&lt;/p&gt;  &lt;p&gt;Steve Peschka finally pointed me to his post on &lt;a href="http://blogs.technet.com/b/speschka/archive/2010/02/22/no-user-profile-application-available-mystery-in-sharepoint-2010.aspx" target="_blank"&gt;&amp;quot;No User Profile Application Available&amp;quot; Mystery in SharePoint 2010'&lt;/a&gt; and that solved it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10053705" width="1" height="1"&gt;</description></item><item><title>Remote Smart Card Authentication</title><link>http://blogs.msdn.com/b/cgreene/archive/2010/01/26/remote-smart-card-authentication.aspx</link><pubDate>Tue, 26 Jan 2010 17:28:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9953592</guid><dc:creator>cgreene</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/cgreene/rsscomments.aspx?WeblogPostID=9953592</wfw:commentRss><comments>http://blogs.msdn.com/b/cgreene/archive/2010/01/26/remote-smart-card-authentication.aspx#comments</comments><description>&lt;p&gt;I was trying to remote into a Windows 7 Hyper-V guest from my Windows 7 laptop using my smart card for authentication.&amp;nbsp; When I initiated the remoting session I made it all the way to the “Welcome” screeen, but then received the following error:&lt;/p&gt; &lt;p&gt;“The system could not log you on. An error occurred trying to use this smart card. You can find further details in the event log. Please report this error to the system administrator.” &lt;p&gt;This is the same error message highlighted in KB article &lt;a href="http://support.microsoft.com/kb/939682"&gt;939682&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Here’s how I solved the problem:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Log on to the machine using username/password credentials&lt;/li&gt; &lt;li&gt;Open Device Manager&lt;/li&gt; &lt;li&gt;Right-click the top node in the details pane (this will be your machine name), select “add legacy hardware”&lt;/li&gt; &lt;li&gt;Click next when the “Welcome to the Add Hardware Wizard” appears&lt;/li&gt; &lt;li&gt;Select “Search for and install the hardware automatically (Recommended)” and click Next&lt;/li&gt; &lt;li&gt;Click Next again on the screen that says “The wizard did not find any new hardware on your computer”&lt;/li&gt; &lt;li&gt;Scroll down, select “Smart cards”, and click Next&lt;/li&gt; &lt;li&gt;There will be a few drivers listed.&amp;nbsp; Select one and complete the wizard.&lt;/li&gt; &lt;li&gt;Log out and try to log back in using the smart card&lt;/li&gt; &lt;li&gt;Repeat the process until you find a driver that works for your smart card&lt;/li&gt;&lt;/ol&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9953592" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/Windows+7/">Windows 7</category><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/Smart+card/">Smart card</category><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/Remoting/">Remoting</category><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/Hyper_2D00_V/">Hyper-V</category><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/Authentication/">Authentication</category></item><item><title>Little Blessings</title><link>http://blogs.msdn.com/b/cgreene/archive/2009/08/04/little-blessings.aspx</link><pubDate>Tue, 04 Aug 2009 18:41:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9857200</guid><dc:creator>cgreene</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/cgreene/rsscomments.aspx?WeblogPostID=9857200</wfw:commentRss><comments>http://blogs.msdn.com/b/cgreene/archive/2009/08/04/little-blessings.aspx#comments</comments><description>&lt;p&gt;It’s nice to talk about things other than technology.&lt;/p&gt; &lt;p&gt;A few weeks ago my wife, Laura, and I went home to visit my family.&amp;nbsp; We ended up finding four puppies in the woods.&amp;nbsp; Between the four of them they easily had 200 ticks and so many flees it looked like their skin was crawling.&amp;nbsp; It was apparent they had been in the woods for a while.&amp;nbsp; They were all very malnourished.&amp;nbsp; One of the females in particular probably would not have made it more than a day or two.&amp;nbsp; Fortunately, the people at Jackson Square Animal Clinic in Oak Ridge, TN took excellent care of them and they began to perk up a few hours later with the help of my family.&lt;/p&gt; &lt;p&gt;We found homes for all but one.&amp;nbsp; So Laura and I felt like the final one would fit in great with our family.&amp;nbsp; My niece, Hannah, wanted to name Spotty.&amp;nbsp; My nephew, Hayden, couldn’t remember ‘Spotty’ so he called him Polka dot.&amp;nbsp; When we renamed him to Banjo, Hayden called him Alphabet.&lt;/p&gt; &lt;p&gt;So we decided his full name will be Banjo Alphabet Polka Dot Greene.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/cgreene/WindowsLiveWriter/LittleBlessings_970C/IMG_2115.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IMG_2115" border="0" alt="IMG_2115" src="http://blogs.msdn.com/blogfiles/cgreene/WindowsLiveWriter/LittleBlessings_970C/IMG_2115_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9857200" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/Doggies/">Doggies</category></item><item><title>FDCC Development Requirements</title><link>http://blogs.msdn.com/b/cgreene/archive/2009/07/08/fdcc-development-requirements.aspx</link><pubDate>Thu, 09 Jul 2009 00:38:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9824886</guid><dc:creator>cgreene</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/cgreene/rsscomments.aspx?WeblogPostID=9824886</wfw:commentRss><comments>http://blogs.msdn.com/b/cgreene/archive/2009/07/08/fdcc-development-requirements.aspx#comments</comments><description>&lt;p&gt;I posted an entry over on the FDCC Technet blog on how to best develop desktop applications.&amp;nbsp; It can be found &lt;a href="http://blogs.technet.com/fdcc/archive/2009/07/08/fdcc-vista-application-development-requirements.aspx"&gt;here&lt;/a&gt;.&amp;nbsp; It covers the most common problems encountered when developing applications on the FDCC.&lt;/p&gt; &lt;p&gt;Would you like to see other problems/issues discussed in future posts?&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9824886" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/FDCC/">FDCC</category></item><item><title>Creating Debug and Release SharePoint Solution Packages</title><link>http://blogs.msdn.com/b/cgreene/archive/2009/02/18/creating-debug-and-release-sharepoint-solution-packages.aspx</link><pubDate>Thu, 19 Feb 2009 02:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9432770</guid><dc:creator>cgreene</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/cgreene/rsscomments.aspx?WeblogPostID=9432770</wfw:commentRss><comments>http://blogs.msdn.com/b/cgreene/archive/2009/02/18/creating-debug-and-release-sharepoint-solution-packages.aspx#comments</comments><description>&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;I’m lazy.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It’s true.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;And I’m always looking for ways to be even lazier when developing software. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;I want my tools and build system to do as much heavy lifting and perform as many repetitive tasks as possible.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;In addition to being lazy, I’m also human which means that I occasionally make mistakes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;So I want to let my tools to provide guardrails while allowing me to minimize the amount of mouse and keyboard input.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;To briefly sum it up, I want to minimize my workload and minimize mistakes.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;This is the first of hopefully many entries on that topic.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I’ll focus on SharePoint for now since that’s where I spend the greatest amount of time and there are many repetitive tasks.&lt;S&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/S&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This post demonstrates how to create Debug and Release SharePoint Solution Packages.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;There are several other enhancements I’ve made to enable my laziness, but I’ve left most of them out of here to stay focused on the topic.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I’ll try to cover the other enhancements in future posts. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;I learned how to build SharePoint solutions using this method from Ted Pattison. (See &lt;A class="" title="Creating a Solution Package in Windows SharePoint Services 3.0" href="http://msdn.microsoft.com/en-us/library/bb466225.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/bb466225.aspx"&gt;Creating a Solution Package in Windows SharePoint Services 3.0&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;)&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;I’ve stuck with it because it has always worked for me.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The only problem is that the path to the Debug or Release assembly has been hard coded in the DDF.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Furthermore, I also use Team Foundation Server for source control and I don’t want to check in/check out my DDF every time I have to make this change.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;But because I’m lazy and prone to making mistakes, I want to avoid any manual input and use Visual Studio’s Solution Configuration to build the Solution Package with the correct output assembly.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;(See &lt;A class="" title="Build Configurations" href="http://msdn.microsoft.com/en-us/library/kkz9kefa.aspx" mce_href="http://msdn.microsoft.com/en-us/library/kkz9kefa.aspx"&gt;Build Configurations&lt;/A&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face=Calibri size=3&gt;).&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;The idea is that if I want to create a WSP that contains the Debug assembly, I just set the correct solution configuration and build my project.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Or if I want a WSP that contains the Release assembly, I just set the solution configuration to Release and build the project.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;All of this should only take 3 or 4 clicks of the mouse. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I automate the creation of my SharePoint solution package any time build.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Thus, I have a custom MSBuild Target that calls MakeCab.exe when my Visual Studio 2008 project builds.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I derived this from the work of Andrew Connell.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; (&lt;/SPAN&gt;See &lt;A class="" title="Automating Solution Package Creation for Windows SharePoint Services by Using MSBuild" href="http://msdn.microsoft.com/en-us/library/cc441431.aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc441431.aspx"&gt;Automating Solution Package Creation for Windows SharePoint Services by Using MSBuild&lt;/A&gt;)&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;My Targets file looks something like this:&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;?&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;xml&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;version&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;1.0&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;encoding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;utf-8&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;?&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;DefaultTargets&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;BuildSharePointPackage&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;xmlns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;http://schemas.microsoft.com/developer/msbuild/2003&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;BuildSharePointSolutionPackage&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Exec&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Command&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;"&lt;SPAN style="COLOR: blue"&gt;MakeCab.exe /D BuildType=$(ConfigurationName) /F Solution\cab.ddf&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt; /&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Target&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none"&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;...&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: #a31515; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;Project&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: blue; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;BuildSharePointSolutionPackage is a relatively simple Target.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It just calls MakeCab with a few arguments.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Variables are passed in with “&lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;/D&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;” followed by a &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;VariableName=Value&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; format.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;BuildType is the name of a variable passed into MakeCab.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;Its value is set to &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;$(ConfigurationName)&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; which is an environment variable that Visual Studio 2008 replaces at build-time with “Debug” or “Release”.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;/F Solution\cab.ddf tells MakeCab to where to find the DDF relative to the project directory.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;Last point on the Targets file: If you’re paying close attention you might have noticed a slight difference between my targets file and Andrew Connell’s.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I’m lazier than he is, so did not install the CabSDK or set a PropertyGroup to the path of MakeCab since it already ships with Windows Server 2003 and Windows Server 2008 and is in the path.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Now, let’s move on to the DDF.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;It looks like this:&lt;BR&gt;&lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;&lt;FONT size=3&gt;;Sample DDF&lt;BR&gt;.Set DiskDirectoryTemplate=CDROM&lt;BR&gt;.Set UniqueFiles=”ON”&lt;BR&gt;.Set DiskDirectory1=Package&lt;BR&gt;.Set CabinetNameTemplate=Sample.wsp&lt;BR&gt;&lt;BR&gt;Solution\manifest.xml&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 3"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;manifest.xml&lt;BR&gt;TEMPLATE\FEATURES\Sample\feature.xml&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;Sample\feature.xml&lt;BR&gt;TEMPLATE\REATURES\Sample\types.xml&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Sample\types.xml&lt;BR&gt;bin\%BuildType%\Sample.dll&lt;SPAN style="mso-tab-count: 1"&gt; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="mso-tab-count: 1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Sample.dll&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;The last line of the DDF contains the &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;%BuildType%&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; variable to the path of the output assembly.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;When the BuildSharePointSolutionPackage target calls MakeCab and passes in the BuildType variable, the last line becomes:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;bin\Debug\Sample.dll&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;Sample.dll &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;OR&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;bin\Release\Sample.dll&lt;SPAN style="mso-tab-count: 2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;Sample.dll&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;With this infrastructure in place, simply select a Debug or Release configuration from Visual Studio 2008 and then kick off a build. &lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;The BuildSharePointSolutionPackage target will take care of everything else.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT size=3&gt;&lt;FONT face=Calibri&gt;One final caveat:&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;When passing custom variables to the MakeCab command line, you will not be able to use &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;.OPTION EXPLICIT&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; or &lt;/FONT&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'"&gt;.Define&lt;/SPAN&gt;&lt;FONT face=Calibri&gt; in your .DDF.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;I verified with a few guys from the product group.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 10pt"&gt;&lt;FONT face=Calibri size=3&gt;So there you go.&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;We set up our Visual Studio 2008 project to create Debug and Release builds of a SharePoint Solution Package.&lt;/FONT&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9432770" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/MSBuild/">MSBuild</category><category domain="http://blogs.msdn.com/b/cgreene/archive/tags/SharePoint/">SharePoint</category></item></channel></rss>