A colleague and I are collaborating on a custom configuration of Pro using the Pro SDK for .NET framework in Visual Studio, sharing a repository in GitHub. The configuration works on his set up, but when I build the solution a proConfigX file is not generated in the build--only the project.dll and .pdb files are built. If he manually shares his proConfigX file with me and I insert into my debug folder, the configuration will install and run properly, but if i make modifications and try to rebuild I still cannot build a proConfigX file, so the existing proConfigX pulls up the preexisting settings. If I delete the proConfigX file/installation, then the default Pro launch runs. No errors are generated in the debug process. The references are all connected. Any ideas as to why a proConfigX file is not building? Thanks in advance and please let me know if you need more information.
Couple of things to check:
1. Can you please check this folder to see if the Configuration was copied over: C:\Users\<UserName>\Documents\ArcGIS\AddIns\ArcGISPro\Configurations
2. Are you able to build an Add-in on this machine? If you create a simple add-in (no need to add any code) using the SDK template, do you see a similar problem where no esriAddinX file is created?
3. Finally, if you can open your csproj file for the configuration that fails to create the ProConfigX file, please check if these lines are there at the bottom:
<UsingTask AssemblyFile="C:\Program Files\ArcGIS\Pro\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.PackageAddIn" /> <UsingTask AssemblyFile="C:\Program Files\ArcGIS\Pro\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.CleanAddIn" /> <UsingTask AssemblyFile="C:\Program Files\ArcGIS\Pro\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.ConvertToRelativePath" /> <Import Project="C:\Program Files\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('C:\Program Files\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
Thanks so much for your response and for drawing my attention to the csproj file. That was the issue--my colleague is operating on an external drive, so all the assembly files shown in your snapshot were mapped to the D drive instead of the C. To resolve, I had to download the csproj file from git (external to visual studio), then edit the assembly file paths to the C drive, save and overwrite the existing corrupted csproj.user file, then open in visual studio and it finally works! Thanks again.
Glad that worked! Just for future use -
There is a Pro SDK tool called "Pro Fix References utility" that is available to solve these "reference" issues. (Issue that occur when you share projects and Pro is installed in different locations).
Here is the info on this utility: Pro Fix References Utility
You can install this utility from Visual Studio Market place.
Thanks for posting the update!
Thank you for that tip! I should also add that we added a line of code to the .gitignore file to ignore the custom .csproj file when saving changes to the repository so as not to interfere with my colleague's csproj file. I'm sure utilizing the Pro Reference fix would be a better workflow.
I do have the Pro SDK for .NET (Utilities) extension installed, however, I cannot find the Pro Fix References feature included in the Pro Fix Reference help snapshot from the project menu (snapshot below). Can you advise as to how to access this feature?
Just to confirm, this is a Pro SDK Configuration project, correct? And you using version 2.5?
I have found that the new Visual Studio versions implement some sort of "delay" loading of the 3rd party tools such as the Pro SDK utilities. Though it looks like you have checked the Project node context menu a few times, correct?
Thank you, that was it. I was accessing the main menu> project menu as opposed to the project context menu which contains the Pro Fix References. I will clone the respository on another pc and will attempt to use this to resolve the library references and assembly refs in the csproj. I will follow up if I have any issues.