Windows Driver Development: Deploy option missing in Visual Studio 2012

笑着哭i 提交于 2020-01-12 18:47:42

问题


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.

It says:

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

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

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.


回答1:


This is the answer I received from Microsoft support.

Open msnmntr.sln in Visual Studio.

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.

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).

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.

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

Class = ActivityMonitor
CatalogFile = msnmntr.cat

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

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

[SourceDisksFiles]
msnmntr.sys = 1,,

On the Build menu, choose Build Solution.

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

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




回答2:


So I had the same problem regarding a sample I am working with. It all came from being confused about what project they actually wanted me to edit. it turns out it wasn't the driver project, but the one called "package". Not sure if you have such a package, but that was the problem in my case.



来源:https://stackoverflow.com/questions/13314319/windows-driver-development-deploy-option-missing-in-visual-studio-2012

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!