コード例 #1
0
        public void DetermineClientTypeTest_ValidXrmTooling1()
        {
            string expected = "Microsoft.CrmSdk.XrmTooling.CoreAssembly";
            string result   = NuGetProcessor.DetermineClientType("8.2.0");

            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public static bool Install(DTE dte, Project project)
        {
            try
            {
                var componentModel = (IComponentModel)Package.GetGlobalService(typeof(SComponentModel));
                if (componentModel == null)
                {
                    return(false);
                }

                var installer = componentModel.GetService <IVsPackageInstaller>();

                NuGetProcessor.InstallPackage(dte, installer, project,
                                              CrmDeveloperExtensions2.Core.ExtensionConstants.IlMergeNuGet, null);

                return(true);
            }
            catch (Exception ex)
            {
                //MessageBox.Show("Error installing MSBuild.ILMerge.Task" + Environment.NewLine + Environment.NewLine + ex.Message);
                return(false);
            }
        }