edyoung / net7ca

Experiment to see if I can write Custom Actions in .NET 7
MIT License
0 stars 0 forks source link

Is this working, or is it just a concept? #1

Open MikeFarrington opened 1 year ago

MikeFarrington commented 1 year ago

I'm trying to make use of this, but, when publishing I'm being told by MSBuild that...

ILC: Method '[MyAssembly]MyAssemblyNamespace.MyCaClass.MyCaMethod(native int)' will always throw because: Failed to load assembly 'WixToolset.Dtf.WindowsInstaller'

It seems like PublishAot can't embed the required WiX DLL? Does it work for you, or was this more of a "this is how it could work if WiX Toolset was modified to support this"?

Try as I might, I cannot get it to show a log message or return anything but 1 (failure) in my MSI.

edyoung commented 1 year ago

It's a proof of concept rather than a polished solution, but I was actually able to run an installer built using this. I used wix4 rather than wix3, maybe that is the issue?

On Wed, Sep 20, 2023 at 3:38 PM Mike Farrington @.***> wrote:

I'm trying to make use of this, but, when publishing I'm being told by MSBuild that...

ILC: Method '[MyAssembly]MyAssemblyNamespace.MyCaClass.MyCaMethod(native int)' will always throw because: Failed to load assembly 'WixToolset.Dtf.WindowsInstaller'

It seems like PublishAot can't embed the required WiX DLL? Does it work for you, or was this more of a "this is how it could work if WiX Toolset was modified to support this"?

— Reply to this email directly, view it on GitHub https://github.com/edyoung/net7ca/issues/1 or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALECUAKJNJ7C43W54YWBDX3NVTTBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTLDTOVRGUZLDORPXI6LQMWSUS43TOVS2M5DPOBUWG44SQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJVGY3DCNRXGU4TJAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDCOJQGU4DANBXG442O5DSNFTWOZLSUZRXEZLBORSQ . You are receiving this email because you are subscribed to this thread.

Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

MikeFarrington commented 1 year ago

Hmm, ok. I'm running WiX v4 (v4.0.2). I wonder why I can't get it going. Ok, thanks anyway.

MikeFarrington commented 1 year ago

Oh, I just looked through the log.txt you included (good thinking, I hadn't noticed that). I may be misinterpreting things, but It looks to me like it wasn't actually working for you. Around line 445 It shows that the call to CustomAction2 returned a 1, not a 0. And your log messages does not appear in the log.