diff --git a/build/build.ps1 b/build/build.ps1
index da4733d432..24fd548c61 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -11,7 +11,7 @@
[Alias("loc")]
[switch] $local = $false,
- # enable docfx
+ # enable docfx
[Parameter(Mandatory=$false)]
[Alias("doc")]
[switch] $docfx = $false,
@@ -40,7 +40,7 @@
@{ Continue = $continue })
if ($ubuild.OnError()) { return }
- Write-Host "Umbraco Cms Build"
+ Write-Host "Umbraco CMS Build"
Write-Host "Umbraco.Build v$($ubuild.BuildVersion)"
# ################################################################
@@ -84,7 +84,7 @@
$this.SetEnvVar("NPM_CONFIG_CACHE", $node_npmcache)
$this.SetEnvVar("NPM_CONFIG_PREFIX", $node_npmprefix)
- $ignore = $this.ClearEnvVar("NODE_NO_HTTP2")
+ $this.ClearEnvVar("NODE_NO_HTTP2")
})
$ubuild.DefineMethod("CompileBelle",
@@ -171,11 +171,6 @@
$src = "$($this.SolutionRoot)\src"
$log = "$($this.BuildTemp)\build.umbraco.log"
- if ($this.BuildEnv.VisualStudio -eq $null)
- {
- throw "Build environment does not provide VisualStudio."
- }
-
Write-Host "Compile Umbraco"
Write-Host "Logging to $log"
@@ -255,27 +250,21 @@
$buildConfiguration = "Release"
$log = "$($this.BuildTemp)\msbuild.tests.log"
- if ($this.BuildEnv.VisualStudio -eq $null)
- {
- throw "Build environment does not provide VisualStudio."
- }
-
Write-Host "Compile Tests"
Write-Host "Logging to $log"
# beware of the weird double \\ at the end of paths
# see http://edgylogic.com/blog/powershell-and-external-commands-done-right/
- &$this.BuildEnv.VisualStudio.MsBuild "$($this.SolutionRoot)\tests\Umbraco.Tests\Umbraco.Tests.csproj" `
- /p:WarningLevel=0 `
- /p:Configuration=$buildConfiguration `
- /p:Platform=AnyCPU `
- /p:UseWPP_CopyWebApplication=True `
- /p:PipelineDependsOnBuild=False `
- /p:OutDir="$($this.BuildTemp)\tests\\" `
- /p:Verbosity=minimal `
- /t:Build `
- /tv:"$($this.BuildEnv.VisualStudio.ToolsVersion)" `
- /p:UmbracoBuild=True `
+ &dotnet msbuild "$($this.SolutionRoot)\tests\Umbraco.Tests\Umbraco.Tests.csproj" `
+ -target:Build `
+ -property:WarningLevel=0 `
+ -property:Configuration=$buildConfiguration `
+ -property:Platform=AnyCPU `
+ -property:UseWPP_CopyWebApplication=True `
+ -property:PipelineDependsOnBuild=False `
+ -property:OutDir="$($this.BuildTemp)\tests\\" `
+ -property:Verbosity=minimal `
+ -property:UmbracoBuild=True `
> $log
# copy Umbraco.Persistence.SqlCe files into WebApp
@@ -292,10 +281,6 @@
$src = "$($this.SolutionRoot)\src"
$tmp = "$($this.BuildTemp)"
- $out = "$($this.BuildOutput)"
- $templates = "$($this.SolutionRoot)\build\templates"
-
- $buildConfiguration = "Release"
# cleanup build
Write-Host "Clean build"
@@ -309,7 +294,6 @@
# create directories
Write-Host "Create directories"
mkdir "$tmp\WebApp\App_Data" > $null
- mkdir "$tmp\Templates" > $null
#mkdir "$tmp\WebApp\Media" > $null
#mkdir "$tmp\WebApp\Views" > $null
@@ -332,10 +316,6 @@
{
$nugetPackages = [System.Environment]::ExpandEnvironmentVariables("%userprofile%\.nuget\packages")
}
- #$this.CopyFiles("$nugetPackages\umbraco.sqlserverce\4.0.0.1\runtimes\win-x86\native", "*.*", "$tmp\bin\x86")
- #$this.CopyFiles("$nugetPackages\umbraco.sqlserverce\4.0.0.1\runtimes\win-x64\native", "*.*", "$tmp\bin\amd64")
- #$this.CopyFiles("$nugetPackages\umbraco.sqlserverce\4.0.0.1\runtimes\win-x86\native", "*.*", "$tmp\WebApp\bin\x86")
- #$this.CopyFiles("$nugetPackages\umbraco.sqlserverce\4.0.0.1\runtimes\win-x64\native", "*.*", "$tmp\WebApp\bin\amd64")
# copy Belle
Write-Host "Copy Belle"
@@ -343,19 +323,6 @@
$this.CopyFiles("$src\Umbraco.Web.UI\wwwroot\umbraco\js", "*", "$tmp\WebApp\wwwroot\umbraco\js")
$this.CopyFiles("$src\Umbraco.Web.UI\wwwroot\umbraco\lib", "*", "$tmp\WebApp\wwwroot\umbraco\lib")
$this.CopyFiles("$src\Umbraco.Web.UI\wwwroot\umbraco\views", "*", "$tmp\WebApp\wwwroot\umbraco\views")
-
-
-
- # Prepare templates
- Write-Host "Copy template files"
- $this.CopyFiles("$templates", "*", "$tmp\Templates")
-
- Write-Host "Copy files for dotnet templates"
- $this.CopyFiles("$src\Umbraco.Web.UI", "Program.cs", "$tmp\Templates\UmbracoProject")
- $this.CopyFiles("$src\Umbraco.Web.UI", "Startup.cs", "$tmp\Templates\UmbracoProject")
- $this.CopyFiles("$src\Umbraco.Web.UI\Views", "*", "$tmp\Templates\UmbracoProject\Views")
-
- $this.RemoveDirectory("$tmp\Templates\UmbracoProject\bin")
})
@@ -389,7 +356,7 @@
{
Write-Host "Restore NuGet"
Write-Host "Logging to $($this.BuildTemp)\nuget.restore.log"
- $params = "-Source", $nugetsourceUmbraco
+ $params = "-Source", $nugetsourceUmbraco
&$this.BuildEnv.NuGet restore "$($this.SolutionRoot)\umbraco-netcore-only.sln" > "$($this.BuildTemp)\nuget.restore.log" @params
if (-not $?) { throw "Failed to restore NuGet packages." }
})
@@ -397,7 +364,7 @@
$ubuild.DefineMethod("PackageNuGet",
{
$nuspecs = "$($this.SolutionRoot)\build\NuSpecs"
- $templates = "$($this.BuildTemp)\Templates"
+ $templates = "$($this.SolutionRoot)\templates"
Write-Host "Create NuGet packages"
diff --git a/build/templates/Umbraco.Templates.nuspec b/build/templates/Umbraco.Templates.nuspec
deleted file mode 100644
index 21201d8d55..0000000000
--- a/build/templates/Umbraco.Templates.nuspec
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
- Umbraco.Templates
- 1.0.0
- Umbraco HQ
- Umbraco HQ
- MIT
- https://umbraco.com/
- https://umbraco.com/dist/nuget/logo-small.png
- false
- Umbraco Cms templates for .NET Core Template Engine available through the dotnet CLI's new command
- en-US
- umbraco
-
-
-
-
-
-
-
diff --git a/build/templates/UmbracoProject/.template.config/icon.png b/build/templates/UmbracoProject/.template.config/icon.png
deleted file mode 100644
index 6e94105808..0000000000
Binary files a/build/templates/UmbracoProject/.template.config/icon.png and /dev/null differ
diff --git a/build/templates/UmbracoProject/Views/_ViewImports.cshtml b/build/templates/UmbracoProject/Views/_ViewImports.cshtml
deleted file mode 100644
index cb9a0b658e..0000000000
--- a/build/templates/UmbracoProject/Views/_ViewImports.cshtml
+++ /dev/null
@@ -1,8 +0,0 @@
-@using Umbraco.Web.UI
-@using Umbraco.Extensions
-@using Umbraco.Web.PublishedModels
-@using Umbraco.Cms.Core.Models.PublishedContent
-@using Microsoft.AspNetCore.Html
-@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
-@addTagHelper *, Smidge
-@inject Smidge.SmidgeHelper SmidgeHelper
diff --git a/templates/Umbraco.Templates.nuspec b/templates/Umbraco.Templates.nuspec
new file mode 100644
index 0000000000..48688a66cd
--- /dev/null
+++ b/templates/Umbraco.Templates.nuspec
@@ -0,0 +1,29 @@
+
+
+
+ Umbraco.Templates
+ 1.0.0
+ Umbraco HQ
+ Umbraco HQ
+ MIT
+ https://umbraco.com/
+ icon.png
+ https://umbraco.com/dist/nuget/logo-small.png
+ false
+ Umbraco CMS templates for .NET Core Template Engine available through the dotnet CLI's new command
+ en-US
+ umbraco
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/templates/UmbracoPackage/.template.config/dotnetcli.host.json b/templates/UmbracoPackage/.template.config/dotnetcli.host.json
similarity index 100%
rename from build/templates/UmbracoPackage/.template.config/dotnetcli.host.json
rename to templates/UmbracoPackage/.template.config/dotnetcli.host.json
diff --git a/build/templates/UmbracoPackage/.template.config/ide.host.json b/templates/UmbracoPackage/.template.config/ide.host.json
similarity index 89%
rename from build/templates/UmbracoPackage/.template.config/ide.host.json
rename to templates/UmbracoPackage/.template.config/ide.host.json
index 8d3bae3e3c..aa4eb34552 100644
--- a/build/templates/UmbracoPackage/.template.config/ide.host.json
+++ b/templates/UmbracoPackage/.template.config/ide.host.json
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/vs-2017.3.host",
"order" : 0,
- "icon": "icon.png",
+ "icon": "../../icon.png",
"description": {
"id": "UmbracoPackage",
"text": "Umbraco Package - An empty Umbraco CMS package (Plugin)"
diff --git a/build/templates/UmbracoPackage/.template.config/template.json b/templates/UmbracoPackage/.template.config/template.json
similarity index 100%
rename from build/templates/UmbracoPackage/.template.config/template.json
rename to templates/UmbracoPackage/.template.config/template.json
diff --git a/build/templates/UmbracoPackage/App_Plugins/UmbracoPackage/package.manifest b/templates/UmbracoPackage/App_Plugins/UmbracoPackage/package.manifest
similarity index 100%
rename from build/templates/UmbracoPackage/App_Plugins/UmbracoPackage/package.manifest
rename to templates/UmbracoPackage/App_Plugins/UmbracoPackage/package.manifest
diff --git a/build/templates/UmbracoPackage/UmbracoPackage.csproj b/templates/UmbracoPackage/UmbracoPackage.csproj
similarity index 100%
rename from build/templates/UmbracoPackage/UmbracoPackage.csproj
rename to templates/UmbracoPackage/UmbracoPackage.csproj
diff --git a/build/templates/UmbracoPackage/build/UmbracoPackage.targets b/templates/UmbracoPackage/build/UmbracoPackage.targets
similarity index 100%
rename from build/templates/UmbracoPackage/build/UmbracoPackage.targets
rename to templates/UmbracoPackage/build/UmbracoPackage.targets
diff --git a/build/templates/UmbracoProject/.gitignore b/templates/UmbracoProject/.gitignore
similarity index 100%
rename from build/templates/UmbracoProject/.gitignore
rename to templates/UmbracoProject/.gitignore
diff --git a/build/templates/UmbracoProject/.template.config/dotnetcli.host.json b/templates/UmbracoProject/.template.config/dotnetcli.host.json
similarity index 100%
rename from build/templates/UmbracoProject/.template.config/dotnetcli.host.json
rename to templates/UmbracoProject/.template.config/dotnetcli.host.json
diff --git a/build/templates/UmbracoProject/.template.config/ide.host.json b/templates/UmbracoProject/.template.config/ide.host.json
similarity index 98%
rename from build/templates/UmbracoProject/.template.config/ide.host.json
rename to templates/UmbracoProject/.template.config/ide.host.json
index 1ee7a492aa..d44cb154c1 100644
--- a/build/templates/UmbracoProject/.template.config/ide.host.json
+++ b/templates/UmbracoProject/.template.config/ide.host.json
@@ -1,7 +1,7 @@
{
"$schema": "http://json.schemastore.org/vs-2017.3.host",
"order" : 0,
- "icon": "icon.png",
+ "icon": "../../icon.png",
"description": {
"id": "UmbracoProject",
"text": "Umbraco Web Application - An empty Umbraco CMS web application"
diff --git a/build/templates/UmbracoProject/.template.config/template.json b/templates/UmbracoProject/.template.config/template.json
similarity index 100%
rename from build/templates/UmbracoProject/.template.config/template.json
rename to templates/UmbracoProject/.template.config/template.json
diff --git a/build/templates/UmbracoProject/Properties/launchSettings.json b/templates/UmbracoProject/Properties/launchSettings.json
similarity index 100%
rename from build/templates/UmbracoProject/Properties/launchSettings.json
rename to templates/UmbracoProject/Properties/launchSettings.json
diff --git a/build/templates/UmbracoProject/UmbracoProject.csproj b/templates/UmbracoProject/UmbracoProject.csproj
similarity index 100%
rename from build/templates/UmbracoProject/UmbracoProject.csproj
rename to templates/UmbracoProject/UmbracoProject.csproj
diff --git a/build/templates/UmbracoProject/appsettings.Development.json b/templates/UmbracoProject/appsettings.Development.json
similarity index 100%
rename from build/templates/UmbracoProject/appsettings.Development.json
rename to templates/UmbracoProject/appsettings.Development.json
diff --git a/build/templates/UmbracoProject/appsettings.json b/templates/UmbracoProject/appsettings.json
similarity index 100%
rename from build/templates/UmbracoProject/appsettings.json
rename to templates/UmbracoProject/appsettings.json
diff --git a/build/templates/UmbracoPackage/.template.config/icon.png b/templates/icon.png
similarity index 100%
rename from build/templates/UmbracoPackage/.template.config/icon.png
rename to templates/icon.png