我已经尝试按照上提供的步骤将virtocommerce部署到azurehttp://docs.virtocommerce.com/display/vc1devguide/Source+代码+Azure+部署,但我在构建过程中遇到了一些错误。。。
MSBUILD 4.0 Path = C:WindowsMicrosoft.NETFrameworkv4.0.30319
03/03/2015 17:21:12 - Solution Build: In progress
Version: 1.0.62.1721
Microsoft (R) Build Engine version 4.0.30319.33440
[Microsoft .NET Framework, version 4.0.30319.34014]
2015年3月3日17:21:12开始构建。
1>Project "C:codegithubVirtoCommerceCommunityvc-community-masterVirtoCommerce.sln" on node 1 (clean target(s)).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
ValidateProjects:
The project "Performance.FunctionalTests" is not selected for building in solution configuration "Release|Any CPU".
The target "MSDeployPublish" listed in a BeforeTargets attribute at "C:codegithubVirtoCommerceCommunityvc-community-masterpackagesMicrosoft.Web.WebJobs.Publish.1.0.2toolswebjobs.wap.targets (89,11)" does not exist in the project, and will be ignored.
The target "MSDeployPublish" listed in an AfterTargets attribute at "C:codegithubVirtoCommerceCommunityvc-community-masterpackagesMicrosoft.Web.WebJobs.Publish.1.0.2toolswebjobs.wap.targets (156,11)" does not exist in the project, and will be ignored.
1>Project "C:codegithubVirtoCommerceCommunityvc-community-masterVirtoCommerce.sln" (1) is building "C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWorkerRolesSchedulerAzureSchedulerAzureScheduler.ccproj" (61) on node 7 (Clean target(s)).
C: \code\github\VirtoCommerceCommunity\vc community master\src\Azure\WorkerRoles\Scheduler\AzureScheduler\Azure Scheduler.ccproj(68,3):错误MSB4019:未找到导入的项目"C:\Program Files(x86)\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets"。确认声明中的路径正确,并且文件存在于磁盘上。
61>Done Building Project "C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWorkerRolesSchedulerAzureSchedulerAzureScheduler.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:codegithubVirtoCommerceCommunityvc-community-masterVirtoCommerce.sln" (1) is building "C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWebRolesFrontendCommerceSiteCommerceSite.ccproj" (62) on node 2 (Clean target(s)).
62>C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWebRolesFrontendCommerceSiteCommerceSite.ccproj(71,3): error MSB4019: The imported project "**C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Windows Azure Tools2.4Microsoft.WindowsAzure.targets**" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
62>Done Building Project "C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWebRolesFrontendCommerceSiteCommerceSite.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:codegithubVirtoCommerceCommunityvc-community-masterVirtoCommerce.sln" (1) is building "C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWorkerRolesSearchElasticSearchElasticSearch.ccproj" (66) on node 6 (Clean target(s)).
66>C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWorkerRolesSearchElasticSearchElasticSearch.ccproj(70,3): error MSB4019: The imported project "**C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Windows Azure Tools2.4Microsoft.WindowsAzure.targets**" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
66>Done Building Project "C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWorkerRolesSearchElasticSearchElasticSearch.ccproj" (Clean target(s)) -- FAILED.
1>Project "C:codegithubVirtoCommerceCommunityvc-community-masterVirtoCommerce.sln" (1) is building "C:codegithubVirtoCommerceCommunityvc-community-mastersrcExtensionsJobsSchedulerConsoleSchedulerConsole.csproj" (69) on node 1 (Clean target(s)).
69>C:codegithubVirtoCommerceCommunityvc-community-masterpackagesMicrosoft.Web.WebJobs.Publish.1.0.2toolswebjobs.console.targets(25,3): error MSB4019: The imported project "C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0WebApplicationsMicrosoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:codegithubVirtoCommerceCommunityvc-community-mastersrcExtensionsJobsSchedulerConsoleSchedulerConsole.csproj]
69>Done Building Project "C:codegithubVirtoCommerceCommunityvc-community-mastersrcExtensionsJobsSchedulerConsoleSchedulerConsole.csproj" (Clean target(s)) -- FAILED.
1>Done Building Project "C:codegithubVirtoCommerceCommunityvc-community-masterVirtoCommerce.sln" (clean target(s)) -- FAILED.
Build FAILED.
"C:codegithubVirtoCommerceCommunityvc-community-masterVirtoCommerce.sln" (clean target) (1) ->
"C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWorkerRolesSchedulerAzureSchedulerAzureScheduler.ccproj" (Clean target) (61) ->
C:codegithubVirtoCommerceCommunityvc-community-mastersrcAzureWorkerRolesSchedulerAzureSchedulerAzureScheduler.ccproj(68,3): error MSB4019: The imported project "C:Program Files (x86)MSBuildMicrosoftVisualStudiov11.0Windows Azure Tools2.4Microsoft.WindowsAzure.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
生成失败的
At C:codegithubVirtoCommerceCommunityvc-community-mastersrcextensionsSetupVirtoCommerce.PowerShellazure-deploy.ps1:445 char:11
+ throw "Build Failed"
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Build Failed:String) [], RuntimeException
+ FullyQualifiedErrorId : Build Failed
我在不同的计算机(Windows 8.1和Windows Server 2012)上尝试过,都使用了Visual Studio 2013,但发现了相同的错误。。。有趣的是,在这两台计算机上,目录C:\Program Files(x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools都不存在。。。Azure Tools仅存在于\VisualStuion\v12.0目录中。。。
我们该如何解决这个问题?
提前感谢!
这个问题似乎与msbuild如何与VS.NET 2013打包有关(http://blog.maskalik.com/msbuild/2014/03/04/changes-in-msbuild-with-visual-studio-2013/)。为了使powershell部署能够开箱即用,需要安装VS.NET 2012。解决方法是修改azure-deploy.ps1以指向VS.NET 2013中的MSBuild,而不是.NET SDK。
因此,从更改线路426
$global:buildexe_path = (Get-ItemProperty -Path "HKLM:SOFTWAREMicrosoftMSBuildToolsVersions4.0" -Name MSBuildToolsPath).MSBuildToolsPath
至(简单地将4.0更改为12.0)
$global:buildexe_path = (Get-ItemProperty -Path "HKLM:SOFTWAREMicrosoftMSBuildToolsVersions12.0" -Name MSBuildToolsPath).MSBuildToolsPath
一旦通过我们的CI,它将被包含在下一个补丁中。