Windows Driver Development: Deploy option missing in Visual Studio 2012 - visual-studio

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.

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.

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.

Related

How to create windows MSI in separate solution?

How to Create a MSI for windows Applications which is available in different visual studio solution.
If you have installed the installer extension (if not, see notes below), open Visual Studio, then do the following (at this point, no solution is opened):
If you start with a new solution, select File -> New Project.(In case you want to add the installer project to an existing solution instead, right click on
the solution in the solution explorer and choose from the context menu Add -> New
Project.)
In the New Project dialog, select "Other Project Types", then "Visual Studio Installer" and there "Setup Wizard" (Alternatively you can also select a Windows setup project or a Web setup project directly - the wizard has the advantage that it will ask you about several items)
In the Setup Wizard, you can choose whether you want to create a setup for a Windows application or for a Web application. Here, select Windows application.
Click Next >. The "Choose files to include" dialog appears. This step is important, because here you specify which files you want to add to your installer package. Check the items you need to include - for localized projects I suggest that you add: "Locally copied items, Runtime Implementation, Localized resources, Content files" and "Primary output."
Click Next > again to bring up the last page ("Create project" dialog), then click Finish
You have now a solution with one setup project. Now you can add an existing project (select the solution, right-click and select "Add existing project"). After you have done that, right-click on the setup project and select "Add -> Project Output". Now you can select the items to be included in your setup project.
If required, you can also add other assemblies via "Add -> Assembly..." or, if you have that, you can add merge modules.
Notes
You need to install the extension "Microsoft Visual Studio 2017 Installer Projects" (via Tools -> Extensions and Updates, search it online in the Visual Studio Marketplace) to be able to select the installer as described above
that the project you have added can be part of a different solution.
The 4 most important properties of a setup package are: Version, ProductCode, Upgrade code and Platform (default is x86). Version is just a number (e.g. 1.0.1) while the other two properties are GUIDs. If you change the version in the package properties, then Visual Studio asks to create a new ProductCode (if you answer the question with "Yes" - which is recommended). This allows the Windows installer to distinguish the differrent packages from one another and allows to upgrade a package, because the UpgradeCode isn't changed.
Additionally, the default value for RemovePreviousVersions is false - but in most cases you want to change this to true (remember what I said before about ProductCode and UpgradeCode): To remove old versions automatically when you install a new version.

Unity3d generating an empty .sln file

I'm following the Hololens Developer 100 course from Microsoft. All goes well until I get to building. I follow the instructions exactly here and click build. It asks me to select a folder and I create a folder called "App" (per the instructions) and select that folder. When I finally hit build Unity seems like it's working fine but then two things go wrong:
1) The .sln file that's generated is not in the App folder, but in the parent project folder. The App folder is empty
2) When I open the .sln file, it's empty. The tutorial asks me to edit Package.appxmanifes, but I can't because it doesn't seem to have built.
Is there a configuration somewhere that's not correct? Perhaps Unity and VS aren't talking to eachother correctly? More Importantly, how do I fix it?
I had the same problem, for me it was that I didnt have the Windows 10 SDK installed as part of Visual Studio 2015 with Update 3, in the instructions there is a bit that says:
"If you choose a custom install, ensure that Tools (1.4) and Windows 10 SDK (10.0.10586) is enabled under Universal Windows App Development Tools node. All editions of Visual Studio 2015 Update 3 are supported, including Community."
If your hololens build completes successfully a file explorer window will pop open at the project level. If it fails you should find errors in the console tab of Unity.
The SLN file that is at the project level is a solution file that you can open in visual studio to edit unity code and attach to the unity editor to do real time debugging while running your solution in the editor. In fact if you click on a "CS" file in the project tab of Unity this is the solution that opens in visual studio.
The SLN file you are looking for is in the App folder. Once you open the SLN in visual studio set the configuration to Release and x86, and you should be able to target your build at either a "Remote Device" which is the hololens, or the hololens emulator if you have that installed.

How do I change the target platform in a console app in Visual C# 2010 Express or Visual Web Developer 2010 Express?

I don't see any other value other than 'Any CPU' in the drop down list in Properties -> Build -> Configuration -> Platform in Visual C# 2010 Express or in Visual Web Developer 2010 Express.
I just removed some 64-bit dlls and got their 32-bit versions and added a reference to them.
Since then, I've been receiving a BadImageFormatException.
Is it the platform or the platform target?
If you want to add a new platform then do this:
Open the Configuration manager for your solution.
Expand the Platform combo for the project. It will show several items: Any CPU, and .
Press This will open a new dialog to add a new target for your solution. Select x64 for the new platform and Any CPU as the target from where to copy the settings. You can also check the "Create new solution platforms" if you want to add a solution target also.
Then, if you go to the project properties you can select this platform.
I found a couple of suggestions elsewhere but they haven't worked for me so far.
I found this one to be the most useful of all.
http://social.msdn.microsoft.com/Forums/en-US/d4fa83dc-eed1-4ead-96a1-78bbd9ba6d3a/vb-express-target-x86-platform?forum=vblanguage
For anyone who faces this same problem later, here's help. It says:
Express Editions:
The VB and C# Express products do not expose the
Target property inside the development environment.
You will need to carefully modify the project file
using a text or XML editor.
1. Close the project and/or solution
2. Select Open File from the File menu
3. Navigate to the project directory, and highlight
the project file
4. Press the Open button, the project file should open
in the XML editor
5. Locate the first <PropertyGroup> section and add
the following line:
<PlatformTarget>x86</PlatformTarget>
1. Save the project file
2. Reopen the project and/or solution using
Open Project/Solution from the File menu
3. Continue with development, debugging, and testing
Alternatively, if the application is targeted to 64-bit
platforms, you can ensure that the COM controls added to
the application have 64-bit equivalents on the development
and deployment computers.
JohnWein added the following:
Using the above method targets the x86 platform, but it
doesn't show the "Configuration:" and "Platform: " boxes
on the Properties tabs. To get this feature, I made a
template of one of the projects that shows these boxes.
Now I can target a platform and know what platform I
have targeted.

Visual Studio 2010: prerequisites issue

On Microsoft Visual Studio 2010 I would like to create a installer for a solution I created.
I created it by menu way (File > New project... > Other Project Types > Setup and Deployment > Visual Studio Installer > Setup Project), added files to their correct destinations etc., and all works fine, except for prerequisites...
The problem is that my solution depends on .Net 3.5 and I would like to install it automatically together with the installer, in some offline way - no internet downloads on installation time.
If on installer project properties I mark "create setup to install install prerequisite components" and mark "download prerequisites from the same location as my application"...
... when I try to run, it shows messages like that:
Error 7 The install location for prerequisites has not been set to 'component vendor's web site' and the file 'DotNetFX35SP1\dotNetFX20\aspnet.msp' in item '.NET Framework 3.5 SP1' can not be located on disk. See Help for more information. D:\Projetos\Eletronica\M013-Moura\HG-V6-release1\VidaCiclada-semTemperatura\VidaCiclada_Installer\VidaCiclada_Installer.vdproj VidaCiclada_Installer
Well, I put my offline installer of .Net 3.5 on the same folder EXE output of my solution is. What am I doing wrong?
Although I could not completely finished my installer package, I found the issue:
I clicked on properties panel
I clicked on the setup project
On property named "Localization", I changed the value to "English (United States)"
So I could build the project and execute the installer normally (except for SQL Server Express, that I would like to install with that package too, but although it is executed with setup, it does not create the Windows services for it...).
I.e., the issue was that my VS2010 doesn't have the files needed for the setup on my native language, "Portuguese (Brazil)", but it has for English language. The final setup will install prerequisites on English language...

Visual Studio 2008 Setup Project is not generating Setup.exe anymore

I have a Visual Studio 2008 Setup Project that when compiled in the past would generate a Setup.exe in the output directory along with the .msi output file. Now it no longer generates the Setup.exe which I actually do need.
Did I change a project setting without realizing? How do I get it to generate it again?
Try opening project properties, click Prerequisites button there and check "Create setup program to install prerequisite components".
This is for Visual Studio 2005, not sure if it works for Visual Studio 2008.
1, Go to file menu > click Add > new project >now “Add New Project” Dialog appear.
2.Select “Other Project Types” and click “Setup and Deployment” projects,Choose “Setup Project”give name project name in name text box finally click OK.
3.New project appear in solution explorer,for example you give the name “MyEXE”..it will display with this name.
4.right click the MyEXE > go View > click “File System”
5.You can see the “File System on TargetMachine”under three folders
Application Folder
User’s Desktop
User’s Program Menu
6.Select Application Folder and right click Add>Project Output>select Primary output
select User’s Desktop richt click on the second window>click create new shortcut>select output file from Application folder>change the file name from primary output name to MyEXE
next >>
same procedure follows the user’s program menu also
8.If you want to change the Manufactures name for exe,just right click the project go to properties
change the properties as per you requirement
9.Finally Build the new project After successfully Build the project myEXE(Setup) will be appear in Application Debug or Release folder(depend upon the properties settings)
EXE available # this location
When you want to install the EXE on the client machine,you should be installed .NET Framework on that mc because,Applications and controls written for the .NET Framework version 2.0 require the .NET Framework Redistributable Package version 2.0 to be installed on the computer where the application or control runs.

Resources