// Method commented out until we figure out if we can open Pro Projects outside of Pro // [TestMethod] public async Task Test_Task() { // NOT WORKING: // We thought we might be able to test SDK code with Pro Project dependencies // with this code, but the call throws exceptions in other threads and never returns await QueuedTask.Run(async () => { string aprx = @"C:\Projects\MySymbolEditorTest\MySymbolEditorTest.aprx"; string version; ArcGIS.Desktop.Core.Project.CanOpen(aprx, out version); await ArcGIS.Desktop.Core.Project.OpenAsync(aprx); }); // Never gets here: // Now project is loaded, we can test VM objects with Pro dependencies MilitaryOverlayDataModel modm = new MilitaryOverlayDataModel(); Task<bool> isEnabledMethod = modm.ShouldAddInBeEnabledAsync(); bool enabled = await isEnabledMethod; Assert.IsTrue(enabled); }