SharePoint designer 2013 打开工作流报错

来源:互联网 发布:靠谱助手提示网络异常 编辑:程序博客网 时间:2024/05/22 14:16

       前段时间,工作流突然报错如下:

整个应用下的网站集工作流都会出现这个错误,其他应用程序却不会出现这个错误。检查ULS日志,发现报错:“Failed to find the XML file at location '15\Template\Features\DM_Feature1\feature.xml“。原来是自己发布的Feature删除时没有删除干净。

使用下面的代码可以检查有哪些feature没有删除干净:

 class Program    {        static void Main(string[] args)        {            List<Guid> featIDs = new List<Guid>();            foreach (SPFeatureDefinition featdef in SPFarm.Local.FeatureDefinitions)            {                try                {                    Console.WriteLine(featdef.RootDirectory + "-------" + featdef.Id.ToString() + "-------" + featdef.GetTitle(System.Threading.Thread.CurrentThread.CurrentCulture));                    if (featdef.Id.ToString() == "8a40de38-6810-4187-9637-a6d8df08a43b")                    {                        Console.WriteLine("################################################");                    }                    if (featdef.Id.ToString() == "bff4e34b-6303-4ef2-959b-bd27197b3974")                    {                        Console.WriteLine("################################################");                    }                }                catch                {                    //This code will be executed if the feature does not have the manifest file.                    Console.WriteLine("################################################");                    Console.WriteLine("Error Ocurrred! Attempting to get feature ID of the feature without manifest file...:");                    Console.WriteLine(featdef.Id.ToString());                }                finally                {                    Console.WriteLine();                    Console.WriteLine("Press enter to view next feature");                   // Console.ReadLine();                }            }        }    }


 

引用:

http://blog.bugrapostaci.com/2011/08/02/good-tools-for-fixing-missing-features-on-sharepoint/

 

解决方法:

     根据featureid,我在C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES下创建DM_Feature1,模拟原先删除掉的xml文件

使用命令Uninstall-SPFeature -Identity -Guid -force删除。最终解决问题。

 

 

 

 

 

 

 

 

 

 

 

0 0
原创粉丝点击