1

I'm having the same problem as others have but with a twist: It's a web project without a project file.

So, given this error message:

C:\MySolution\My.Project.Web\licenses.licx: Could not transform licenses file into a binary resource. Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\lc.exe' or one of its dependencies. The system cannot find the file specified.

(There is indeed no "file:///C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\lc.exe", but there is a subdirectory in "bin" called "NETFX 4.5.1 Tools" where lc.exe is. Moving its contents to "bin" had no effect)

Where can I define TargetFrameworkSDKToolsDirectory in web.config so I can point it to the correct path?

Using: Windows 10 64x, Visual Studio Community Edition 2015

Community
  • 1
  • 1
MPelletier
  • 16,256
  • 15
  • 86
  • 137

1 Answers1

1

In app.config you can define alongside the TargetFrameworkVersion, something like this (my example from .NET 4.6.2)

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
    <PropertyGroup>
      <AssemblyName>xxx</AssemblyName>
      <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
      <TargetFrameworkSDKToolsDirectory>C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools</TargetFrameworkSDKToolsDirectory>
      ... etc ...
    </PropertyGroup>
... etc ...

Assume it works the same for .NET 4.5 and web.config.

See also Task could not find "LC.exe" using SdkToolsPath

Community
  • 1
  • 1
jlb83
  • 1,988
  • 1
  • 19
  • 30