Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/264.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何为Win 7 Media Center编写hello world加载项_C#_Mediacenter_Windows Media Center - Fatal编程技术网

C# 如何为Win 7 Media Center编写hello world加载项

C# 如何为Win 7 Media Center编写hello world加载项,c#,mediacenter,windows-media-center,C#,Mediacenter,Windows Media Center,我想在Windows 7上为Media Center编写一个简单的hello world加载项,但在查找最新的功能文档时遇到问题。我找到了这个页面:看起来正是我需要的。我实现了它,它引用的一些接口被标记为过时,即使如此,当我尝试在media center中启动它时,也会弹出一个对话框,说“无法启动加载项” 我将名称空间接口从使用Microsoft.MediaCenter.AddIn更新为使用Microsoft.MediaCenter.Hosting,根据sdk文档,该名称空间看起来是最新的名称空

我想在Windows 7上为Media Center编写一个简单的hello world加载项,但在查找最新的功能文档时遇到问题。我找到了这个页面:看起来正是我需要的。我实现了它,它引用的一些接口被标记为过时,即使如此,当我尝试在media center中启动它时,也会弹出一个对话框,说“无法启动加载项”

我将名称空间接口从使用Microsoft.MediaCenter.AddIn更新为使用Microsoft.MediaCenter.Hosting,根据sdk文档,该名称空间看起来是最新的名称空间,但仍然存在相同的问题

向gac和RegisterMCEApp注册程序集都是成功的,我在两个版本之间从这两个地方注销和注册了程序集

我用一个.snk文件对程序集进行了强签名,并获得了用于更新registration.xml的公钥令牌

有谁能告诉我我做错了什么,或者告诉我一些最新的教程/文档吗

以下是我的一小段代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.MediaCenter.Hosting;

namespace MCPluginTakeTwo
{
    public class HelloWorldAddIn: MarshalByRefObject, IAddInModule, IAddInEntryPoint
    {
        public void Initialize(Dictionary<string, object> appInfo, Dictionary<string, object> entryPointInfo)
        {

        }

        public void Uninitialize()
        {

        }

        public void Launch(AddInHost host)
        {
        }
    }
}
使用系统;
使用System.Collections.Generic;
使用System.Linq;
使用系统文本;
使用Microsoft.MediaCenter.Hosting;
命名空间McPlugintake2
{
公共类HelloWorldAddIn:MarshallByRefObject、IAddInModule、IAddInEntryPoint
{
公共void初始化(字典appInfo、字典entryPointInfo)
{
}
公共无效取消初始化()
{
}
公共无效启动(AddInHost主机)
{
}
}
}

也许看看一些开源mc会有所帮助。

这里是另一个入门教程,提供了一些使用Visual Studio 2010的入门技巧(因为SDK只附带VS 2008模板)