سؤال

I want a quick way to open a bunch of Visual Studio projects at once. I have a collection of folders, and I want to run some code that runs through each subfolder and opens the file that ends with ".sln". In pseudocode:

For each SubFolder in ProjectsFolder
    Open SubFolder
    Start "\*.sln"
Next

Might be I've missed something obvious, but I couldn't find anything helpful through Google.

هل كانت مفيدة؟

المحلول

Try using the Process class:

Dim parentFolder As New DirectoryInfo("c:\myfolder")
For Each f As FileInfo In parentFolder.GetFiles("*.sln", _
                                                SearchOption.AllDirectories)
  Process.Start(f.FullName)
Next
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top