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:
- 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]\…
- 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" />
<PropertyGroup> <SDKReferenceDirectoryRoot> $(SolutionDir)[3rdParty]\Windows\[v8.0 | v8.1]\ExtensionSDKs\[SDKName]\[SDKVersion]\…;$(SDKReferenceDirectoryRoot) </SDKReferenceDirectoryRoot> </PropertyGroup>
- Commit the changes and youre done.
Thank you Sara Silva – http://www.saramgsilva.com/