Menu

#2505 light cannot be run from makefile

future
migrated
nobody
light (353)
2013-08-21
2011-04-19
Jouni Aro
No

When I try to run a light command from a makefile task, I get the following error. This task works frin from a batch file (but I also get the same error if I try to run the batch from the makefile).

MAKE Version 5.4 Copyright (c) 1987, 2010 Embarcadero Technologies, Inc.
[...]
light -sval -ext WixUIExtension -ext WixUtilExtension myproj.wixobj Fragments*.wixobj -o myproj.msi
light.exe : error LGHT0001 : Could not find a part of the path '<myproject>\mak2.tmp\lizbk5z7.tmp'.

Exception Type: System.IO.DirectoryNotFoundException

Stack Trace:
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at System.CodeDom.Compiler.TempFileCollection.EnsureTempNameCreated()
at System.CodeDom.Compiler.TempFileCollection.get_BasePath()
at Microsoft.Tools.WindowsInstallerXml.WixBinder.get_TempFilesLocation()
at Microsoft.Tools.WindowsInstallerXml.WixBinder..ctor()
at Microsoft.Tools.WindowsInstallerXml.Binder..ctor()
at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)

Discussion

  • candyc

    candyc - 2011-04-20

    The workaround is to make sure the temp folder exists before running light.

     
  • Rob Mensching

    Rob Mensching - 2013-08-21
    • Status: open --> migrated