I have the powershell code below which will get all the projects in the solution, by name.
However, I want to get just those projects which start with “Test” (ignore the -match bit as I have played with various things). What am I missing?
cd C:\SourceControlledProjects\ClassLibrary1
gc ClassLibrary1.sln |
? { $_ -match “^Project” } |
% { ($.Split(“,”))[1].Trim().Trim(‘”‘) } |
? { $ -match “.*proj” } |
% { $x = [xml](gc $); $x.Project.PropertyGroup[0].AssemblyName }
% { $ + “.dll” } | Format-Table | Where {$_ -match “TestProject1”}
Thanks
This should make life easier:
This turns the output into a property bag, from there on in, it’s just:
Hope this Helps