You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build the package, the following error will result: WIX0001 System.IO.FileLoadException: The system cannot open the device or file specified.
Describe the behavior you expected and how it differed from the actual behavior.
The package should build without issue
Wix V3 did not have this issue, I could give the Merge element any ID without issue.
Using V4, if I have build output set to Detailed, I can see the exact issue (mergemod.dll call to IMsmMerge2::ExtractCAB) which fails, producing the output: WIX0001 System.IO.FileLoadException: The system cannot open the device or file specified. (Exception from HRESULT: 0x8007006E) Package1 C:\Users\MichaelMassiah\source\repos\ConsoleApp2\Package1\wix.exe 1
which throws with a stack trace :
1> at WixToolset.Core.Native.Msm.IMsmMerge2.ExtractCAB(String fileName)
1> at WixToolset.Core.WindowsInstaller.Bind.ExtractMergeModuleFilesCommand.ExtractFilesFromMergeModule(IMsmMerge2 merge, WixMergeSymbol wixMergeRow) in D:\a\wix4\wix4\src\wix\WixToolset.Core.WindowsInstaller\Bind\ExtractMergeModuleFilesCommand.cs:line 200
1> at WixToolset.Core.WindowsInstaller.Bind.ExtractMergeModuleFilesCommand.Execute() in D:\a\wix4\wix4\src\wix\WixToolset.Core.WindowsInstaller\Bind\ExtractMergeModuleFilesCommand.cs:line 78
...
I'm guessing V3 has a different way to extract the msm file which doesn't have this issue. Looking at source for V4, the command uses the Id to create the file name of the cab to extract to, so "COM1.cab".
I think it's fine if there are restricted IDs in this case, but Wix should notify the user of an illegal/restricted Merge ID.
Context: I noticed this after upgrading one of our projects from V3 to V4. The "COM1" Merge module is a merge module we use for our COM objects (dlls exes etc), hence the ID COM1. This never caused an issue with V3 for us. I only managed to fully resolve the issue while writing up the repro steps here and changing the ID.
Bugs
If this issue is a bug:
WIX0001 System.IO.FileLoadException: The system cannot open the device or file specified.
Wix V3 did not have this issue, I could give the Merge element any ID without issue.
Using V4, if I have build output set to Detailed, I can see the exact issue (mergemod.dll call to IMsmMerge2::ExtractCAB) which fails, producing the output:
WIX0001 System.IO.FileLoadException: The system cannot open the device or file specified. (Exception from HRESULT: 0x8007006E) Package1 C:\Users\MichaelMassiah\source\repos\ConsoleApp2\Package1\wix.exe 1
which throws with a stack trace :
I'm guessing V3 has a different way to extract the msm file which doesn't have this issue. Looking at source for V4, the command uses the Id to create the file name of the cab to extract to, so "COM1.cab".
I think it's fine if there are restricted IDs in this case, but Wix should notify the user of an illegal/restricted Merge ID.
Context: I noticed this after upgrading one of our projects from V3 to V4. The "COM1" Merge module is a merge module we use for our COM objects (dlls exes etc), hence the ID COM1. This never caused an issue with V3 for us. I only managed to fully resolve the issue while writing up the repro steps here and changing the ID.
Extra context: list of restricted file names in Windows : https://learn.microsoft.com/en-gb/windows/win32/fileio/naming-a-file#naming-conventions
The text was updated successfully, but these errors were encountered: