Windows驱动程序开发:Visual Studio 2012中缺少部署选项 [英] Windows Driver Development: Deploy option missing in Visual Studio 2012

查看:354
本文介绍了Windows驱动程序开发:Visual Studio 2012中缺少部署选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译和部署从MSDN获得的 WFP示例称为msnmntr,但相同的问题适用于所有样本.

I was trying to compile and deploy the WFP sample obtained from MSDN called msnmntr but the same problem applies to all samples.

此示例和所有示例都无法部署,因为只有一步.

This and all samples fail to deploy because there's one step in the documentation that are missing in Visual Studio 2012 Ultimate.

它说:

1)打开驱动程序包的属性页.在解决方案资源管理器中右键单击驱动程序包项目,然后选择属性".

1) Open the property pages for your driver package. Right-click the driver package project in Solution Explorer and select Properties.

2)在驱动程序包的属性页中,依次单击配置属性",驱动程序安装"和部署".

2) In the property pages for the driver package, click Configuration Properties, click Driver Install, and then click Deployment.

但是在Visual Studio 2012中没有这样的选项,如下面的屏幕所示:

However there's no such option in the Visual Studio 2012 as you can see in the screen below:

我想知道我在做错什么.

I would like to know what I'm doing wrong.

推荐答案

这是我从Microsoft支持部门收到的答案.

This is the answer I received from Microsoft support.

在Visual Studio中打开msnmntr.sln.

Open msnmntr.sln in Visual Studio.

在解决方案资源管理器中,右键单击解决方案msnmntr"(2个项目),然后选择"Add > New Project".导航至Windows Driver > Package.添加一个名为msnmntr软件包的新驱动程序安装软件包.

In Solution Explorer, right-click Solution msnmntr (2 projects), and choose Add > New Project. Navigate to Windows Driver > Package. Add a new Driver Install Package named msnmntr Package.

在解决方案资源管理器中,右键单击解决方案msnmntr"(2个项目),然后选择配置管理器".选择所需的配置和平台(例如:Win8 Debug,x64).

In Solution Explorer, right-click Solution msnmntr (2 projects), and choose Configuration Manager. Choose the configuration and platform that you want (Example: Win8 Debug, x64).

在解决方案资源管理器中,右键单击"msnmntr程序包",然后选择属性".导航至Configuration Properties > Driver Install > Deployment.检查Enable deployment.检查Remove previous driver versions before deployment.输入目标计算机的名称.选择Do Not Install.

In Solution Explorer, right-click msnmntr Package, and choose Properties. Navigate to Configuration Properties > Driver Install > Deployment. Check Enable deployment. Check Remove previous driver versions before deployment. Enter the name of your target computer. Select Do Not Install.

在解决方案资源管理器中,找到并打开msnmntr.inf.在[Version]部分中,添加以下行:

In Solution Explorer, locate and open msnmntr.inf. In the [Version] section, add these lines:

Class = ActivityMonitor
CatalogFile = msnmntr.cat

[Strings]部分上方,添加以下部分:

Just above the [Strings] section, add these sections:

[SourceDisksNames]
1 = %DiskId1%,,,""

[SourceDisksFiles]
msnmntr.sys = 1,,

在生成"菜单上,选择生成解决方案".

On the Build menu, choose Build Solution.

在目标计算机上找到INF文件(例如:C:\DriverTest\DriverFiles\msnmntr.inf).右键单击INF文件,然后选择Install.

Locate the INF file on the target computer (Example: C:\DriverTest\DriverFiles\msnmntr.inf). Right-click the INF file, and choose Install.

在目标计算机上,以管理员身份打开命令提示符窗口,然后输入net start msnmntr.

On the target computer, open a Command Prompt window as Administrator, and enter net start msnmntr.

这篇关于Windows驱动程序开发:Visual Studio 2012中缺少部署选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆