TFS Build Server Requires Pro Install

820
2
Jump to solution
05-01-2017 09:14 AM
rbae
by
New Contributor III

I have set up a build server for TFS 2017 following the instructions here: ProConcepts Advanced Topics · Esri/arcgis-pro-sdk Wiki · GitHub .

However, it is still asking for an ArcGIS Pro install folder on the build server.  Does anyone know what step I might be missing?

2017-05-01T15:54:25.7009038Z ##[error]C:\Program Files\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets(77,5):
Error MSB4018: The "PackageAddIn" task failed unexpectedly.
System.InvalidOperationException: Install location of ArcGIS Pro cannot be found. Please check your registry for HKLM\SOFTWARE\ESRI\ArcGISPro\InstallDir
at proapp_sdk_MSBuild.MSIHelper.GetInstallDirAndVersionFromReg()
at proapp_sdk_MSBuild.MSIHelper.GetInstallDirAndVersion()
at proapp_sdk_MSBuild.PackageAddIn.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Thanks,

-Ryan


					
				
			
			
				
			
			
				
0 Kudos
1 Solution

Accepted Solutions
UmaHarano
Esri Regular Contributor

Hi Ryan,

Based on the error you are getting, can you please check the value of the "PackageAction" property in your .csproj file?  To build an add-in without installing ArcGIS Pro, this value needs to be "BuildZipPostProcess".  Check to see if this step (copied from the wiki page) is correct in your .csproj:

  1. Modify the add-in/configuration .csproj or .vbproj file to change the custom "PackageAction":
  • Find the element called <PackageAction>BuildDefault</PackageAction> in the .csproj or .vbproj file.
  • Change its value from BuildDefault to BuildZipPostProcess.
  • Save the project file and reload the project.

Before

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">   <PackageAction>BuildDefault</PackageAction> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">   <PackageAction>BuildDefault</PackageAction> </PropertyGroup>

After

 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">   <PackageAction>BuildZipPostProcess</PackageAction> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">   <PackageAction>BuildZipPostProcess</PackageAction> </PropertyGroup>

Thanks

Uma

View solution in original post

2 Replies
UmaHarano
Esri Regular Contributor

Hi Ryan,

Based on the error you are getting, can you please check the value of the "PackageAction" property in your .csproj file?  To build an add-in without installing ArcGIS Pro, this value needs to be "BuildZipPostProcess".  Check to see if this step (copied from the wiki page) is correct in your .csproj:

  1. Modify the add-in/configuration .csproj or .vbproj file to change the custom "PackageAction":
  • Find the element called <PackageAction>BuildDefault</PackageAction> in the .csproj or .vbproj file.
  • Change its value from BuildDefault to BuildZipPostProcess.
  • Save the project file and reload the project.

Before

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">   <PackageAction>BuildDefault</PackageAction> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">   <PackageAction>BuildDefault</PackageAction> </PropertyGroup>

After

 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">   <PackageAction>BuildZipPostProcess</PackageAction> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">   <PackageAction>BuildZipPostProcess</PackageAction> </PropertyGroup>

Thanks

Uma

rbae
by
New Contributor III

Uma,

You are absolutely right - I should have examined the error log a little closer.  I had 2 projects in the branch (One AddIn and one Configuration) and both projects were being built on check-in.  One had the correct settings and was working, but the other project with the incorrect settings did not.  

Thank you for your help.

-Ryan

0 Kudos