Permalink
Browse files

win app: added html via post-build build event

  • Loading branch information...
1 parent 5630dda commit a9055813a7db887f9bff88e50d2d9f41caffd284 @todbot committed Jan 6, 2013
@@ -115,6 +115,13 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PreBuildEvent>
+ </PreBuildEvent>
+ </PropertyGroup>
+ <PropertyGroup>
+ <PostBuildEvent>xcopy /i /e /y $(SolutionDir)\..\..\libraries\html $(OutDir)\html</PostBuildEvent>
+ </PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@@ -104,10 +104,12 @@ public Blink1Server()
try {
VirtualDirectory root = new VirtualDirectory();
- DriveDirectory homeDir = new DriveDirectory(System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
- foreach (DriveDirectory d in homeDir.GetDirectories()) {
- root.AddDirectory(d.Path);
- }
+ // note: this works because there is an xcopy as a post build-build event
+ string baseDir = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ baseDir += "\\html\\blink_1";
+ DriveDirectory htmlDir = new DriveDirectory(baseDir);
+ Console.WriteLine("htmlDir: " + htmlDir.Path);
+ root.AddDirectory(htmlDir.Path);
VirtualDirectory blink1dir = new VirtualDirectory("blink1", root);

0 comments on commit a905581

Please sign in to comment.