Fügen Sie mit PowerShell ein vorhandenes Projekt zum Projektmappenordner hinzu
Ich arbeite an einem PowerShell-Skript, um ein Visual Studio-Projekt mit seinen Ordnern und Elementen dynamisch zu erstellen und einer Lösung hinzuzufügen. Ich verwende Visual Studio DTE.
Meine Verzeichnisstruktur im Dateisystem ist folgende:
C:\Dir1\Dir2\Stuff
|
+--Stuff <-- folder
| |
| `Stuff.csproj <-- existing project, included in sln
|
+--Subfolder <-- Subfolder in which I want to include my new csproj
| +--Project1 <-- folder
| | |
| | `Project1.csproj <-- existing project, included in sln
| |
| +--Project2 <-- folder
| | |
| | `Project2.csproj <-- existing project, included in sln
| |
| `--Project3 <-- this, subs below and csproj are created from my script
| |
| `Project3.csproj
|
`Stuff.sln
Mein Skript erstellt den Unterordner \ Project3 \ Project3.csproj ordnungsgemäß, und ich kann ihn mithilfe von DTE problemlos zur Projektmappe hinzufügen.
Ich möchte jedoch Project3 in das hinzufügenLösungsordner 'Unterordner'So sieht es also aus (Dummy-Bild, roter Pfeil zeigt, wo ich Project3 haben möchte):
Wie kann ich dies mit Powershell (und optional EnvDTE) erreichen? Jeder Beispielcode wäre willkommen. Vielen Dank!