Building A Font Setting Pluggin – Part 2


Gremlins

XCOPY return code 4

Error 1 The command "XCOPY /D /Y /R "c:userscraigdocumentsvisual studio 10ProjectsFontSettingPluginFontSettingPluginbinDebugFontSettingPlugin.dll" "C:Program FilesWindows LiveWriterPlugins"" exited with code 4. FontSettingPlugin

From the command line the response if “access denied”.

Then the “penny dropped”, Vista UAC is the problem. A quick bit of Setting the Security on the directory, and fixed.

Loading Writer – Cannot Find my GIF.

This one has taken some time to fix. A couple of elements in the solution.

    namespace craigwatson1962.spaces.live.com.FontSettingPlugin

    My predilection to use a a namespace which is unique, hence avoiding namespace collisions, was part of the problem.

    I need to set the project default namespace. Project Properties.
    VS_DefaultNameSpace 
    Getting the gif file bound into the output assembly. Make sure you have the properties set correctly (Build Action and Namespace – being the most important:
    VS_Embedded_Gif

The the code which links all the bits together (note the use of the “full stops” in location, and the case sensitivity [would appear to be case sensitive]).

[WriterPlugin("FFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFFF",  
        "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")]

 

Advertisements

, , , , , ,

  1. Leave a comment

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: