将 Reinforced.Typings 从 1.3.7 升级到 1.4.0 会导致构建崩溃

Upgrading Reinforced.Typings to 1.4.0 from 1.3.7 crashes build

我刚刚通过 NuGet 将名为 "ViewModels" 的 C# 4.5.1 .NET 库升级到 Reinforced.Typings lib/tool 的最新 1.4.0 版本(该工具允许转换我的 C# 到 .ts 文件)。

升级后,我拒绝覆盖 .xml 配置文件,并手动将其与新提议的 readme.txt 文件进行比较,该文件现在具有 .xml 默认值,以查看是否有任何主要引入了变化。据我所见,xml 标签丢失了表示构建过程、工具版本等的属性,更准确地说,这些属性在 1.4.0 中被排除:

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

所以,现在构建崩溃了,通知我将它们带回来,错误消息如下:

Severity Description File Code Project Line Suppression State Error The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. C:\REDACTED\ViewModels\Reinforced.Typings.settings.xml ViewModels 2

将之前的 xml 属性添加到标签中解决了这个问题并打开了两个似乎与我无法超越的 Reinforced.Typings 库的 RtCli 相关的新问题,错误是:

Severity Description File Code Project Line Suppression State Error The "RtCli" task could not be initialized with its input parameters. ViewModels

和...

Severity Description File Code Project Line Suppression State Error The "BuildDirectory" parameter is not supported by the "RtCli" task. Verify the parameter exists on the task, and it is a settable public instance property. ViewModels

我很高兴看到该工具的升级,但目前我正在恢复到 1.3.7,因为我在那里没有遇到这些问题。

如果有人(嘿,作者)可以帮助我解决这个问题,那就太好了。

请尝试清理本地 NuGet 缓存。通常它位于 C:\Users\%username%\.nuget\packages\。从那里删除 reinforced.typings 目录。之后,重新安装 Reinforced.Typings.

由于某种原因,您似乎有旧版本的 RT 集成 MSBuild 任务 (source)。有时会发生 MSBuild 进程锁定任务程序集并且不允许删除其 .dll。也尝试从任务管理器中终止 MSBuild 进程。

关于 .settings.xsml header - 我会在 readme.txt 中提到它,但实际上它在 VS2017 (msbuild 15) 中工作正常。