Create a new website in Visual Studio by selecting File from the toolbar and selecting New Web Site.
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img3.jpg)
Create a Visual Basic website.
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img5.jpg)
Remove (delete) all the files.
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img8.jpg)
Replace with the following structure:
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/imgC.jpg)
From the File menu, select Source Control, then Add Web Site to Source Control...
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/imgF.jpg)
Add the web site to Source Control.
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img12.jpg)
Check the files in
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img14.jpg)
The directories will show up in Source Control
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img18.jpg)
Close Visual Studio and install DotNetNuke on top of the website you just created
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img1C.jpg)
Open Visual Studio and then open the website using Open Web Site. You will then be prompted for your Team Foundation password.
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img1F.jpg)
Remove the Placeholder.txt files.
When you create code in either the DesktopModules or the App_Code folder and check in the code...
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img22.jpg)
It is checked into Source Control normally.
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img24.jpg)
Only the App_Code and the DesktopModules directories are stored in Source Control, not the entire DotNetNuke site.
![](http://www.adefwebserver.com/DotNetNukeHELP/UsingSourceControl/images/img27.jpg)
special thanks to Ian Lackey for showing me how to do this with http://www.codeplex.com/IWeb