Light.exe error LGHT0307 'Microsoft.Tools.WindowsInstallerXml.AssemblyDefaultWixExtensionAttribute' was not defined in the assembly

后端 未结 2 1482
感动是毒
感动是毒 2020-12-07 05:12

I am creating a batch file using wix light and candle to create an msi for a project.

I am receiving this error when i run the batch file:

l

2条回答
  •  盖世英雄少女心
    2020-12-07 05:52

    MSBuild: Most people use MSBuild - I believe - to build via the command line like that. There is a section on using MSBuild in the WiX help material.


    Custom Action DLL: I include custom action DLLs from within the WiX source file. Here is a sample with hard coded paths in the WiX source file for how you can include your custom action dll:

    The construct: $(env.SystemRoot) - in the WiX source below - gets the environment variable %SystemRoot% - which resolves to C:\ on most systems (to list environment variables open a cmd.exe and type set and press Enter). The below source should hence compile on all systems without modifications:

    
    
      
        
    
        
            
        
    
    
        
        
         
    
        
        
        
        
        
        
          
        
        
        
    
        
          
            
              
                
              
            
          
        
    
      
    
    

    Batch Build: This should suffice, no need to specify anything in the candle.exe and light.exe commands to build the MSI. Here are some sample commands:

    "%WIX%bin\candle.exe" product.wxs -ext WixUIExtension >> Build.log
    "%WIX%bin\light.exe" -out Test.msi product.wixobj -ext WixUIExtension >> Build.log
    

提交回复
热议问题