我不能再建立我的申请了,
每次我试图编译时,都会出现以下错误。
错误MSB6006:与代码1一起退出的"lc.exe“
我从未更改过Microsoft.Common.CurrentVersion.targets
文件(或与MSBuild相关的任何其他文件)中的任何内容。
文件的完整路径:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets
出现错误的行:
<LC
Sources="@(_LicxFile)"
LicenseTarget="$(TargetFileName)"
OutputDirectory="$(IntermediateOutputPath)"
OutputLicense="$(IntermediateOutputPath)$(TargetFileName).licenses"
ReferencedAssemblies="@(ReferencePathWithRefAssemblies);@(ReferenceDependencyPaths)"
NoLogo="$(NoLogo)"
ToolPath="$(LCToolPath)"
SdkToolsPath="$(TargetFrameworkSDKToolsDirectory)"
EnvironmentVariables="$(LCEnvironment)"
MSBuildArchitecture="$(LCMSBuildArchitecture)"
TargetFrameworkVersion="$(TargetFrameworkVersion)"
>
这里的主要问题是,我可以编译所有其他应用程序,但不是我的最重要的应用程序,它是用C#框架4.7.2用.NET WPF编写的。
有人知道我为什么不能编译解决方案吗?
发布于 2020-03-09 09:17:02
错误MSB6006:与代码1一起退出的“lc.exe”
此错误意味着您的项目有错误而不是Microsoft.Common.CurrentVersion.targets
文件。
实际上,要查看特定的错误,应该将构建输出日志设置为Diagnostic/Detailed by Tools
-->Options
-->Projects and Solutions
-->Build and Run
-->set MSBuild project build output verbosity
to Diagnostic/Detailed
。然后,当您再次构建,您可以看到有关它的详细信息。
你可以试着遵循以下几种方法:
update-Package -reinstall
下的包管理控制台。Properties
-->Build Event
),post(pre)-build事件(右键单击您的-build),请检查该命令是否有错误。,如果可能的话,请与我们共享您的WPF项目的文件,以便快速解决您的问题。此外,还有关于此错误的类似的问题。
https://stackoverflow.com/questions/60561531
复制相似问题