本文介绍了将Lightswitch项目从VS2012转换为VS2015的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个内置于VS2012并在构建服务器上使用MSBuild的灯光开关项目。

We have a light switch project that built in VS2012 and using MSBuild on a build server.

此项目已转换为VS2015。在构建服务器上,它在VS中构建良好,但在使用msbuild时会出现以下错误:

This project has been converted to VS2015. On the build server it builds fine in VS but gives the following errors when using msbuild:

" D:\scm \ Software \Licensing\PP.Licensing.PPLicenseManager \\ \\Client\Client.csproj" (默认目标)(8) - >
$
(LSResourceGenerators目标) - > 

  C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018 :"LSResourceGeneratorsTask":任务意外失败。 [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:System.IO.FileNotFoundException:无法在以下位置找到根项目文件此位置:{0} [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86 )\ MSBuild\Microsoft \ VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:文件名:'D:\\ \\ scm \ Lexence \Licensing\PP.Licensing.PPLicenseManager'[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ LightSwitch \\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.GetRootProjectFile(String
projectPath)[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild \ Microsoft &\\VisualStudio \v14.0 \ LightSwitch\v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets (217,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.Create(String cacheDirectorySubPath,
VsExportProvisionScope scope,IEnumerable`1 inputStreams,IEnumerable`1 serviceStreams,String projectPath,IEnumerable`1 externalDataSources,TaskLoggingHelper log)[D:\\ \\ scm \ Lexence \Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.BuildTaskBase.EnsureCommandLineBuildContainer()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSGeneratorsTask.RunGeneratorsInNonIdeScenario()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSGeneratorsTask.ExecuteCore()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSResourceGeneratorsTask.ExecuteCore()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.BuildTask.Execute()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(217,5):错误MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]

C:\Program Files(x86)\ MSBuild \ Microsoft &\\VisualStudio \v14.0 \ LightSwitch\v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets (217,5):错误MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder。< ExecuteInstantiatedTask> d__26.MoveNext()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Client\Client.csproj]



$
" D:\scm \ Language &\\Licensing\pplicense.sln" (默认目标)(1) - >
$
" D:\scm \ Lexence \Licensing\PP.Licensing.PPLicenseManager \PP.Licensing.PPLicense.lsxproj" (默认目标)(7) - >

" D:\scm\Licence \Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj" (默认目标)(10:2) - >
$
(LSSvcGenerators目标) - > 

  C:\Program Files(x86)\ MSBuild\Microsoft \ VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018 :"LSSvcGeneratorsTask":任务意外失败。 [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild \ Microsoft \ VisualStudio \v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:System.IO.FileNotFoundException:无法在以下位置找到根项目文件此位置:{0} [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86 )\ MSBuild\Microsoft \ VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:文件名:'D:\\ \\ scm \ Lexence \Licensing\PP.Licensing.PPLicenseManager'[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ LightSwitch \\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:&NBSP;   at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.GetRootProjectFile(String
projectPath)[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild \ Microsoft &\\VisualStudio \v14.0 \ LightSwitch\v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets (168,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.Create(String cacheDirectorySubPath,
VsExportProvisionScope scope,IEnumerable`1 inputStreams,IEnumerable`1 serviceStreams,String projectPath,IEnumerable`1 externalDataSources,TaskLoggingHelper log)[D:\\ \\ scm \ Lexence \Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.BuildTaskBase.EnsureCommandLineBuildContainer()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSGeneratorsTask.RunGeneratorsInNonIdeScenario()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSGeneratorsTask.ExecuteCore()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSSvcGeneratorsTask.ExecuteCore()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.BuildTask.Execute()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild\Microsoft\VisualStudio \v14.0 \ LightSwitch \v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets(168,5):错误MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]

C:\Program Files(x86)\ MSBuild \ Microsoft &\\VisualStudio \v14.0 \ LightSwitch\v5.0 \ Microsoft.LightSwitch.Build.Tasks.targets (168,5):错误MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder。< ExecuteInstantiatedTask> d__26.MoveNext()[D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager \Server\Server.csproj]



  &NBSP; 0警告

  &NBSP; 2错误

"D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj" (default target) (8) ->
(LSResourceGenerators target) -> 
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018: The "LSResourceGeneratorsTask" task failed unexpectedly. [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018: System.IO.FileNotFoundException: Unable to find root project file at this location: {0} [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018: File name: 'D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager' [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.GetRootProjectFile(String projectPath) [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.Create(String cacheDirectorySubPath, VsExportProvisionScope scope, IEnumerable`1 inputStreams, IEnumerable`1 serviceStreams, String projectPath, IEnumerable`1 externalDataSources, TaskLoggingHelper log) [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.BuildTaskBase.EnsureCommandLineBuildContainer() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSGeneratorsTask.RunGeneratorsInNonIdeScenario() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSGeneratorsTask.ExecuteCore() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSResourceGeneratorsTask.ExecuteCore() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.BuildTask.Execute() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(217,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Client\Client.csproj]


"D:\scm\Licence\Licensing\pplicense.sln" (default target) (1) ->
"D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\PP.Licensing.PPLicense.lsxproj" (default target) (7) ->
"D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj" (default target) (10:2) ->
(LSSvcGenerators target) -> 
  C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018: The "LSSvcGeneratorsTask" task failed unexpectedly. [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018: System.IO.FileNotFoundException: Unable to find root project file at this location: {0} [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018: File name: 'D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager' [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.GetRootProjectFile(String projectPath) [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.CommandLineBuildContainerFactory.Create(String cacheDirectorySubPath, VsExportProvisionScope scope, IEnumerable`1 inputStreams, IEnumerable`1 serviceStreams, String projectPath, IEnumerable`1 externalDataSources, TaskLoggingHelper log) [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.BuildTaskBase.EnsureCommandLineBuildContainer() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSGeneratorsTask.RunGeneratorsInNonIdeScenario() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSGeneratorsTask.ExecuteCore() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.CodeGen.LSSvcGeneratorsTask.ExecuteCore() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.LightSwitch.BuildTasks.Common.BuildTask.Execute() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\LightSwitch\v5.0\Microsoft.LightSwitch.Build.Tasks.targets(168,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() [D:\scm\Licence\Licensing\PP.Licensing.PPLicenseManager\Server\Server.csproj]

    0 Warning(s)
    2 Error(s)

任何想法可能出错?

谢谢

Ian




推荐答案

根据你的描述,这个通过Visual Studio构建的项目很好,但在MSBuild中失败了。我认为这个问题应该与MSBuild更相关。

According to your description, this project build through Visual Studio is fine, but failed in MSBuild. I think this problem should more related to MSBuild.

我帮助您将此线程移至MSBuild论坛以获得更好的帮助。感谢您的理解。

I help you move this thread to MSBuild forum for a better help. Thanks for your understanding.

最好的问候,

Weiwei

Best Regards,
Weiwei


这篇关于将Lightswitch项目从VS2012转换为VS2015的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 17:09