I 'm trying to create a nuget package which
1. adds a new classlibrary project to the open solution and
2. injects some predefined files in the newly added classlibrary project.
I can do this my using "DTE" code:
Add-Type -Assembly EnvDTE100
$solution = get-interface $dte.solution ([EnvDTE100.Solution4])
$templatepath= $solution.GetProjectTemplate("ClassLibrary.zip", "CSharp")
$solution.AddFromTemplate($templatepath, "<path to current solution>\MyNewClassLib", "MyNewClassLib", $false)
$classLibProject = Get-Project $NewProjectName
My point is that i would rather like to inject files for the new project via the regular nuget mechanism, but I didn't find a way to set the "current project" to the newly added project in such a way that the nuget files in the package are injected
in the classlib rather than in the project on which nuget is initialy run.
Would be great if someone could point me in the right direction (or point to a similar nuget package).