gpt4 book ai didi

.net-4.0 - Msbuild 失败,错误为 msb4064 和 msb4063

转载 作者:行者123 更新时间:2023-12-04 12:23:10 36 4
gpt4 key购买 nike

在使用 .NET 4.5 安装 Visual Studio 2012 后,我在使用 msbuild 构建时开始收到以下错误:

  • 错误 MSB4064:

  • The "SdkToolsPath" parameter is not supported by the "GenerateResource" task. Verify the parameter exists on the task, and it is a settable public instance property.


  • 错误 MSB4063:

  • The "GenerateResource" task could not be initialized with its input parameters. Project file header is as follows:


        <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">

    任何想法在 .NET 4.5 中进行了哪些可能导致上述错误的更改?

    最佳答案

    这是 C:\Windows\Microsoft.Net\v4.0.30319 中的 Microsoft.Common.targets 文件的问题。安装 Visual Studio 2012 后,此文件将发生更改。所做的更改之一是在有人将他们的机器升级到 Windows 8 的情况下“修复” GenerateResourceMSBuildRuntime(阅读第 2271 行的详细评论以了解详细信息)。我的修复只是在 Microsoft.Common.targets 文件中注释掉以下行

    <GenerateResourceMSBuildRuntime 
    Condition="'$(GenerateResourceMSBuildRuntime)' == '' and
    $([MSBuild]::DoesTaskHostExist(`$(TargetFrameworkAsMSBuildRuntime)`, `$(GenerateResourceMSBuildArchitecture)`))">$(TargetFrameworkAsMSBuildRuntime)</GenerateResourceMSBuildRuntime>

    关于.net-4.0 - Msbuild 失败,错误为 msb4064 和 msb4063,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12378051/

    36 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com