大网数据广告活动
Web服务器与PHP

Could not load the file or assembly lc.exe

· 52CE 我爱测

This article describes the error (Could not transform licenses file into a binary resource) that occurs when you build an application in Visual Studio 2017, and provides a workaround.

This article helps you resolve the error (Could not transform licenses file into a binary resource) that occurs when you build an application in Microsoft Visual Studio 2017.

Original product version:   Visual Studio 2017
Original KB number:   4022463

Symptoms

When you build an application in Visual Studio 2017, you receive the following error message:

Licenses.licx: Could not transform licenses file into a binary resource. Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\lc.exe' or one of its dependencies. The specified file could not be found.

Cause

Visual Studio 2017 runs the .NET Framework License Compiler (lc.exe) to build license files (.licx files). The License Compiler refers to a particular registry for the installation path of the Software Development Kit (SDK) that's installed in the environment. Visual Studio 2017 can't find this registry because the location of the registry key and the folder structure of SDK are changed from the .NET Framework 4.6.1.

Workaround

To work around this issue, install the Windows SDK for the .NET Framework 3.5 SP1 so that Visual Studio can load the lc.exe file that's located in the Windows SDK installation path.

This workaround applies to Visual Studio 2017 version 15.2 or an earlier version installed on Windows 7 or later Windows versions.

Status

This problem is fixed in Visual Studio 2017 version 15.3.

Applies to

  • Visual Studio Professional 2017
  • Visual Studio Enterprise 2017
  • Visual Studio Express 2017 for Windows Desktop
  • Visual Studio Community 2017

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 04/23/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。