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 -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -