diff --git a/src/Unosquare.Labs.EmbedIO.Samples/StaticFilesSample.cs b/src/Unosquare.Labs.EmbedIO.Samples/StaticFilesSample.cs index bf132f586..921d2bdfb 100644 --- a/src/Unosquare.Labs.EmbedIO.Samples/StaticFilesSample.cs +++ b/src/Unosquare.Labs.EmbedIO.Samples/StaticFilesSample.cs @@ -20,9 +20,10 @@ public static string HtmlRootPath get { var assemblyPath = Path.GetDirectoryName(typeof (Program).GetTypeInfo().Assembly.Location); + #if DEBUG // This lets you edit the files without restarting the server. - return Path.GetFullPath(Path.Combine(assemblyPath, "..\\..\\html")); + return Path.Combine(Directory.GetParent(assemblyPath).Parent.Parent.FullName, "html"); #else // This is when you have deployed the server. return Path.Combine(assemblyPath, "html"); diff --git a/src/Unosquare.Labs.EmbedIO.Samples/project.json b/src/Unosquare.Labs.EmbedIO.Samples/project.json index b43a33aef..7309a0bd5 100644 --- a/src/Unosquare.Labs.EmbedIO.Samples/project.json +++ b/src/Unosquare.Labs.EmbedIO.Samples/project.json @@ -2,7 +2,7 @@ "version": "1.0.0-*", "buildOptions": { "emitEntryPoint": true, - "copyToOutput": "html" + "copyToOutput": ["html\\"] }, "dependencies": {