Hello,

I've been using the EDK2 for a long time as was still using VS2008 tool set.

I decided to start fresh to move to vs2022 - I cloned fresh new
directories (and found out I had to also get submodules).   Ran the
"edksetup.bat Rebuild VS2022".  I found that toolsetup.bat has a bug -
I'll put the patch at the bottom below.

So now it came time to build one of my UEFI applications.  I renamed
the C:\edk\Build directory to get a fresh build.  I start it:  "call
build -a X64 -y release_report.txt -p acme\superapp.dsc -b RELEASE"
but when it starts the build I get:

Traceback (most recent call last):
  File "C:\edk\edk2\BaseTools\Source\Python\build\build.py", line
2588, in <module>
    LogQMaxSize = ThreadNum() * 10
  File "C:\edk\edk2\BaseTools\Source\Python\build\build.py", line
2567, in ThreadNum
    ThreadNumber =
TargetObj.Target.TargetTxtDictionary[TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER]
  File "C:\edk\edk2\BaseTools\Source\Python\Common\TargetTxtClassObject.py",
line 163, in Target
    self._GetTarget()
  File "C:\edk\edk2\BaseTools\Source\Python\Common\TargetTxtClassObject.py",
line 182, in _GetTarget
    ConfDirectoryPath = mws.join(os.environ["WORKSPACE"], 'Conf')
  File "C:\edk\edk2\BaseTools\Source\Python\Common\MultipleWorkspace.py",
line 70, in join
    for Pkg in cls.PACKAGES_PATH:
TypeError: 'NoneType' object is not iterable

Could someone point out what I need to do to fix it?

Here's that patch I mentioned above:


--- C:/toolsetup-f25d437f.001.bat    Tue Jan 13 02:02:15 2026
+++ C:/edk/edk2/BaseTools/toolsetup.bat    Mon Jan 12 22:13:07 2026
@@ -15,6 +15,8 @@
 set PYTHON_VER_MAJOR=3
 set PYTHON_VER_MINOR=6

+setlocal EnableDelayedExpansion
+
 @REM ##############################################################
 @REM # You should not have to modify anything below this line
 @REM #
@@ -251,7 +253,7 @@
     )
     if not defined FORCE_REBUILD (
       if not defined REBUILD (
-        if not exist "%EDK_TOOLS_BIN%" (
+        if not exist "!EDK_TOOLS_BIN!" (
           echo.
           echo !!! ERROR !!! Cannot find BaseTools Bin Win32!!!
           echo Please check the directory %EDK_TOOLS_BIN%


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121748): https://edk2.groups.io/g/devel/message/121748
Mute This Topic: https://groups.io/mt/117240892/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to