Tamir Dresher

Using extension SDKs in without installing it

29 Sep 2014

This post was originally published on 29 Sep 2014 at http://blogs.microsoft.co.il/iblogger/2014/09/29/using-extension-sdks-without-installing/

In my Windows 8.1 project I wanted to use the SQLite PCL library. I Installed it from nuget and everything worked great so I committed the changes to the source control and moved on.

When my colleague pulled the changes, it didn’t compiled.
The nuget package installed an extension SDK for me but apparently it doesn’t install it when you restore the package (very bad for CI).

So it seems that the only solution is putting the SDK inside our 3rdParty folder and putting it as part of our source control, but unfortunately this wasn’t an easy task – so im writing about it סמיילי

fortunately Sara Silva wrote a good post about it – http://www.saramgsilva.com/index.php/2013/extension-sdks-in-build-server-without-installing-it/

I will simply summarize:

  1. you need to add the SDK into your 3rd party folder in the same structure as it is in the Microsoft SDKs folder – [3rdParty]\Windows\[v8.0 | v8.1]\ExtensionSDKs\[SDKName]\[SDKVersion]\…
  2. you need to add to the project *.csproj file the redirection (actually we are adding the new path while maintaining the old one as well)
    Note: you must add it after the line :

    <Import Project="$(MSBuildExtensionsPath)MicrosoftWindowsXamlv11.0Microsoft.Windows.UI.Xaml.CSharp.targets" /><Import Project="$(MSBuildExtensionsPath)MicrosoftWindowsXamlv11.0Microsoft.Windows.UI.Xaml.CSharp.targets" />

    Like so:

          $(SolutionDir)[3rdParty]\Windows\[v8.0 | v8.1]\ExtensionSDKs\[SDKName]\[SDKVersion]\…;$(SDKReferenceDirectoryRoot)
  3. Commit the changes and youre done.

Thank you Sara Silva – http://www.saramgsilva.com/