TS文件中的任何错误均会导致msbuild错误MSB4018:“ VsTsc”任务意外失败

时间:2019-09-12 19:25:21

标签: msbuild-task typescript1.6

当TS文件中存在错误时,msbuild / tsc不再提供错误的文件,而是抛出了一个通用的“无法执行”错误。

通过以下方式进行构建: msbuild website.csproj -t:CompileTypeScript

错误:


System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "TypeScript.Tasks.Strings.resources" was correctly embedded or linked into assembly "TypeScript.Tasks" at compile time, or that all the satellite assemblies required are loadable and fully signed.
at System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(String fileName)
at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(CultureInfo culture, Dictionary`2 localResourceSets, Boolean tryParents, Boolean createIfNotExists, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo requestedCulture, Boolean createIfNotExists, Boolean tryParents, StackCrawlMark& stackMark)
at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at TypeScript.Tasks.VsTsc.LogEventsFromTextOutput(String singleLine, MessageImportance messageImportance)
at Microsoft.Build.Utilities.ToolTask.LogMessagesFromStandardErrorOrOutput(Queue dataQueue, ManualResetEvent dataAvailableSignal, MessageImportance messageImportance, StandardOutputOrErrorQueueType queueType)
at Microsoft.Build.Utilities.ToolTask.HandleToolNotifications(Process proc)
at Microsoft.Build.Utilities.ToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
at Microsoft.Build.Utilities.ToolTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

tsc.exe版本1.6.2,.net 4.7,来自VS2017和VS2019的msbuild

TSC并没有改变……显然。没有对Microsoft.TypeScript.targets的更改。 CSProj进行了许多更改,我可以尝试回退以查看是否正在运行。

与VS2017唯一不同的是,VS2019仅会警告一次错误,并且仍会生成/更新输出JS / MAP文件,然后由于后续构建尝试未发生更改而跳过了编译。使用--noEmitOnError,我可以不断显示上述错误,而不必抑制它,因为我正在寻找并解决该错误。

0 个答案:

没有答案