We are in the process of migrating our existing 2.x AddIns to 3.1.x. Several addins have migrated just fine. However we're having a problem upgrading one of them.
I've tried updating it via the Pro Migrate Project tool as well as starting a fresh Addin Project from scratch, and copying files over. Getting the same error when trying to Debug for both.
I have installed System.Configuration.ConfigurationManager via NuGet.
Error apparently being thrown from Module1 Initialize call. The error details points to FrameworkApplication.cs
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
Source=VersionManagementTools
StackTrace:
at VersionManagementTools.Module1.Initialize() in C:\DevProjects\ArcGISPro\SDKDev_Cloud\ProSDK_VersionManagementTools\SDKAddin\VersionManagementTools\Module1.cs:line 71
at ArcGIS.Desktop.Framework.FrameworkApplication.LoadModule(String id, ModuleRecord record) in ArcGIS.Desktop.Framework\FrameworkApplication.cs:line 5475
at ArcGIS.Desktop.Framework.FrameworkApplication.ProcessModules(Boolean resetModules) in ArcGIS.Desktop.Framework\FrameworkApplication.cs:line 5388
at ArcGIS.Desktop.Framework.FrameworkApplication.ContinueInitializing() in ArcGIS.Desktop.Framework\FrameworkApplication.cs:line 4110
at ArcGIS.Desktop.Framework.FrameworkApplication.OnApplicationReady() in ArcGIS.Desktop.Framework\FrameworkApplication.cs:line 1771
at ArcGIS.Desktop.Framework.FrameworkApplication.<OnStartup>d__161.MoveNext() in ArcGIS.Desktop.Framework\FrameworkApplication.cs:line 1705
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
Solved! Go to Solution.
its a visual studio window accessible when u r running the debugger (see below). Sort modules on "Name".
>>Should I try downgrading my nuget package to 6x?
that sounds like it might do the trick
when I look at the loaded modules for Pro 3.1 on my machine it is using version 6.0.2223 (corresponding to, i assume, the currently supported .NET version for Pro 3x - .NET 6) and not v7.
Thanks for the quick reply Charlie.
Where are you looking to see that info.
It does look like I have a 6x and a 7x version of the ConfigMgr dll.
Should I try downgrading my nuget package to 6x?
its a visual studio window accessible when u r running the debugger (see below). Sort modules on "Name".
>>Should I try downgrading my nuget package to 6x?
that sounds like it might do the trick
Charlie Macleod you are a Modern Day Hero!
That seemed to fix it. Although I'm still not sure why it was barking at me to begin with, even before I grabbed the wrong version from Nuget.
Thanks so much. Ok, on to the next disaster.....