I've been having an adventure with the new u-sql msbuild support, fighting dragons etc in the lands of "preview build".
I realised many of the gotchas were due to discovering inconsistencies between running the build in VS2017 v.s. running msbuild from the command line.
Against my better judgement I added some diagnostic messages by altering the nuget download directly: \packages\Microsoft.Azure.DataLake.USQL.SDK.1.3.1019-preview\build\runtime\USqlSDKBuild.targets
I realise now that USQLSDKPath doesn't override what version is used in visual studio.
And that USQLTargetType* isn't supported within visual studio at the time of writing.
*USQLTargetType is needed if you want to compile scripts without checking for pre-existing schema objects, to avoid a chicken and egg scenario.
The versions I've found on my machine are:
- C:\Users[user name]\AppData\Roaming\Microsoft\DataLake\MsBuild\1.0\
- C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\ADL Tools\2.3.3000.5\
- And the one installed via nuget relative to my sln.
Can I assume the first in AppData is installed as part of the Visual Studio installation and the second is the visual studio extension from the marketplace?
I've been battling for a few days on various elements so wondered how far others have got in this direction? I also realise this is in preview mode, so has rough edges.
Am I safe to alter:
<Import Project="UsqlSDKBuild.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true' And Exists('UsqlSDKBuild.targets')" />
<Import Project="$(USQLSDKPath)\UsqlSDKBuild.targets" Condition="'$(BuildingInsideVisualStudio)' != 'true' And !Exists('UsqlSDKBuild.targets') And '$(USQLSDKPath)' != '' And Exists('$(USQLSDKPath)\UsqlSDKBuild.targets')" />
<!-- backward compatible with IDE build -->
<Import Project="$(AppData)\Microsoft\DataLake\MsBuild\1.0\Usql.targets" Condition="'$(BuildingInsideVisualStudio)' == 'true'" />
To force using a later version in the IDE as well?