how to add folder in solution explorer at runtime in C#.net
Addding folder in solution explorer
Collapse
X
-
i dont think this works at runtime because i tried using io.directory.cr eate(), same thing basically, and it didnt pop up, but when i open the directory in windows explorer i can see the created folder there, just not in the solution explorer at runtime...Originally posted by Ganesh9uDirectoryInfo d = new DirectoryInfo() ;
d.Create(@"your solution explorer path eg.Eg E:\projectname\ \folder name");
joedeeneComment
-
Why do you need to add a folder to your solution? I can see why it wouldn't be easy, realistically, the app isn't really part of the solution. It is the result, but it isn't running in the context of the solution. You might have to add the directory and edit the .sln file. Open it up with notepad or wordpad. You might be able to figure out what's going on in the solution.Comment
-
You will have to add it in your .csproj file, like this:
<ItemGroup>
<Folder Include="MyNewF older\" />
</ItemGroup>
I agree with insertAlias on this as i can not see any point at all of what you want to do (unless you're building another VisualStudio, or some batch solution maker).
But anyway, that's the way to add the folder in the solution.
CheersComment
Comment