cargo-wix icon indicating copy to clipboard operation
cargo-wix copied to clipboard

error CNDL0104 : Not a valid source file; detail: Root element is missing.

Open Vilayat-Ali opened this issue 2 years ago • 4 comments

I have created a binary rust crate and when tried running cargo wix, this error popped up.

Vilayat-Ali avatar Nov 07 '22 21:11 Vilayat-Ali

Did you run the cargo wix init command before running the cargo wix command to build the installer? What specific commands and arguments did you execute?

Could you share your main.wxs file?

volks73 avatar Nov 07 '22 21:11 volks73

I ran cargo wix init. The file main.wxs is empty. It started working after I ran cargo wix print wxs > example.wxs and then copy pasted the contents of example.wxs into the main.wxs file.

Vilayat-Ali avatar Nov 08 '22 10:11 Vilayat-Ali

Was there a package manifest, Cargo.toml file, in the folder where you executed the cargo wix init command?

I am glad you found a workaround, but it is very strange that an empty main.wxs file was created. Could you try again in a completely fresh folder/project, first doing a cargo init --bin then a cargo wix init?

Are you using a workspace/multi-package project?

volks73 avatar Nov 08 '22 16:11 volks73

I did. And for some time it shows a blank wxs file

Vilayat-Ali avatar Apr 01 '23 17:04 Vilayat-Ali