Search code examples
visual-studiovisual-studio-2019wdkwindows-kernelinf

Device driver does not install on any devices, use primitive driver if this is intended in Visual studio 2019?


I upgraded my Visual Studio from 2017 to 2019, and it seems like they have made some fantastic changes to visual studio in the latest version because i did not have this problem in VS 2017, Even compiling simple hello world drivers that you can find anywhere no longer compile and they give the following error:

Device driver does not install on any devices, use primitive driver if this is intended

It seems like it is related the default INF file :

https://github.com/MicrosoftDocs/windows-driver-docs/issues/2067

but the answers there were useless and non of the changes mentioned for the INF file helped, this is my INF file which is the default INF on VS 2019 :

;
; HelloWorld.inf
;

[Version]
Signature="$WINDOWS NT$"
Class=System
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
Provider=%ManufacturerName%
DriverVer=
CatalogFile=HelloWorld.cat
PnpLockDown=1

[DestinationDirs]
DefaultDestDir = 12


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

[SourceDisksFiles]


[Manufacturer]
%ManufacturerName%=Standard,NT$ARCH$

[Standard.NT$ARCH$]


[Strings]
ManufacturerName="<Your manufacturer name>" ;TODO: Replace with your manufacturer name
ClassName=""
DiskName="HelloWorld Source Disk"

How should i change it?


Solution

  • to solve that problem just remove the inf file from the visual studio and recompile and then it will work.