Skip to content

Commit

Permalink
v10: Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj (#12413)
Browse files Browse the repository at this point in the history
* Reintroduce language files tests (#12367)

* Reintroducing language files tests

* Fix casing

* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

* Remove Umbraco.Templates from VerifyNuGet step

* Remove duplicate and unnecessary properties

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
  • Loading branch information
3 people committed May 19, 2022
1 parent b832168 commit dd617ed
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 114 deletions.
31 changes: 0 additions & 31 deletions build/NuSpecs/UmbracoCms.nuspec

This file was deleted.

33 changes: 15 additions & 18 deletions build/build.ps1
Expand Up @@ -340,9 +340,6 @@

$ubuild.DefineMethod("PackageNuGet",
{
$nuspecs = "$($this.SolutionRoot)\build\NuSpecs"
$templates = "$($this.SolutionRoot)\templates"

Write-Host "Create NuGet packages"

&dotnet pack "$($this.SolutionRoot)\umbraco.sln" `
Expand All @@ -351,19 +348,6 @@
-c Release `
-p:PackageVersion="$($this.Version.Semver.ToString())" > "$($this.BuildTemp)\pack.umbraco.log"

&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cms.log"
if (-not $?) { throw "Failed to pack NuGet UmbracoCms." }

&$this.BuildEnv.NuGet Pack "$templates\Umbraco.Templates.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
-NoDefaultExcludes `
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.templates.log"
if (-not $?) { throw "Failed to pack NuGet Umbraco.Templates." }

# run hook
if ($this.HasMethod("PostPackageNuGet"))
{
Expand All @@ -376,8 +360,21 @@
$ubuild.DefineMethod("VerifyNuGet",
{
$this.VerifyNuGetConsistency(
("UmbracoCms"),
("Umbraco.Core", "Umbraco.Infrastructure", "Umbraco.Web.UI", "Umbraco.Examine.Lucene", "Umbraco.PublishedCache.NuCache", "Umbraco.Web.Common", "Umbraco.Web.Website", "Umbraco.Web.BackOffice", "Umbraco.Cms.Persistence.Sqlite", "Umbraco.Cms.Persistence.SqlServer"))
@(),
(
"Umbraco.Cms",
"Umbraco.Cms.Persistence.Sqlite",
"Umbraco.Cms.Persistence.SqlServer",
"Umbraco.Cms.StaticAssets",
"Umbraco.Core",
"Umbraco.Examine.Lucene",
"Umbraco.Infrastructure",
"Umbraco.PublishedCache.NuCache",
"Umbraco.Web.BackOffice",
"Umbraco.Web.Common",
"Umbraco.Web.UI",
"Umbraco.Web.Website"
))
if ($this.OnError()) { return }
})

Expand Down
21 changes: 21 additions & 0 deletions src/Umbraco.Cms/Umbraco.Cms.csproj
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IncludeBuildOutput>false</IncludeBuildOutput>
<PackageId>Umbraco.Cms</PackageId>
<Title>Umbraco.Cms</Title>
<Description>Installs Umbraco CMS in your ASP.NET Core project</Description>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Umbraco.Cms.Persistence.Sqlite\Umbraco.Cms.Persistence.Sqlite.csproj" />
<ProjectReference Include="..\Umbraco.Cms.Persistence.SqlServer\Umbraco.Cms.Persistence.SqlServer.csproj" />
<ProjectReference Include="..\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj" />
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
</ItemGroup>

<ItemGroup>
<Content Include="buildTransitive\**" PackagePath="buildTransitive" />
</ItemGroup>
</Project>
23 changes: 4 additions & 19 deletions src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
@@ -1,36 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>Umbraco.Cms.Web.UI</RootNamespace>
</PropertyGroup>

<Import Project="..\..\build\NuSpecs\buildTransitive\Umbraco.Cms.props" />

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DocumentationFile>bin/Release/Umbraco.Web.UI.xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup>
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
</PropertyGroup>


<Import Project="..\Umbraco.Cms\buildTransitive\Umbraco.Cms.props" />
<ItemGroup>
<ProjectReference Include="../Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj" />
<ProjectReference Include="../Umbraco.Web.BackOffice/Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="../Umbraco.Web.Common/Umbraco.Web.Common.csproj" />
<ProjectReference Include="../Umbraco.Web.Website/Umbraco.Web.Website.csproj" />
<ProjectReference Include="..\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj" />
<ProjectReference Include="..\Umbraco.PublishedCache.NuCache\Umbraco.PublishedCache.NuCache.csproj" />
<ProjectReference Include="..\Umbraco.Web.BackOffice\Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
<ProjectReference Include="..\Umbraco.Web.Website\Umbraco.Web.Website.csproj" />
<ProjectReference Include="..\Umbraco.Cms.Persistence.Sqlite\Umbraco.Cms.Persistence.Sqlite.csproj" />
<ProjectReference Include="..\Umbraco.Cms.Persistence.SqlServer\Umbraco.Cms.Persistence.SqlServer.csproj" />
<ProjectReference Include="../Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj" />
<ProjectReference Include="../Umbraco.Web.BackOffice/Umbraco.Web.BackOffice.csproj" />
<ProjectReference Include="../Umbraco.Web.Common/Umbraco.Web.Common.csproj" />
<ProjectReference Include="../Umbraco.Web.Website/Umbraco.Web.Website.csproj" />
<ProjectReference Include="..\Umbraco.Cms\Umbraco.Cms.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
42 changes: 42 additions & 0 deletions templates/Umbraco.Templates.csproj
@@ -0,0 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Enable multi-level merging with src -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../src/'))" />

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<PackageType>Template</PackageType>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>.</ContentTargetFolders>
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>

<ItemGroup>
<Content Include="icon.png" Visible="false" />
<Content Include="UmbracoPackage\**" Exclude="bin;obj" />
<Content Include="UmbracoProject\**" Exclude="bin;obj" />
<Content Include="..\src\Umbraco.Web.UI\Program.cs">
<Link>UmbracoProject\Program.cs</Link>
<PackagePath>UmbracoProject</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI\Startup.cs">
<Link>UmbracoProject\Startup.cs</Link>
<PackagePath>UmbracoProject</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\blocklist\**">
<Link>UmbracoProject\Views\Partials\blocklist\%(RecursiveDir)%(Filename)%(Extension)</Link>
<PackagePath>UmbracoProject\Views\Partials\blocklist</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\grid\**">
<Link>UmbracoProject\Views\Partials\grid\%(RecursiveDir)%(Filename)%(Extension)</Link>
<PackagePath>UmbracoProject\Views\Partials\grid</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI\Views\_ViewImports.cshtml">
<Link>UmbracoProject\Views\_ViewImports.cshtml</Link>
<PackagePath>UmbracoProject\Views</PackagePath>
</Content>
<Content Include="..\src\Umbraco.Web.UI\wwwroot\favicon.ico">
<Link>UmbracoProject\wwwroot\favicon.ico</Link>
<PackagePath>UmbracoProject\wwwroot</PackagePath>
</Content>
</ItemGroup>
</Project>
32 changes: 0 additions & 32 deletions templates/Umbraco.Templates.nuspec

This file was deleted.

35 changes: 21 additions & 14 deletions umbraco.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29209.152
# Visual Studio Version 17
VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Web.UI", "src\Umbraco.Web.UI\Umbraco.Web.UI.csproj", "{DCDFE97C-5630-4F6F-855D-8AEEB96556A5}"
EndProject
Expand All @@ -26,11 +26,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{FD962632-1
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{B5BD12C1-A454-435E-8A46-FF4A364C0382}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuSpecs", "NuSpecs", "{227C3B55-80E5-4E7E-A802-BE16C5128B9D}"
ProjectSection(SolutionItems) = preProject
build\NuSpecs\UmbracoCms.nuspec = build\NuSpecs\UmbracoCms.nuspec
EndProjectSection
EndProject
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "http://localhost:3961", "{3819A550-DCEC-4153-91B4-8BA9F7F0B9B4}"
ProjectSection(WebsiteProperties) = preProject
UseIISExpress = "true"
Expand Down Expand Up @@ -124,12 +119,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Persistence.Sql
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.Persistence.SqlServer", "src\Umbraco.Cms.Persistence.SqlServer\Umbraco.Cms.Persistence.SqlServer.csproj", "{93C5910D-2E36-475D-88EB-A11BA5B50F65}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Cms.StaticAssets", "src\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj", "{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms.StaticAssets", "src\Umbraco.Cms.StaticAssets\Umbraco.Cms.StaticAssets.csproj", "{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "buildTransitive", "buildTransitive", "{A05481CB-A335-4BB7-9A86-1BBB3874F742}"
ProjectSection(SolutionItems) = preProject
build\NuSpecs\buildTransitive\Umbraco.Cms.props = build\NuSpecs\buildTransitive\Umbraco.Cms.props
EndProjectSection
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Templates", "Templates", "{6D72A60B-0542-4AA9-A493-DD4179E838A1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Templates", "templates\Umbraco.Templates.csproj", "{05C1D0C8-C592-468F-AF8F-A299B9B3A903}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.Cms", "src\Umbraco.Cms\Umbraco.Cms.csproj", "{92EAA57A-CC99-4F5D-9D9C-B865293F6000}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -241,12 +237,23 @@ Global
{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}.Release|Any CPU.Build.0 = Release|Any CPU
{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
{D2FD54E8-3470-4A98-8B0C-A9ACB59BED48}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.Debug|Any CPU.Build.0 = Debug|Any CPU
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.Release|Any CPU.ActiveCfg = Release|Any CPU
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.Release|Any CPU.Build.0 = Release|Any CPU
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
{05C1D0C8-C592-468F-AF8F-A299B9B3A903}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.Release|Any CPU.Build.0 = Release|Any CPU
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.SkipTests|Any CPU.ActiveCfg = Debug|Any CPU
{92EAA57A-CC99-4F5D-9D9C-B865293F6000}.SkipTests|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{227C3B55-80E5-4E7E-A802-BE16C5128B9D} = {2849E9D4-3B4E-40A3-A309-F3CB4F0E125F}
{9E4C8A12-FBE0-4673-8CE2-DF99D5D57817} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
{53594E5B-64A2-4545-8367-E3627D266AE8} = {FD962632-184C-4005-A5F3-E705D92FC645}
{3A33ADC9-C6C0-4DB1-A613-A9AF0210DF3D} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
Expand All @@ -255,7 +262,7 @@ Global
{D6319409-777A-4BD0-93ED-B2DFD805B32C} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
{A499779C-1B3B-48A8-B551-458E582E6E96} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
{9102ABDF-E537-4E46-B525-C9ED4833EED0} = {B5BD12C1-A454-435E-8A46-FF4A364C0382}
{A05481CB-A335-4BB7-9A86-1BBB3874F742} = {227C3B55-80E5-4E7E-A802-BE16C5128B9D}
{05C1D0C8-C592-468F-AF8F-A299B9B3A903} = {6D72A60B-0542-4AA9-A493-DD4179E838A1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7A0F2E34-D2AF-4DAB-86A0-7D7764B3D0EC}
Expand Down

0 comments on commit dd617ed

Please sign in to comment.