如何在Win 8和VS2015上重建Enterprise Library 6 [英] How to rebuild Enterprise Library 6 on Win 8 and VS2015

查看:165
本文介绍了如何在Win 8和VS2015上重建Enterprise Library 6的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经自定义了企业库,现在想重建它,但是从VS2015的Developer Command Prompt执行BuildLibrary.bat(脚本文件夹)时遇到一些错误.

I have customized the Enterprise Library and now want to rebuild it, but I get some errors when executing the BuildLibrary.bat (Scripts folder) from Developer Command Prompt for VS2015.

环境:

  1. 赢8
  2. VS2015

两个问题:

1.)

无法加载文件或程序集 '文件:///C:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft. Build.Tasks.v12.0.dll

Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft. Build.Tasks.v12.0.dll

在我的系统上,我有一个较新的版本:

On my system I have a newer version:

Microsoft.Build.Tasks.v4.0.dll

Microsoft.Build.Tasks.v4.0.dll


2.)

"C:\ EntLib6Source \ Blocks \ EnterpriseLibrary.sln"(重建目标)(1) ->"C:\ EntLib6Source \ Blocks \ SemanticLogging \ Src \ SemanticLogging.Database \ SemanticLogging.Database.csproj" (重建目标)(53)-> "C:\ EntLib6Source \ Blocks \ TransientFaultHandling \ Source \ TransientFaultHandling \ TransientFaultHandling.csproj" (清理目标)(35:11)-> C:\ Program Files (x86)\ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ AppxPackage \ Microsoft.AppXPackage.Targets(283,22): 错误MSB4086:尝试对"10.0.11000.0"进行数字比较 条件为"10.0.11000.0"而不是数字的值 '$(TargetPlatformVersion)'> = '10 .0.11000.0'". [C:\ EntLib6Source \ Blocks \ TransientFaultHandling \ Source \ TransientFaultHandling \ TransientFaultHandling.csproj]

"C:\EntLib6Source\Blocks\EnterpriseLibrary.sln" (Rebuild target) (1) -> "C:\EntLib6Source\Blocks\SemanticLogging\Src\SemanticLogging.Database\SemanticLogging.Database.csproj" (Rebuild target) (53) -> "C:\EntLib6Source\Blocks\TransientFaultHandling\Source\TransientFaultHandling\TransientFaultHandling.csproj" (Clean target) (35:11) -> C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(283,22): error MSB4086: A numeric comparison was attempt ed on "10.0.11000.0" that evaluates to "10.0.11000.0" instead of a number, in condition "'$(TargetPlatformVersion)' >= '10.0.11000.0'". [C:\EntLib6Source\Blocks \TransientFaultHandling\Source\TransientFaultHandling\TransientFaultHandling.csproj]


"C:\ EntLib6Source \ Blocks \ EnterpriseLibrary.sln"(重建目标)(1) ->"C:\ EntLib6Source \ Blocks \ SemanticLogging \ Src \ SemanticLogging \ SemanticLogging.csproj" (重建目标)(52)->(CheckPrerequisites目标)->
C:\ EntLib6Source \ Blocks.nuget \ nuget.targets(71,9):错误MSB4175:The 无法从程序集中加载任务工厂"CodeTaskFactory" "C:\ Windows \ Micros oft.NET \ Framework \ v4.0.30319 \ Microsoft.Build.Tasks.v12.0.dll".可以 无法加载文件或程序集 '文件:///C:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft. Build.Tasks.v12.0.dll"或其依赖项之一.系统无法 查找指定的文件. [C:\ EntLib6Source \ Blocks \ SemanticLogging \ Src \ SemanticLogging \ Seman ticLogging.csproj]

"C:\EntLib6Source\Blocks\EnterpriseLibrary.sln" (Rebuild target) (1) -> "C:\EntLib6Source\Blocks\SemanticLogging\Src\SemanticLogging\SemanticLogging.csproj" (Rebuild target) (52) -> (CheckPrerequisites target) ->
C:\EntLib6Source\Blocks.nuget\nuget.targets(71,9): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Windows\Micros oft.NET\Framework\v4.0.30319\Microsoft.Build.Tasks.v12.0.dll". Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft. Build.Tasks.v12.0.dll' or one of its dependencies. The system cannot find the file specified. [C:\EntLib6Source\Blocks\SemanticLogging\Src\SemanticLogging\Seman ticLogging.csproj]

推荐答案

好吧,我通过重写toolsversion解决了它. 没有使用BuildLibrary.bat.

Ok I solved it by overriding the toolsversion. Didn't use the BuildLibrary.bat.

直接通过以下开关执行msbuild:

Executed msbuild directly with the following switches:

msbuild.exe EnterpriseLibrary.sln/tv:14.0/p:Configuration = Debug

msbuild.exe EnterpriseLibrary.sln /tv:14.0 /p:Configuration=Debug

如果要使用Release版本,请将debug替换为release.

If you want the Release version, replace debug with release.

P.S .: 我所做的就是将所有项目升级为使用.NET 4.6.1. 但是我认为,覆盖电视就足够了.

P.S.: What I also did, was upgrading all projects to use .NET 4.6.1. But I think, overriding the tv is enough.

这篇关于如何在Win 8和VS2015上重建Enterprise Library 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆