c# - How do I add project references to a wix project programmatically? -


i attempting add references wix project after has been created programmatically. in implementation of microsoft.visualstudio.templatewizard.iwizard. know how envdte.project's:

// add project reference projecta projectb. // allows projecta use classes projectb. var temp = (vsproject2)projecta.object; temp.references.addproject(projectb); 

but can't figure out how oawixproject. appreciated. thank you!

edit: should mention problems arise when attempt cast (vsproject2)projecta.object when projecta oawixproject.

not sure how you'd use wix sdk dlls edit wixproj file, resort editing wixproj xml programatically. looks you'd add itemgroup element root project element. xml you'd need inject like:

<itemgroup>     <projectreference include="..\mysolution\customassembly.csproj">         <name>customassembly</name>         <project>{233e4372-895b-4c8d-99b0-f8314d907d66}</project>         <private>true</private>         <donotharvest>true</donotharvest>         <refprojectoutputgroups>binaries;content;satellites</refprojectoutputgroups>         <reftargetdir>installfolder</reftargetdir>     </projectreference> </itemgroup> 

the project guid taken csproj of referenced project.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

html - How can i make an element from a bottom stacking context stays in front of another higher stacking context? -

html - href attribute breaking an element -