Could not find SDK SQLite.UWP.2015 when building UWP application using Hosted TFS pool

user1 picture user1 · May 6, 2016 · Viewed 7.1k times · Source

I have build a UWP application using Sqlite. On my local machine I had to install the following SQLite for Universal Windows Platform Visual Studio Extension to get it to build. I followed this blog when using sqlite on UWP

I am now trying to implement Continuous integration with Visual Studio Team Services (was Team Foundation Server Online).

I am using a Hosted pool to build my application but I get the following message:

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2049,5): error MSB3774: Could not find SDK "SQLite.UWP.2015, Version=3.12.2".

and it breaks the build.

How can I fix this on a hosted pool? I do not have physical access to the machine as this is managed by TFS online

EDIT:

After finding this is a library that is installed on my local machine (through the Visual Studio Extension) and so doesnt exist on my hosted machine meaning the reference is broken I am trying to add the respective files to source control and reference it directly from source control. But I have no idea what dll it is actually referencing as it doesnt say. The properties of the reference are as follows:

enter image description here

Answer

Dominik Weber picture Dominik Weber · Aug 8, 2016

Actually there is a simple solution that has worked perfectly for us:

Copy the Microsoft SDKs folder to your repo (or submodule).

Add this to the end of your csproj file:

<PropertyGroup>
  <SDKReferenceDirectoryRoot>$(MSBuildProjectDirectory)\..\..\..\..\Microsoft SDKs;$(SDKReferenceDirectoryRoot)</SDKReferenceDirectoryRoot>
</PropertyGroup>

From now on the build process will first check this directory for the required extensions and then fallback to the locally installed extensions. This works perfectly on VSTS hosted agents and doesn't require you to install all the extensions on every dev machine.