-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to mark a .NET assembly to be NGen'd during install #43
Comments
Sorry I somehow missed your post. Note, currently, Wix# allows generic Entities to be added to directories only. I am marking this post as You will need something similar to thie: var project =
new Project("MyProduct",
new Dir(@"%ProgramFiles64Folder%\My Company\My Product",
new NativeImage { Platform = "32bit" },
new File(@"Files\Bin\MyApp.exe"),
...
public class NativeImage : WixEntity, IGenericEntity
{
[WixSharp.Xml]
new public string Id
{
get { return base.Id; }
set { Id = value; }
}
[WixSharp.Xml]
public string Platform;
[WixSharp.Xml]
public int Priority = 0;
[WixSharp.Xml]
public string AppBaseDirectory;
....
public void Process(ProcessingContext context)
{
var util = WixExtension.NetFx;
context.Project.IncludeWixExtension(util);
//serialize itself and add to the parent component
context.XParent
.FindAll("File")
.First(e => e.HasAttribute("Source", value=>value.EndsWith("MyApp.exe")))
.Add(this.ToXElement(util, "NativeImage"));
}
} |
Hi Oleg, No worries. |
Done in 61ed80e new Project("MyProduct",
new Dir(@"%ProgramFiles%\MyCompany\MyProduct",
new Files(@"Release\Bin\logger.dll",
new NativeImage { Platform = NativeImagePlatform.x86}), |
Great News Oleg! I see you modified the Thanks! |
In Wix XML it is possible to add the NetFxExtension which enables the netfx:NativeImage sub-element to be added under the element.
Wix# apparently have a predefined set of sub-elements that are allowed to put inside , so this approach seems to not be possible.
What is the usual / recommended way to NGen assemblies during install via Wix#? Any examples?
The text was updated successfully, but these errors were encountered: