Problem in CustomDialog.cs

Sep 27, 2016 at 5:59 PM
Hello Oleg,

I ran into an issue where I have a project containing 2 classes which are used to deserialize a file that I am attempting to read in the dialog_Load event of CustomerDialog.cs.

The project was properly added as a reference to the installer project and the namespace for the assembly was properly referenced and is recognized.

As I debug, when I attempt to go into the method which first references the above mentioned classes, I get a File.IO exception stating the project's dll was not found.

Thanks in advance for any insights you can provide.

Have a great day,

Bob
Coordinator
Sep 28, 2016 at 12:39 AM
Hi Bob,

> The project was properly added as a reference...
I assume you mean Project.DefaultRefAssemblies or ManagedAction.RefAssemblies. Because VisualStudio project references do not affect runtime assembly probing.

If it is the case then can you share the your project so I can debug it. Sanitize it from any sensitive information or better yet create a HelloWorld project equivalent. Most likely there is some tricky assembly probing happening in your scenario.
Sep 28, 2016 at 9:26 PM
Hello Oleg,

I tried the Project.DefaultRefAssemblies and could not complete the building of the msi (255 error).

Do you have an example for the ManagedAction.RefAssemblies that I can review?

Thanks for your help,

Bob
Coordinator
Sep 30, 2016 at 12:32 PM
Edited Sep 30, 2016 at 12:35 PM
Yes, of course. The downloables contain ~100 samples. You can start with "DTF_ExternalAssembly" sample. I think this one is in fact exactly your case.

But... Still... did you mean "VisualStudio project references" or "Project.DefaultRefAssemblies" ?
Sep 30, 2016 at 1:12 PM
Hello Oleg,

Thanks for getting back to me.

I did have the Visual Studio project references set to reference that project but I did also try to use the Project.DefaultRefAssemblies and it was then I received the 255 error when running the rebuild with the post compile operation to build the msi file.

I will check the DTF_ExternalAssembly example.

Bob
Coordinator
Sep 30, 2016 at 1:16 PM
Great. Then it all makes sense. Those 255 errors will be related to the WiX definition Wix# is emitting and it is impossible to address tis problem without having the actual test case to look at. But the referencing problem should be completely fixed with Project.DefaultRefAssemblies.
Thus the sample should put you on the right track.

Oleg Shilo
--------------------------------------------------------------------------------------------
Website: http://www.csscript.net
E-Mail: [email removed]