切换到托管解决方案 - 不可能?

问题描述

我的组织长期以来一直使用非托管解决方方法进行内部自定义,使用一个包含所有自定义的大型解决方案。 Microsoft 一直在推动对所有下游环境使用托管解决方案并使用解决方案细分的概念。所以我们正在考虑进行转换。对于现有的自定义,在删除非托管解决方案后简单地尝试导入托管解决方案似乎不起作用。

##[error]Solution import Failed. Error: A managed solution cannot overwrite the EntityRelationshipRole component with Id=1ae98e99-f14e-e911-a963-000d3ab6d103 which has an unmanaged base instance. The most likely scenario for this error is that an unmanaged solution has installed a new unmanaged EntityRelationshipRole component on the target system,and Now a managed solution from the same publisher is trying to install that same EntityRelationshipRole component as managed. This will cause an invalid layering of solutions on the target system and is not allowed.

关于此错误的其他线程说要在目标实例中删除并重新创建有问题的组件。不过,这种方法对我们来说似乎不太可能,因为我们已经投入生产很长时间了。错误可能会出现在我们创建的每个组件上。有没有简单的方法可以将现有部署从非托管转换为托管?

解决方法

诀窍是使用一些自定义选项导入托管解决方案:

var request = new ImportSolutionRequest
{
    ConvertToManaged = true,OverwriteUnmanagedCustomizations = true
};

organizationService.Execute(request);

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...