Matt Sigman

Hands-On Software Leader

Matt Sigman - Hands-On Software Leader

Telerik MSBuild Task could not find “LC.exe” using the SdkToolsPath

As of Q1 2015, the Telerik UI for ASP.NET AJAX suite uses the standard .NET licensing mechanism, which means that using the Telerik controls in design-time causes Visual Studio to add a license.licx to the solution. The .NET framework (lc.exe) will embed it in the assembly your WebApplication will be built for deployment. The license file is maintained by Visual Studio and contains information about all licensed components in the application (including non-Telerik products). [1]

You may receive an error when trying to build your solution

Task could not find “LC.exe” using the SdkToolsPath “” or the registry key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86″. Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed

step-3

You have two choices to resolve this error:

  1. Install the Windows SDK on your build server.
  2. Set a flag to tell MSBuild to ignore it. The rest of this post will focus on this solution.

Setting the MSBuild flag to ignore licenses.licx
In Visual Studio, navigate to the TFS Build definition for your project.

step-1

Right click and choose Properties, then click to the Process tab.

Expand the Advanced section and find the MSBuild Options line.step-2

Add this flag to the list:

/p:GenerateSerializationAssemblies=Off

And that’s it! Trigger a new build and you should not see the error anymore.

 

References
[1]: http://www.telerik.com/help/aspnet-ajax/introduction-license-file.html

Category: .NET

Your email address will not be published. Required fields are marked *

*