diff --git a/src/Orchard.Web/Modules/Orchard.DevTools/Commands/ScaffoldingCommands.cs b/src/Orchard.Web/Modules/Orchard.DevTools/Commands/ScaffoldingCommands.cs index 6a3a4fb12..ede0ec79b 100644 --- a/src/Orchard.Web/Modules/Orchard.DevTools/Commands/ScaffoldingCommands.cs +++ b/src/Orchard.Web/Modules/Orchard.DevTools/Commands/ScaffoldingCommands.cs @@ -140,14 +140,6 @@ namespace Orchard.DevTools.Commands { CreateFilesFromTemplates(moduleName, projectGuid); // The string searches in solution/project files can be made aware of comment lines. if (IncludeInSolution) { - // Add project reference to Orchard.Web.csproj - string webProjectReference = string.Format( - "\r\n \r\n {{{1}}}\r\n {0}\r\n ", - moduleName, projectGuid); - string webProjectText = File.ReadAllText(rootWebProjectPath); - webProjectText = webProjectText.Insert(webProjectText.LastIndexOf("\r\n"), webProjectReference); - File.WriteAllText(rootWebProjectPath, webProjectText); - // Add project to Orchard.sln string solutionPath = Directory.GetParent(rootWebProjectPath).Parent.FullName + "\\Orchard.sln"; if (File.Exists(solutionPath)) { @@ -177,6 +169,12 @@ namespace Orchard.DevTools.Commands { Directory.CreateDirectory(modulePath); Directory.CreateDirectory(propertiesPath); + Directory.CreateDirectory(modulePath + "Controllers"); + Directory.CreateDirectory(modulePath + "Views"); + File.WriteAllText(modulePath + "\\Views\\Web.config", File.ReadAllText(templatesPath + "ViewsWebConfig.txt")); + Directory.CreateDirectory(modulePath + "Models"); + Directory.CreateDirectory(modulePath + "Scripts"); + string templateText = File.ReadAllText(templatesPath + "ModuleAssemblyInfo.txt"); templateText = templateText.Replace("$$ModuleName$$", moduleName); templateText = templateText.Replace("$$ModuleTypeLibGuid$$", Guid.NewGuid().ToString()); diff --git a/src/Orchard.Web/Modules/Orchard.DevTools/Orchard.DevTools.csproj b/src/Orchard.Web/Modules/Orchard.DevTools/Orchard.DevTools.csproj index 6f46b98f8..089d9b74b 100644 --- a/src/Orchard.Web/Modules/Orchard.DevTools/Orchard.DevTools.csproj +++ b/src/Orchard.Web/Modules/Orchard.DevTools/Orchard.DevTools.csproj @@ -97,6 +97,7 @@ + diff --git a/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/ModuleCsProj.txt b/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/ModuleCsProj.txt index d6b6dd2d3..d51ce1f02 100644 --- a/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/ModuleCsProj.txt +++ b/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/ModuleCsProj.txt @@ -70,6 +70,13 @@ + + + + + + + diff --git a/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/ViewsWebConfig.txt b/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/ViewsWebConfig.txt new file mode 100644 index 000000000..7022197d4 --- /dev/null +++ b/src/Orchard.Web/Modules/Orchard.DevTools/ScaffoldingTemplates/ViewsWebConfig.txt @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + +