Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: How to get textbox values from Custom CLR dialog and use inside CustomAction

$
0
0
> I think my naming convention was not supported by wix?
It is actually MSI (not WiX) design perl. :)
If the property is to be used outside it needs to be declared as public. Makes sense, doesn't it? But the the way you do is is not something one would expect... You need to declare it in all capital.

>But it was not working until i changed "AppVersion" to "APPVERSION"
Strangely enough I have checked the SetupEvents sample and in my test I was able to tunnel lower-case property to the AfterInstall. Thus may be in your test it was because of mismatch of the property name in project.DefaultDeferredProperties and e.Session.Property(....

Anyway, your code snippet shows that there are a few points you need to do differently when you access your properties.

The last line will throw the exception because AfterInstall is a deferred action and the session object is already disconnected. Thus you need to access the property with e.Session.Property("AppVersion").

The e.Data["AppVersion"] statement should be used only if you set data from the dialog with this.MsiRuntime.Data["AppVersion"] = "some value"; and I am not sure you did.

And another point to remember. If you use MsiRuntime.Data then you don't need to do project.DefaultDeferredProperties as the whole MsiRuntime.Data dictionary is tunneled to the AfterInstall event handler. Meaning that there is a less chance that something will go wrong.

> change my project to managed one as it seems more controllable on UI.
100% agree.

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>