Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
C# .Net Write plug-ins for windows live writer and my plugins cant be loaded
posted

I'm new in .Net and I'm now trying to write a plugin for windows live writer because I prefer to publish blogs using it rather than using the web editors. And I want to develop some small plugins for my daily use. But after I created a class libarary project and built it following the steps as some developers described, the WLW does not load the plugin so I don't know how to debug.

A simple code snippet:

using System;
using
System.Collections.Generic;
using
System.Text;
using
WindowsLive.Writer.Api;
using
System.Windows.Forms;

namespace
Insert_Colorful_Table
{
   
[WriterPluginAttribute
       
("f7581112-dddd-47c9-9db0-46987a2aaae1",
       
"Insert Colorful Table",
       
Description = "Helps you create a beautiful table.",
       
ImagePath = "icon.gif",        
       
PublisherUrl = "http://ggicci.blog.163.com")]
   
[InsertableContentSource("Insert Colorful Table")]

   
public class Plugin : ContentSource
   
{
       
public override DialogResult CreateContent
           
(IWin32Window dialogOwner, ref string content)
       
{
            content
= @"<table><tr><td>Ggicci</td></tr></table>";
           
return DialogResult.OK;
       
}
   
}
}

I did configure the 'Build Events' of the project and set the 'Build Action' of the image to 'Embedded Resource'. And no errors occured when building my project.

Parents
No Data
Reply
  • 30
    Verified Answer
    posted

    okay, I've worked out what went wrong. Windows Live Writer supports plugins that are built with either the Microsoft .NET Framework version 1.1 or 2.0. Writer requires users to have .NET 2.0 present to install the application. But I used .NET 4.0. So when I changed target framework to 2.0, then it worked well.

Children
No Data