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

New Post: Installing to %PersonalFileFolders%

$
0
0

Thank you, that makes sense.

I injected the fix in my sample code and I seem to be missing something.

using System;

using System.Linq;

using System.Xml;

using System.Xml.Linq;

using WixSharp;

using WixSharp.CommonTasks;

//----

project.WixSourceGenerated +=Project_WixSourceGenerated;

(error: an object reference is required for the non-static field, method, or property “Script.Program.Project_WixSourceGenerated (System.Xml.Linq.XDocument))

void Project_WixSourceGenerated(XDocument document)

{

var dir = document.FindAll("Directory")

.Where(x =>x.HasAttribute("Name","Test Project")&&x.Parent.HasAttribute("Name","PersonalFolder"))

.First();

var comp = dir.Element("Component");

comp.AddElement("RemoveFolder","On=uninstall; Id="+ dir.Attribute("Id").Value);

comp.AddElement("RegistryValue",@"Root=HKCU; Key=Software\[Manufacturer]\[ProductName]; Type=string; Value=; KeyPath=yes");

}

(error: ‘System.Xml.Linq.XElement’ does not contain a definition for ‘HasAttribute’ and the best extension method overload ‘WixSharp.Extensions.HasAttribute(System.Xml.Linq.XElement, string, System.Predicate<string>)’ has some invalid arguments.)

Argument 3: cannot convert from ‘string’ to ‘System.Predicate<string>’

I looked at the binary code to download, but am not sure what to download. This fix will work if I can figure out what is missing.

Robert Race, PE

Race Engineering Assoc

4851 Four Seasons Ct

Eagan, MN 55122

t: 612.670.7009

e: [email removed]


Viewing all articles
Browse latest Browse all 1354

Trending Articles



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