Is there a fix for the 'Unable to find ArcGISRuntime deployment folder' error?

4365
9
03-29-2018 10:19 AM
RickWebster
New Contributor

A major project of mine has developed this error.  This started when I was working in Visual Studio 2015.  I have since reloaded the Nuget packages, reloaded the SDK, Installed the newest version of Visual Studio (2017), built a brand new trivial app that just tries to display a map in a user control and more or less tried everything.  There was a recent question about it, but it wasn't helpful.   Nothing I do fixes the problem...  

This is at design time and it's a visual basic app.  Anything I try all boils down to the same error...

Error initializing ArcGISRuntimeEnvironment. Unable to find ArcGISRuntime deployment folder. Ensure there is a folder named "arcgisruntime100.2" in the same folder as your application executable, or set ArcGISRuntimeEnvironment.InstallPath to reference an alternative location. The deployment folder must contain sub-folders matching the process architecture of your application.

The deployment folder is there.  And... I can compile my application and it runs perfectly!  But at design time, it can't render my main form, and instead gives the above error.   I have attached an image of what Visual Studio does when I try to load the form that hosts the WPFMap user controls.  I am dead in the water.  At this point, I may have to move to a different development machine and try a clean install of Visual Studio and the .net SDK.



0 Kudos
9 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

We would love to fix this, and it's in the backlog. Unfortunately it's so far proven to be tricky to detect/handle. 

Cheers

Mike

0 Kudos
dotMorten_esri
Esri Notable Contributor

The issue should go away after you add the nuget, do a build (or just a nuget restore), then close VS and re-open it.

RickWebster
New Contributor

I have done all of those things multiple times.  It's like there is a registry setting or a configuration entry that persists.  I even installed VS 2017 (The problem original showed up while I was working in VS 2015) thinking it was something corrupt on the Visual Studio side.  The problem followed.  What is crazy is the app runs fine.  I can compile and it runs.  I just can't bring it up the form in the Visual Studio designer.  I need to make changes, but Visual Studio errors loading the form.

0 Kudos
Data_Integra_DinamikaDID
New Contributor

I have same problem like you. the app runs well but the form can not be opened. So if I want to change the form, I have to remove the usercontrol map. then I add back. I hope any solution to fix this problem.

0 Kudos
MojumKhan
New Contributor

Hi All,

Has any solution been provided to this issue as I have the same issue.

Thanks

Mojum 

0 Kudos
JamieBurmeister
New Contributor II

Try adding:

<PlatformTarget Condition=" '$(PlatformTarget)' == '' ">$(Platform)</PlatformTarget>

To your .csproj file. The target inside the nuget package uses the PlatformTarget property to determine which dlls to copy to the output directory. Mine wasn't set because my project uses Platform instead of PlatformTarget and so I encountered this bug.

0 Kudos
dotMorten_esri
Esri Notable Contributor

I'm a little surprised this property isn't set in your project, but we've heard this happening a few times. I'd like to better understand what is causing this so we can avoid it in the future. Is there any chance you could share the .csproj file with me, as well as some info about which version+patch of Visual Studio you use and how you create the project to begin with (ie which project template etc)? Either share here or email me at mnielsen@esri.com

Thanks

0 Kudos
JamieBurmeister
New Contributor II

I use JetBrains Rider with MSBuild 16. Our CI system is TeamCity which builds using MSBuild 15 and the project was probably created in Visual Studio 2017 with the default template for WPF projects. The project file is 228KB so I'll email it to you on request.

0 Kudos
TasawarAhmad
New Contributor III

For anyone facing this issue on vs 2019, make sure you have project folder permissions on full control.

Also make sure that arcgis.runtime.win nuget package is installed.

Link:

https://www.programmersought.com/article/59465239639/

0 Kudos