c# - Visual Studio 2013 IWizard ProjectFinishedGenerating How To Add A Reference Programmatically -
i'm working on small project of mine requires using iwizard interface microsoft.visualstudio.templatewizard. want add c# .net reference project after it's generated based on input form. project that's being generated c# library custom code. need in figuring out how access references project class. i've tried casting vsproject no avial, , documentation in remarks portion vague it.
this says in documentation i'm having trouble with: "reference object using dte.solution.item or using specific language's objects, such dte.vbprojects.item, or dte.vcprojects.item." from: https://msdn.microsoft.com/en-us/library/envdte.project.aspx
here's code:
public void projectfinishedgenerating(project project) { vsproject vsproj = (vsproject)project; vsproj.references.add(form.referencedllpath); }
i've tried using dte described, (vsproject)project.dte.solution.items(0), i've gotten errors. above last resort. appreciated!
Comments
Post a Comment