Studio Pro Extension - cannot be resolved error

0
Hi, I developed an extension for studio pro 10.18.0 by this link : https://www.mendix.com/blog/how-to-make-extensions/  As addition to writed c# codes in that link, when i added new code using IModel library and i imported to studio pro,i get below error.I need to say, I import the extension into Studio Pro without any errors before adding the codes using IModel.   The Codes :        Thanks
asked
2 answers
1

may you use the code it might be helpful

using Mendix.StudioPro.ExtensionsAPI.Model;using Mendix.StudioPro.ExtensionsAPI.UI.Menu;using Mendix.StudioPro.ExtensionsAPI.UI.Services;using System;using System.Collections.Generic;using System.ComponentModel.Composition;

namespace ModuleExtension{    [Export(typeof(MenuExtension))]    public class ModuleExtension : MenuExtension    {        private readonly IAppService _appService;

        [ImportingConstructor]        public ModuleExtension(IAppService appService)        {            _appService = appService;        }

        public override IEnumerable<IMenuViewModel> GetMenus()        {            yield return new MenuViewModel("Say Hello", () => test());        }

        public void test()        {            // SAFELY retrieve the current model via appService            IModel model = _appService.GetModel();

            string path = "C:\\Users\\TestModule.mpk";

            if (model?.Root != null)            {                _appService.TryImportModule(model.Root, path, "***", "1.0", 0);            }        }    }}

answered
0

you have to install the nuget package of the extensibility API

 

https://docs.mendix.com/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/get-started/ 

answered