Cool, it's ok, it was a good learning excercise. I've only been doing .NET for
a couple years on the side so it's good to keep me on my toes.
How useful is LINQ? Hehehe, your joking right? Do you have any idea how
many times I've felt like blowing my brains out over the years after yet
another vbscript 1720 error because I didn't properly escape some MSI SQL
statement?
As an aside I was working on a project a year ago that I never finished... a
System.Data.Common DBProvider for MSI. I'm now wondering how I could use MSI
LINQ in the tools space to write visualization utilities like Orca. I know
how to do it ADO.NET style but I don't know what I would use here.
Thanks for the Session->QDatabase tip. I'll work on that and the subclassing
and see what I can put together. Wicked cool... this is the best interop I've
seen yet for MSI and I've looked over quite a few of them in the last couple of
years.
Jason Ginchereau <[EMAIL PROTECTED]> wrote:
I created Visual Studio templates today for C# and VB custom
action projects. Look for them in the next build. I really should have done
this before the release -- sorry for making you figure things out the hard way.
I'm happy to review any samples you want to contribute or blog about.
Be careful with the LINQ stuff... as noted in the doc it is experimental and
has some limitations. I am interested in feedback about it though: How useful
do you think it would be if the implementation was high quality?
Anyway it looks there's currently no public way to get a QDatabase for a
custom action Session. That's an oversight that will be easy to fix. If you
want to get something working temporarily, you can change the internal
QDatabase constructor to public, rebuild, and then create one like this:
new QDatabase(session.Database.Handle, false, String.Empty,
DatabaseOpenMode.ReadOnly);
To query a custom table, just use the indexer on the QDatabase instance:
qdb[tableName] returns a general-purpose QTable<QRecord>. Or you can create
your own custom QRecord subclass (like the ones in Entities.cs) and create and
run queries on a QTable<YourCustomRecord>
-Jason-
From: Christopher Painter [mailto:[EMAIL PROTECTED]
Sent: Monday, May 19, 2008 11:26 AM
To: Jason Ginchereau; [EMAIL PROTECTED]; wix-users@lists.sourceforge.net
Subject: RE: [WiX-users] DTF in WiX
If you'd give me some requirements and peer review my work, I'd be willing
to help contribute the samples as part of my DTF learning process.
BTW, I'm refactoring an ExecuteQuery/Scalar pattern I just wrote to LINQ
and I'm a little confused on how to get from session to QDatabase. the
db.InstallExecuteSequences explanation doesn't make sense to me. ( BTW, my
query is against a custom table, not a well known table ).
Jason Ginchereau <[EMAIL PROTECTED]> wrote:
Yes, a VS project template for a managed custom action is something we've
talked about that would be nice to do. In general I want to work on some richer
CA samples in the coming months.
From: Christopher Painter [mailto:[EMAIL PROTECTED]
Sent: Friday, May 16, 2008 7:39 PM
To: Jason Ginchereau; [EMAIL PROTECTED]; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] DTF in WiX
Sorry, one more question. How do you feel about WiX registering a new
project type in Visual Studio? A sample C# class that includes the right
references and plumbing to build the class and wrap it into a CA package
assembly?
Jason Ginchereau <[EMAIL PROTECTED]> wrote:
1) Yes, full support for the new functionality added in MSI 4.5 is
near the top of my list of things to work on in DTF. I have briefly looked at
the embedded external-UI feature, and I don't forsee any unusual technical
challenges to enabling embedded external-UI in managed code.
2) Oh, I guess that sample code in the doc is out of date.
Properties are accessed as an indexer directly on the session object. The CHM
reference topic for the Session class (Item Property) and the actual sample
ManagedCA project are correct.
3) DTF samples are included in the WiX sources (src/dtf/Samples) but
not in WiX3.msi.
4) Umm, grapefruit juice. Seriously. :)
Thank you for reporting these issues. I hope you find DTF useful.
-Jason-
From: Christopher Painter [mailto:[EMAIL PROTECTED]
Sent: Friday, May 16, 2008 1:25 PM
To: Jason Ginchereau; [EMAIL PROTECTED]; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] DTF in WiX
I have a few other questions for you if you don't mind.
1) Will DTF have support for authoring MSI 4.5 style Embedded External
UI handlers?
2) The Sample C# custom action references a Session.Property[ string
Property ] but when I add the reference and using statement I get an error
that that Session doesn't have a definition for Property. Am I pulling in the
wrong reference or something?
3) The CHM topic references a Samples\ManagedCA directory. I don't see
it?
4) What's your favorite beverage?
Jason Ginchereau <[EMAIL PROTECTED]> wrote:
Looks like Errors.resources.resources got ignored by by the zip which
is supposed to pickup all the sources, because of the .resources file
extension. I'll fix it for the next build.
Meanwhile you can create that file by running resgen.exe on Errors.txt.
(I should probably make that happen during the project build anyway.) Or you
can build without it, but you'll get resource exceptions instead of error
messages if you encounter any errors in cabinet creation/extraction.
-Jason-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Christopher Painter
Sent: Friday, May 16, 2008 11:42 AM
To: [EMAIL PROTECTED]; wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] DTF in WiX
I also pulled the sources but I can't get the Compression.Cab project
in the DTF solution to build. It's missing the file Errors.resources.resources
file. If I exclude it from the project it seems to build fine though.
Christopher Painter <[EMAIL PROTECTED]> wrote:
I'm was reading DTF.chm and it looks really fabulous. I want to play
with it right now but I don't see MakeSfxCA.exe. Am I missing something?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users