Why does 'iprtrmib.h' in Window Kits 8.0 reference 'mprapidef.h' in window 'kits 8.1'? - windows

I am using Visual Studio 2012 (Update 5) with MS Window Kits 8.0 and .NET Framework 4.5.51209. Recently, I also installed MS Window Kits 8.1.
Now, I have a file: '\windows kits\8.0\include\shared\iprtrmib.h' that failes to include 'mprapidef.h'.
That include file only exists at: '\Windows Kits\8.1\Include\shared\mprapidef.h', which is not in my include path.
My Visual Studio 'Include Directories' is set to: "$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);".
These are my Visual Studio macros:
VCInstallDir: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\
WindowsSDK_IncludePath: C:\Program Files (x86)\Windows Kits\8.0\Include\um;C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files (x86)\Windows Kits\8.0\Include\winrt
When searching, I found a slightly similar question: missing header file on a new installation of visual studio 2012
I tried repairing my Visual Studio installation. I do not want to change the 'Include Directories' for each of my projects. What else should I try?

I installed vs2015 and vs2012, then the same problem occurs,however, I find a solution.
open visual studio project settings,click VC++ Directories, find Include Directories,add the following line to it.
C:\Program Files (x86)\Windows Kits\8.1\Include\shared

One may add the corresponding 8.1 paths to the environment variable.
Maybe it's necessary to do the same thing with the lib environment variable (WindowsSDK_LibraryPath_x86).

Related

MS-Build returning the visual studio installation path

How can the entry
<MsTestExePath>$(MSBuildProgramFiles32)Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe</MsTestExePath>
in a .proj file be generalised, such that the build works for different licenses of Visual Studio 2019 as well, where mstest.exe is located at
C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\Common7\IDE\MSTest.exe
in the case of an enterprise license?
The most generic solution may be to replace the variable parts of the path with msbuild macros, but which ones would that be?
According to this documentation,
The macro
$(VSInstallDir)
returns the path to the installation folder of the Visual Studio version currently used.
The following entry should therefore work for all versions of visual studio, for which mstest.exe is located in the subfolder \Common7\IDE\ under the installation directory:
<MsTestExePath>$(VSInstallDir)Common7\IDE\mstest.exe</MsTestExePath>

Visual Studio Build Command Macros for determining the version of Visual Studio

Is there a Visual Studio build command macros for determining the version of Visual Studio?
I want a post-build event that runs something in C:\Program Files (x86)\Common Files\microsoft shared\TextTemplating\<My MSVS version>, for example C:\Program Files (x86)\Common Files\microsoft shared\TextTemplating\14.0
We have different developers with different versions of Visual Studio installed, and this build event is currently hard-coded.
I looked here but didn't see anything.
I found the build command macro I was looking for. This did it for me:
$(MSBuildToolsVersion)
It resolves to the major-minor version number that I'm looking for (ie, 14.0).

How to Enable WiX Projects in Visual Studio 2017

In Visual Studio 2017's New Project dialog, there is no entry for Windows Installer XML (WiX).
Is it possible to enable WiX projects in Visual Studio 2017?
You can manually enable Visual Studio 2017 compatibility with WiX 3.10 or earlier:
Close all instances of Visual Studio.
Copy
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\WiX to
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\WiX
(In the destination path, replace "Enterprise" with "Professional" or "Community" depending on your edition.)
You may need to provide Administrator permission:
The result will look like this:
Copy C:\Program Files (x86)\MSBuild\Microsoft\WiX to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WiX
Then execute the following command as Administrator:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv" /setup
(Again, replace "Enterprise" with "Professional" or "Community" depending on your edition.)
When you open Visual Studio 2017, WiX 3.10 and earlier projects will be compatible.
WiX v3.11.0.1507 provides full support for the VS 2017 Extension For WiX.
The Release Notes provide insight into why it has taken so long to provide the extension and compatibility with the extension and older versions of WiX
Note: You can use the "WiX Toolset Visual Studio 2017 Extension" with previous versions of the WiX Toolset but there is a forwards compatibility issue when building managed custom actions that is only fixed in the WiX v3.11 RC release. In other words, if you have managed custom actions and you want to use VS 2017 then you must upgrade to WiX v3.11 RC.
Edit:
The VS 2019 Extension is now available.
Edit:
The VS 2022 Extension is now available.
The Wix Releases Page has links to the other extensions.
I found that I also had to copy the WiX folder from "C:\Program Files (x86)\MSBuild\Microsoft" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft". Without this, I got an error trying to load my WiX project that one of the MSBuild targets files couldn't be found.
WiX now offers support for Visual Studio 2017.
All you have to do is:
Close Visual Studio 2017
Install the WiX Toolset Build Tools
Install the WiX Toolset Visual Studio 2017 Extension
The answer by Chris works, but on my machine, for some reason, the Wix folder in "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\WiX" had only one template named "CustomActionCPP.zip". I had to search for a complete Wix folder in other older versions of Visual Studio. It worked for me by copying Wix from "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\WiX\ProjectTemplates".
Also, had to apply the answer by Basim, by copying Wix from "C:\Program Files (x86)\MSBuild\Microsoft" to "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft".
I have installed ONLY VS2017 and had to copy from another machine where VS2015 was installed the mentionen folder of #Chris Schiffhauer. The same for the folder of #Basim mentioned.
Addiontally I had to copy the "C:\Program Files (x86)\Wix Toolset 3.10\" because when I have installed WiX on my machine in this folder were still some assemblies missing.
Install the Wix Toolset Visual Studio 2019 Extension and reload the project
right-click the project folder in the path and uncheck the read-only
after install the Extension reload the Wix
use the below URL download
https://marketplace.visualstudio.com/items?itemName=WixToolset.WixToolsetVisualStudio2019Extension

Where Can I Download Microsoft.Phone.WinJS.2.1?

I'm trying to make a universal Windows App with WinJS. I've downloaded the latest update to VS2013. The RC version. I've installed all the SDKs I can find. I've installed the WinLibJS_VSE.exe extension, as well. Funny thing about that one is that VS updates keeps saying that I didn't...
When I open up any of the sample universal WinJS apps - like the ones here http://code.msdn.microsoft.com/wpapps/Universal-Windows-app-cb3248c3 - I always end up with this error:
Could not find SDK "Microsoft.Phone.WinJS.2.1, Version=1.0". C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets
I tried finding this SDK on my machine, but I'm not finding it at all. Nor am I finding it online. I copied some SDKs from C:\Program Files (x86) into C:\Program Files (x86)\Microsoft SDKs to no avail.
Any ideas?
The Windows Phone SDK should have been installed when you installed the Visual Studio 2013 Ultimate Update 2 RC.
The files should be located here:
C:\Program Files (x86)\Microsoft SDKs\WindowsPhoneApp\v8.1\ExtensionSDKs\Microsoft.Phone.WinJS.2.1\1.0\DesignTime\CommonConfiguration\Neutral\Microsoft.Phone.WinJS.2.1\js
When you create a C# project, is it a Silverlight project or a Windows Runtime project?
Okay, I've been talking to the Visual Studio team about this.
Did you happen to install the "Visual Studio 2013 Extensions for the Windows Library for JavaScript"?
http://www.microsoft.com/en-us/download/details.aspx?id=40793
(In the Programs and Features list, it will appear as "Visual Studio Extension for Windows Library for JavaScript".)
If so, you'll need to uninstall it. The order for uninstall is:
Visual Studio 2013
Visual Studio Update 2 RC
"Visual Studio Extension for the Windows Library for JavaScript"
After the uninstall, reinstall in this order:
Visual Studio 2013
Visual Studio Update 2 RC
Of course, all of this assumes that you've already upgraded your development environment to Windows 8.1. These projects will only work on a Windows 8.1 machine.
I hope that this helps. If not, we can try something else.
The final release of Visual Studio seems to have resolved this issue.
http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs
I had the same problem and I tried all above none of them work. However the following worked for me:
1-) Uninstall Visual Studio extensions for Javascript
2-) Uninstall visual studio 2013
3-) Install visual studio 2013 with Update 2 RC from the following link (it is VS + update 2 bundled)
http://www.microsoft.com/en-us/download/confirmation.aspx?id=42303
Above link is for Premium edition. Find the relevant link accoringly.
P.S It is quite lame that when you uninstall Visual studio , it doesn't uninstall some of its addins. And you have lot of remaining artifacts :(
Andy (and potentially others running into this issue)....
We are currently investigating into this issue to understand the root cause. If this issue is blocking you from development, the recommendation is to perform the following steps "carefully". If these steps do not help, then please let us know!
Uninstall Visual Studio 2013 from Programs and Features
Reboot machine if prompted
Delete or rename these folders-
I. \Documents\Visual Studio 2013
II. C:\Program Files (x86)\Microsoft Visual Studio 12.0
III. C:\Program Files\Microsoft Visual Studio 12.0
IV. \AppData\Roaming\Microsoft\VisualStudio\12.0
V. \AppData\Local\Microsoft\VisualStudio\12.0
VI. C:\Program Files (x86)\Microsoft Visual Studio 12.0
VII. C:\Program Files (x86)\Microsoft XDE\8.1
VIII. C:\Program Files (x86)\Microsoft SDKs\Windows Phone\
IX. C:\Program Files (x86)\Microsoft SDKs\WindowsPhoneAppx\
X. C:\Program Files (x86)\Windows Phone Silverlight Kits
XI. C:\Program Files (x86)\Windows Phone Kits
XII. C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone
XIII. C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhoneAppx
XIV. C:\Program Files (x86)\Common Files\Microsoft Shared\Phone Tools
Go to the registry editor (start >> run >> regedit) and remove/rename the following registries-
I. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0
II. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\12.0
III. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0
IV. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0_Config
Download the .iso image of Visual Studio 2013 preferably using the relevant MSDN account
Extract the .iso file by using an extraction tool, such as WinRar (http://www.rarlab.com/rar/winrar-x64-401.exe) remember to associate .iso extension with WinRar during its setup
Install Visual Studio 2013 using this extracted setup
Install the Visual Studio Update 2 RC from here: _http://www.microsoft.com/en-us/download/details.aspx?id=42307
Check if the templates are appearing
You can then install the Windows Phone standalone SDK from here: _https://dev.windowsphone.com/en-us/downloadsdk or through the Visual Studio extensions.

VS2012 doesn't include winres.h any more?

After installing VS2012, I can't find winres.h under folder "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC". What happen to VS2012 and why remove this header file?
By the way, in VS2010, winres.h locates in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include"
The file is part of the Windows SDK now and since VS2012 the SDK location is different, it's now called a 'Kit' and is found in Program Files/Windows Kits. Sepcifically you can find winres.h in
C:\Program Files (x86)\Windows Kits\8.0\Include\um

Resources