Comments (12)
Hi
It looks to me like you are using an older EWDK. From log it seems to be:
** Enterprise Windows Driver Kit (WDK) build environment
** Version vb_release.19041.1
Is it possible you can use a later EWDK and see if it fixes the issue.
Here we are using "Windows 11, version 22H2" with VS 2019. It also works with VS 2022, I believe.
If that works, it is it possible you can use that new EWDK?
If not, we may have to make changes to the project files to support the older EWDK.
If i get some time, I can try to reproduce your issue using the older EWDK and see how difficult it is to fix that.
from dmf.
The 19041.1 EWDK is the latest version supported by the build.ps1 script. I did try building in VS2022 with the 22H2 WDK but got a different error with that. I can build ARM64 in VS2022 with the 22H2 WDK but x64 and Win32 builds give another error. That was why I tried using the build.ps1 script from the repo.
from dmf.
Can you try the following...
Use your desired EWK. Open a command line prompt and run:
cd EWDK_co_release_22000_210604-1628\ (use your desired version)
LaunchBuildEnv.cmd
cd BuildEnv
SetDevEnv.cmd
SetupBuildEnv.cmd
SetupVSEnv.cmd
Then, run visual studio from the command line prompt and open the DMF solution.
Rebuild All and everything should build.
As for the build.ps1, I have not used that myself...It is pretty old and perhaps it is not working with current projects. I will try to investigate why. However, the above instructions should work for you.
from dmf.
Using the Vb (19041) EWDK I already had downloaded and issuing the above commands following by msbuild Dmf.sln /p:Configuration=Debug /p:Platform=x64
gives the same clui.dll error.
Launching VS2022 from that command prompt and building gives the following error for x64 and ARM64 builds.
10>d:\Program Files\Windows Kits\10\build\WindowsDriver.common.targets(299,5): error MSB4062: The "ValidateNTTargetVersion" task could not be loaded from the assembly d:\Program Files\Windows Kits\10\build\bin\Microsoft.DriverKit.Build.Tasks.17.0.dll. Could not load file or assembly 'file:///d:\Program Files\Windows Kits\10\build\bin\Microsoft.DriverKit.Build.Tasks.17.0.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Using the Co (22000) EWDK the command line build works fine but building in Visual Studio gives the following error for x64 and ARM64 builds.
10>D:\Program Files\Windows Kits\10\build\WindowsDriver.common.targets(302,5): error MSB4062: The "ValidateNTTargetVersion" task could not be loaded from the assembly D:\Program Files\Windows Kits\10\build\bin\Microsoft.DriverKit.Build.Tasks.17.0.dll. Could not load file or assembly 'file:///D:\Program Files\Windows Kits\10\build\bin\Microsoft.DriverKit.Build.Tasks.17.0.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
Using the Ni (22621) EWDK the command line build works fine but building in Visual Studio gives the following error for x64 builds.
10>D:\Program Files\Windows Kits\10\build\10.0.22621.0\WindowsDriver.common.targets(314,5): error MSB4044: The "ValidateNTTargetVersion" task was not given a value for the required parameter "ValidNTTargetVersions".
Summary:
WDK | Build Method | Platform | Status |
---|---|---|---|
19041 | msbuild | x64 | fail |
19041 | msbuild | ARM64 | fail |
19041 | VS2022 | x64 | fail |
19041 | VS2022 | ARM64 | fail |
22000 | msbuild | x64 | success |
22000 | msbuild | ARM64 | success |
22000 | VS2022 | x64 | fail |
22000 | VS2022 | ARM64 | fail |
22621 | msbuild | x64 | success |
22621 | msbuild | ARM64 | success |
22621 | VS2022 | x64 | fail |
22621 | VS2022 | ARM64 | success |
from dmf.
from dmf.
Sam, See my previous comment. I edited it with the details of my experiments.
from dmf.
Hi...
Thank you for your effort.
I am investigating this. I would like to see if we can make VS2022/226231 x64 work since msbuild works.
I will try to repro that and if I can I will see what I can do.
from dmf.
Hello....Ok, here is the status....
The error you are seeing with VS2022/226231 is a known issue caused by a regression in WDK or VS2022 (not clear to me) and apparently there is an internal wokitem it is in the process of being corrected but I do not know the eventual outcome.
I was able to reproduce the error with VS2022/226231/x64. I was able to reproduce VS2022/226231/ARM64 works.
Finally, I was able to correct VS2022/226231/x64 by doing the following:
Before you start VS2022 from the 226231 EWDK command line, enter this command:
set MSBuildUserExtensionsPath=%VSINSTALLDIR%\MsBuild
Then, run VS2022. Then you should be able to build.
Can you try that and let me know. I do not know if this will fix the other issues...but I think it fixes the latest version and probably the versions you want to build with.
Please let me know if that works for you...And thank you so much for the feedback. I am sure this will help others.
from dmf.
Unfortunately, that fix appears to not work for 220000 EWK. Please use 226231 instead.
I am not going to try the other EWDKs because the root problem appears to be a regression in VS2022.
The previous EWDKs work with VS2019.
So the two options are (I think):
- Run set MSBuildUserExtensionsPath=%VSINSTALLDIR%\MsBuild command before running VS2022 (see above).
- Use VS0219.
from dmf.
Thanks Sam. To recap I did the following and I'm able to build both x64 and ARM64 from VS2022.
Mount EWDK_ni_release_svc_prod1_22621_220804-1759.iso on D:
D:
LaunchBuildEnv.cmd
cd BuildEnv
SetDevEnv.cmd
SetupBuildEnv.cmd
SetupVSEnv.cmd
set MSBuildUserExtensionsPath=%VSINSTALLDIR%\MsBuild
"c:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe"
from dmf.
That is great to hear.
Long term, when i get some time I will try to see if there is a way the projects can be modified so that that extra set does not need to be done. Also, I think VS2022 team is planning on fixing this issue, but it is not clear to me if that is true or when that would happen.
As for the issues with the older EWDK, I think it is best to use VS2019. If that does not work for you let me know.
Glad to hear you are unblocked. Please don't hesitate to create new issues should you find something else.
from dmf.
Note:
This issue is resolved in v1.1.132.
Starting with this version it is possible to build using both CO and NI EWDK with VS2019 and VS2022 without running this command:
set MSBuildUserExtensionsPath=%VSINSTALLDIR%\MsBuild
from dmf.
Related Issues (20)
- Isn't it better to design DMF on C++ code base? HOT 3
- Unexpected behaviour of ScheduledTask module HOT 7
- [UMDF] DMF_VirtualHidMini fails WriteReport requests on descriptors without Report IDs HOT 2
- Latest code generates following linker errors in my project HOT 17
- Do not use Visual Studio 16.10.0 or 16.10.1 or 16.10.2 with DMF due to link regressions HOT 4
- Debugging assertion in DMF\Dmf\Modules.Library\Dmf_ScheduledTask.c HOT 12
- Question Regarding SoundWire bus support HOT 11
- Unused config param in DMF_VirtualHidKeyboard module HOT 4
- How can I disable WPP for the DMF driver ? HOT 5
- Duplicated lines HOT 2
- This repo is missing important files
- EyeGazeIoctl sample fails ApiValidator HOT 2
- Pdo_DevicePropertyTableWrite adds properties to parent device instead of PDO HOT 32
- Building with Windows 11, version 22H2 WDK (10.0.22621.0) supported? HOT 9
- Trying to use Dmf_IoctlHandler with Control Device Object, supported? HOT 15
- WDF Verifier (Handle Tracking) trips over FILEOJECT de-reference without using the right tag HOT 2
- Dmf_VirtualHidKeyboard work in User-mode? HOT 1
- Why are lib files added to linker manually? HOT 5
- Why is `EnableLookAside` a `ULONG` and not a `BOOLEAN`? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dmf.