Deploying a driver fails in VS 2019 - visual-studio

Trying to experiment a bit with KMDF and the echo driver fails to deploy:
A[13:22:28:862]: An error occured while deploying files to the target machine for test "Driver Preparation": Could not find a part of the path 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.21.27702\debug_nonredist\X64\Microsoft.VC141.DebugCRT'..
Why does it try to find Microsoft.VC141.DebugCRT. I have Microsoft.VC142.DebugCRT installed with the newer toolset along with 10.0.18362.0 SDK.
I also installed the VS 2017 toolset and now the same error:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Redist\MSVC\14.21.27702\debug_nonredist\X64\Microsoft.VC141.DebugCRT missing.
But it should look into ...\14.16.27012.. instead.

I've been getting the same error. I've tried uninstalling/reinstalling also tried 2017 as well. I uninstalled everything and reinstalled everything with no luck. I even tried installing VC141.
I acutally came to your post looking for an answer but on a whim I opened the installer, modified it to install the VC141 stuff which put the files into Community\VC\Redist\MSVC\14.16.27012\debug_nonredist\x64
VS still complained so i just copied * from Community\VC\Redist\MSVC\14.16.27012\debug_nonredist\x64 into Community\VC\Redist\MSVC\14.21.27702\debug_nonredist\x64 and "things seem to work". It's not much of an answer - but maybe it's good enough?

This seems to be the result of a bugfix of another issue, as described here:
https://developercommunity.visualstudio.com/content/problem/596096/visual-studio-2019-wdk10.html
The proposed solution worked for me:
As Administrator, run Developer Command Prompt for VS 2019
Run the following commands in the VS Developer Command Prompt:
cd /d %VCToolsRedistDir%\debug_nonredist
MKLINK /J x86\Microsoft.VC141.DebugCRT x86\Microsoft.VC142.DebugCRT
MKLINK /J x64\Microsoft.VC141.DebugCRT x64\Microsoft.VC142.DebugCRT
Hope this helps :)

Ran into a similar issue. Perform the following steps on the host computer.
As Administrator, run Developer Command Prompt for VS 2019 Run the following commands in the VS Developer Command Prompt:
cd /d %VCToolsRedistDir%\debug_nonredist
MKLINK /J x86\Microsoft.VC141.DebugCRT x86\Microsoft.VC142.DebugCRT
MKLINK /J x64\Microsoft.VC141.DebugCRT x64\Microsoft.VC142.DebugCRT

Related

Found .NET SDK, but did not find dotnet.dll

I recently installed Visual Studio 2022 preview.
Today I was in a workshop and there was some feature that didn't work, and it turned out it was because I had the preview version of .NET 6 installed.
So I then uninstalled Visual Studio 2022 preview.
Now, when I type dotnet --version (or other command like dotnet --info) in a command window, I get the following message:
Found .NET SDK, but did not find dotnet.dll at [C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14\dotnet.dll]
I have tried to repair, and then reinstall DotNet SDK 5.0.400. Restarted machine a few times as well, to no avail.
I am guessing the uninstaller removed the files, but failed to restore the registry to the previous version.
How do I fix this?
So right after posting my question, I discovered that the uninstaller had left some leftovers on my disk. There was a folder with some files, called 6.0.100-preview.7.21379.14. After I deleted it, the command "dotnet --version" now returns "5.0.400".
As Mak wrote below, the folders mentioned reside inside this folder:
C:\Program Files\dotnet\sdk
I also ran into the same problem recently. I had to go to the below path in Windows and delete all 6.*.* folders.
C:\Program Files\dotnet

Setup correctly Qmake on Windows 10

My adventure in the world of QT and multi-platform continue, with another roadblock.
I am on Windows 10 now; I did install QT5 and I was able to run one of the examples, so I thought everything is fine. Instead, when trying to build PythonQt, I get an error from qmake:
Project ERROR: Cannot run compiler 'cl'. Maybe you forgot to setup the environment?
I thought myself; that there is something missing; although had no luck finding what the heck do I have to actually do to set up qmake. I did assume that when you install QT, everything get set up for you, but instead it seems that something is missing.
I am on W10, using the latest installer for Python 2.7 (it is working, since when I call python I get correctly the interpreter to launch); am I missing something else?
I had this same issue with Qt5.9.1 and VS2015. I fixed this by editing "C:\Qt\Qt5.9.1\5.9.1\msvc2015\bin\qtenv2.bat" file. I added below 2 lines.
call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
Start "" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe"
And then run the "Qt 5.9.1 32-bit for Desktop (MSVC 2015)" ( or 64 bit depends on your choice.).
This would set the environment before running the qmake.
Calling the vcvarsall.bat fixed my issue.
Adding to #PrimeOfKnights 's answer for the sake of completeness:
with VS2017 community, the location of vcvarsall.bat is
/c/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvarsall.bat
In qtenv2.bat, it actually says:
echo Remember to call vcvarsall.bat to complete environment setup!

Error: SetSite failed for package [ApacheCordovaToolsPackage]

I just installed both Visual studio 2015 and visual studio cordova tools.
It wrked fine and i was able to create a project with it.
I then installed ionic cli, and suddenly i am getting the error
SetSite failed for package [ApacheCordovaToolsPackage]
I have tried repairing Visual studio and cordova tools to no avail.
Any help?
The steps in this MSDN forum post worked for me. Reproducing for Googleability:
Find the installer for Visual Studio 2015 in your installer cache.
cd /d "%ProgramData%\Package Cache"
dir vs*exe /s /b
Find the path to vs_community.exe, vs_professional.exe, or vs_enterprise.exe, and copy that path.
(I found my vs_enterprise.exe at C:\ProgramData\Package Cache\{a60a492e-b5eb-4218-a9e6-f38d18a7dbaf}\vs_enterprise.exe)
CD into that path, e.g.,
cd {a60a492e-b5eb-4218-a9e6-f38d18a7dbaf}
Execute the installer with the options /modify /installselectableitems Javascript, e.g.,
vs_enterprise.exe /modify /installselectableitems Javascript
In Visual Studio setup, select Modify then Update, without changing any feature selections.
Then:
cd C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE
devenv /updateconfiguration
devenv /clearcache
The solution in Error adb.exe when running Visual Studio 2015 RC worked for me.
In short:
Delete this folder: C:\Users[username]\appdata\local\microsoft\VisualStudio\14.0\ComponentModelCache
Then open a new project get the folder rebuild by VS.

Microsoft ASP.NET and Web Tools 2015 - Visual Studio 2015 : Package failed

Visual Studio 2015 filed to install asp.net and web tools 2015
I tried more than one time also tried to repair Visual Studio i faced the same error.
also i tried to install the same ISO file on another machine and it worked fine
What a ridiculous ordeal. I was finally able to resolve this error by manually installing the webtoolsextensionsvs14.msi using msiexec and specifying a targetdir of c:\temp. For some reason is was trying to create temp install files directly in c:\
msiexec /a webtoolsextensionsvs14.msi /qb /l* log.txt SKIP_SETUP=1 TARGETDIR=
c:\temp
Thank you for reporting this. I will try to help you resolve this and do have a few questions.
Was this a clean installation or did you upgrade from a previous release such as RC?
Have you tried to repair Visual Studio?
Would you be able to share the installation logs? There should be two log files in your %temp% folder. The first file is an overall summary of the VS installation and should be have a name such as vs_professional_yyyymmddhhmmss.LOG. The second log is for the Web Tools package itself and should have a name such as vs_professional_yyyymmddhhmmss_nnn_WebToolsExtensionsVS14_1040.LOG
Thanks,
Jacques

makecert.exe missing in windows 7, how to get it and use it

I am using Windows 7. I don't have the makecert.exe, which I came to know when I tried to run commands to generate certificates like
makecert -sk XYZ -n "CN=XYZ Company" testXYZ.cer
I get error :
'makecert' is not recognised as an internal or external command, operable program or batch file.
Pls suggest how to resolve this issue. Do i need to install the Windows SDK again.
Regards,
Pravin.
makecert.exe comes with both Visual Studio and the Windows SDK. Therefore just use either the Visual Studio Command Prompt or the Windows SDK command prompt and it will work straight out of the box as it will be included in the command prompt path.
makecert is included in the ".NET Development > Tools" bucket.
This selected bucket includes the makecert utility (at least in SDK v7.1).
C:\Program Files (x86)\Windows Kits\8.0\bin\x64
OR
C:\Program Files (x86)\Windows Kits\8.0\bin\x86
You can find a version of makecert here : http://www.inventec.ch/chdh/notes/makecert_5_131_3790_0.zip. Also instructions on how to use it here : http://www.inventec.ch/chdh/notes/14.htm
Have you read this link: MakeCert? It sends you to Microsoft Windows Software Development Kit from where you can download the SDK including makecert
I know its too late to reply, however it might help other looking out for this executable.
if you have installed VS 2005, you will find it under
C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin
if you have installed VS 2008, you will find it under
C:\Program Files\Microsoft Visual Studio 9.0\SmartDevices\SDK\SDKTools
go to this location on command prompt and then run you "makecert" command with arguments.
MakeCert.exe is now deprecated. You should use PowerShell's New-SelfSignedCertificate cmdlet to create a selfsigned certificate.
You can find it on microsoft sdks directory:
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\makecert.exe
My copy (with Visual Studio 2017 installed) was here: "C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64\makecert.exe"
Ran into the same problem awhile back and thought I would share the link I found to download and install this tool.
http://go.microsoft.com/fwlink/p/?linkid=84091
Please let me know if this works if you do get around to it, I realize this post is a little old.
Windows 10 after installing Windows SDKs:
If you have ARM microprocessor: C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\arm64
Intel microprocessor: C:\Program Files (x86)\Windows Kits\10\bin\10.0.17134.0\x64
Add that folder to your PATH environment variable

Resources