Building a Font Setting Plugin for Live Writer – Part 1


 

Well I’ve started and the first issue is using Visual Studio 2010 Beta 2.

I’ve backed the target .Net Framework back from 4.0 to 2.0 and get the following errors. Basically, the default Class Library template adds a bunch of > 2.0 assemblies. Deleting these from the references section of the project clears the errors. But I’m left with the quandary, will this have an impact on things down the track.

The answer will be revealed as I push forward with is development.

Also, implementing the abstract methods from SmartContentSource gives the following shell class (I don’t like the formatting, but I’ll play this as I go):

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

namespace craigwatson1962.spaces.live.com.FontSettingPlugin
{
    [WriterPlugin("",  //TODO: Generate a GUID for this plugin
        "Font Setting Plugin", 
        Description="Sets the font for the currently selected text",
        HasEditableOptions=true,
        ImagePath="resources/FontIcon.gif",
        Name="Font setting plugin",
        PublisherUrl="http://craigwatson1962.spaces.live.com")]
    public class FontSettingPlugin : SmartContentSource
    {
        public override SmartContentEditor CreateEditor(ISmartContentEditorSite editorSite)
        {
            throw new NotImplementedException();
        }

        public override string GeneratePublishHtml(ISmartContent content, IPublishingContext publishingContext)
        {
            throw new NotImplementedException();
        }
    }
}

Warning 1 The primary reference "System.Core", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Core" or retarget your application to a framework version which contains "System.Core". FontSettingPlugin
Warning 2 The primary reference "System.Xml.Linq" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Xml.Linq" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". FontSettingPlugin
Warning 3 The primary reference "System.Data.DataSetExtensions" could not be resolved because it has an indirect dependency on the framework assembly "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Data.DataSetExtensions" or retarget your application to a framework version which contains "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089". FontSettingPlugin
Warning 4 The primary reference "System.Xml.Linq", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Xml.Linq" or retarget your application to a framework version which contains "System.Xml.Linq". FontSettingPlugin
Warning 5 The primary reference "System.Data.DataSetExtensions", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "System.Data.DataSetExtensions" or retarget your application to a framework version which contains "System.Data.DataSetExtensions". FontSettingPlugin
Warning 6 The primary reference "Microsoft.CSharp", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0". To resolve this problem, either remove the reference "Microsoft.CSharp" or retarget your application to a framework version which contains "Microsoft.CSharp". FontSettingPlugin
Warning 7 The referenced component ‘System.Core’ could not be found.   
Warning 8 The referenced component ‘System.Xml.Linq’ could not be found.   
Warning 9 The referenced component ‘System.Data.DataSetExtensions’ could not be found.   
Warning 10 The referenced component ‘Microsoft.CSharp’ could not be found.   

 

Advertisements

, , , , ,

  1. #1 by baby kleidung on October 21, 2010 - 12:58 am

    Man, talk about a fantastic post! I?ve stumbled across your blog a few times within the past, but I usually forgot to bookmark it. But not again! Thanks for posting the way you do, I genuinely appreciate seeing someone who actually has a viewpoint and isn?t really just bringing back up crap like nearly all other writers today. Keep it up!

  2. #2 by shailesh on January 1, 2010 - 11:55 am

    hi, If you can give the answer of this blog then I am very thanksfull to you….http://social.msdn.microsoft.com/Forums/en/wlwdev/thread/f555955a-b96d-4e13-a078-f12df240393dif possible then please send me answer on my email id -contacttoshailesh@gmail.com

    • #3 by aussiecraig on September 30, 2010 - 11:16 am

      Shailesh,
      A couple of things:
      1) I did not find thing untill I move my blog onto WordPress, so sorry for the delay.
      2) The MSDN link is now broken, so I cannot see the context of your question.
      3) I’m not sure of the question you are after for.
      If you could post the “question” you need an answer for, then I’ll try and answer it. I did not progress the plugin much further, but I may start back into the project (if I find I need the feature again).
      Craig

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: