Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline centalized package version management #1777

Merged
merged 6 commits into from
May 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions OrchardCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{184139CF
src\OrchardCore.Build\Dependencies.props = src\OrchardCore.Build\Dependencies.props
NuGet.config = NuGet.config
src\OrchardCore.Build\OrchardCore.Commons.props = src\OrchardCore.Build\OrchardCore.Commons.props
src\OrchardCore.Build\OrchardCore.Commons.targets = src\OrchardCore.Build\OrchardCore.Commons.targets
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Email", "src\OrchardCore.Modules\OrchardCore.Email\OrchardCore.Email.csproj", "{B3E9EC5B-171E-43FB-8620-7FC24D0A985A}"
Expand Down
392 changes: 196 additions & 196 deletions src/OrchardCore.Build/Dependencies.AspNetCore.props

Large diffs are not rendered by default.

49 changes: 38 additions & 11 deletions src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,44 @@
we don't need to specify a specific version (including security pathes).
-->
<RuntimeFrameworkVersion Condition="'$(TargetFramework)'=='netcoreapp2.0'">2.0.0</RuntimeFrameworkVersion>
<TestSdkVersion>15.3.0</TestSdkVersion>
<XunitAnalyzers>0.3.0</XunitAnalyzers>
<XunitVersion>2.3.0-beta2-build3683</XunitVersion>
<XunitRunnerVisualStudioVersion>2.3.0-beta2-build1317</XunitRunnerVisualStudioVersion>
<FluidCoreVersion>1.0.0-beta-9442</FluidCoreVersion>
<YesSqlVersion>2.0.0-beta-1194</YesSqlVersion>
<YesSqlProvidersVersion>1.0.0-beta-1194</YesSqlProvidersVersion>
<NewtonsoftJsonVersion>10.0.3</NewtonsoftJsonVersion>
<OAuthValidationPackageVersion>2.0.0-rc2-final</OAuthValidationPackageVersion>
<OpenIddictVersion>2.0.0-rc2-final</OpenIddictVersion>
<LuceneNetVersion>4.8.0-beta00005</LuceneNetVersion>

<!-- Special case - this property is used by a DotNetCliToolReference -->
<DotNetXunitVersion>2.3.0-beta2-build3683</DotNetXunitVersion>
</PropertyGroup>

<ItemGroup>
<PackageManagement Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<PackageManagement Include="xunit.analyzers" Version="0.3.0" />
<PackageManagement Include="xunit" Version="2.3.0-beta2-build3683" />
<PackageManagement Include="xunit.runner.visualstudio" Version="2.3.0-beta2-build1317" />
<PackageManagement Include="Fluid.Core" Version="1.0.0-beta-9442" />
<PackageManagement Include="YesSql" Version="2.0.0-beta-1194" />
<PackageManagement Include="YesSql.Core" Version="2.0.0-beta-1194" />
<PackageManagement Include="YesSql.Providers" Version="1.0.0-beta-1194" />
<PackageManagement Include="YesSql.Provider.PostgreSql" Version="1.0.0-beta-1194" />
<PackageManagement Include="YesSql.Provider.SqLite" Version="1.0.0-beta-1194" />
<PackageManagement Include="YesSql.Provider.MySql" Version="1.0.0-beta-1194" />
<PackageManagement Include="YesSql.Provider.SqlServer" Version="1.0.0-beta-1194" />
<PackageManagement Include="Nancy" Version="2.0.0-clinteastwood" />
<PackageManagement Include="Newtonsoft.Json" Version="10.0.3" />
<PackageManagement Include="AspNet.Security.OAuth.Validation" Version="2.0.0-rc2-final" />
<PackageManagement Include="OpenIddict" Version="2.0.0-rc2-final" />
<PackageManagement Include="OpenIddict.Core" Version="2.0.0-rc2-final" />
<PackageManagement Include="OpenIddict.EntityFrameworkCore" Version="2.0.0-rc2-final" />
<PackageManagement Include="Lucene.Net" Version="4.8.0-beta00005" />
<PackageManagement Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00005" />
<PackageManagement Include="Lucene.Net.QueryParser" Version="4.8.0-beta00005" />
<PackageManagement Include="YamlDotNet" Version="4.2.1" />
<PackageManagement Include="NLog.Web.AspNetCore" Version="4.5.0-rc2" />
<PackageManagement Include="Castle.Core" Version="4.1.1" />
<PackageManagement Include="SQLitePCLRaw.bundle_green" Version="1.1.10-*" />
<PackageManagement Include="Irony.Core" Version="1.0.7" />
<PackageManagement Include="ncrontab" Version="3.3.0" />
<PackageManagement Include="Jint" Version="3.0.0-beta-1138" />
<PackageManagement Include="Moq" Version="4.7.99" />
<PackageManagement Include="SixLabors.ImageSharp.Web" Version="1.0.0-beta0003" />
<PackageManagement Include="Markdig" Version="0.13.1" />
<PackageManagement Include="WindowsAzure.Storage" Version="8.5.0" />
</ItemGroup>

</Project>
47 changes: 47 additions & 0 deletions src/OrchardCore.Build/OrchardCore.Commons.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Target Name="VerifyIncludeBuildOutputProperty" AfterTargets="BeforeCompile" BeforeTargets="CoreCompile">
<PropertyGroup>
<_HasCompileItems Condition=" '@(Compile)' == '' ">false</_HasCompileItems>
<_HasCompileItems Condition=" '@(Compile)' != '' ">true</_HasCompileItems>
</PropertyGroup>

<Error Condition=" '$(_HasCompileItems)' == 'false' and '$(IncludeBuildOutput)' != 'false' "
Text="Project contains no 'Compile' items. Set &lt;IncludeBuildOutput&gt;false&lt;/IncludeBuildOutput&gt; in $(MSBuildProjectFile)."
File="$(MSBuildProjectFullPath)" />
</Target>

<Target Name="ApplyPackageManagement" BeforeTargets="CollectPackageReferences" DependsOnTargets="ApplyPackageManagementItems" />

<Target Name="ApplyPackageManagementItems" Inputs="@(PackageManagement)" Outputs="%(PackageManagement.Identity)">
<PropertyGroup>
<_PackageManagementIdentity>%(PackageManagement.Identity)</_PackageManagementIdentity>
<_PackageManagementVersion>%(PackageManagement.Version)</_PackageManagementVersion>
</PropertyGroup>
<Warning Condition=" '%(PackageReference.Identity)' == '$(_PackageManagementIdentity)' and '%(PackageReference.Version)' == '$(_PackageManagementVersion)' "
Text="PackageReference %(PackageReference.Identity)@%(PackageReference.Version) Version attribute is not needed"
File="$(MSBuildProjectFullPath)" />
<ItemGroup>
<PackageReference Condition=" '%(Identity)' == '$(_PackageManagementIdentity)' " Version="$(_PackageManagementVersion)" ManagedVersion="true" />
</ItemGroup>
</Target>

<Target Name="BeforePackageManagement" BeforeTargets="ApplyPackageManagement">
<Message Text="BeforePackageManagement: %(PackageReference.Identity)@%(PackageReference.Version)" Importance="low" />
</Target>

<Target Name="AfterPackageManagement" AfterTargets="ApplyPackageManagement">
<Message Text="AfterPackageManagement: %(PackageReference.Identity)@%(PackageReference.Version)" Importance="low" />

<ItemGroup>
<UnmanagedPackageReference Include="@(PackageReference)" />
<UnmanagedPackageReference Remove="@(UnmanagedPackageReference)" Condition=" '%(UnmanagedPackageReference.ManagedVersion)' == 'true' " />
<UnmanagedPackageReference Remove="@(UnmanagedPackageReference)" Condition=" '%(UnmanagedPackageReference.IsImplicitlyDefined)' == 'true' " />
<UnmanagedPackageReference Remove="@(UnmanagedPackageReference)" Condition=" $([System.String]::Copy('%(Identity)').StartsWith('System.')) " />
</ItemGroup>
<Warning Condition=" '@(UnmanagedPackageReference)' != '' "
Text="%(UnmanagedPackageReference.Identity)@%(UnmanagedPackageReference.Version) is an unmanaged PackageReference"
File="$(MSBuildProjectFullPath)" />
</Target>

</Project>
5 changes: 3 additions & 2 deletions src/OrchardCore.Cms.Web/OrchardCore.Cms.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore" Version="$(MicrosoftAspNetCorePackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore" />

<!-- This reference is necessary for view precompilation to work on publish -->
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" Version="$(MicrosoftAspNetCoreMvcRazorViewCompilationPackageVersion)" PrivateAssets="All" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.ViewCompilation" PrivateAssets="All" />
</ItemGroup>

<!-- Necessary as we reference the Project and not the Package -->
<Import Project="..\OrchardCore\OrchardCore.Application.Cms.Targets\OrchardCore.Application.Cms.Targets.targets" />
<Import Project="..\OrchardCore\OrchardCore.Application.Targets\OrchardCore.Application.Targets.targets" />
<Import Project="..\OrchardCore.Build\OrchardCore.Commons.targets" />

</Project>
1 change: 1 addition & 0 deletions src/OrchardCore.Modules/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="..\OrchardCore.Build\OrchardCore.Commons.props" />
<Import Project="..\OrchardCore\OrchardCore.Module.Targets\OrchardCore.Module.Targets.props" />

Expand Down
2 changes: 2 additions & 0 deletions src/OrchardCore.Modules/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="..\OrchardCore.Build\OrchardCore.Commons.targets" />
<Import Project="..\OrchardCore\OrchardCore.Module.Targets\OrchardCore.Module.Targets.targets" />

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" Version="$(MicrosoftAspNetCoreAntiforgeryPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Antiforgery" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="$(MicrosoftAspNetCoreAuthenticationPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Authentication" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="$(MicrosoftAspNetCoreMvcPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection" Version="$(MicrosoftAspNetCoreDataProtectionPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.Elm" Version="$(MicrosoftAspNetCoreDiagnosticsElmPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.Elm" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="$(MicrosoftAspNetCoreDiagnosticsPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="$(MicrosoftAspNetCoreMvcViewFeaturesPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="$(MicrosoftAspNetCoreStaticFilesPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="$(MicrosoftAspNetCoreMvcAbstractionsPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Rewrite" Version="$(MicrosoftAspNetCoreRewritePackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Rewrite" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Fluid.Core" Version="$(FluidCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(MicrosoftExtensionsDependencyInjectionAbstractionsPackageVersion)" />
<PackageReference Include="Fluid.Core" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="$(MicrosoftExtensionsConfigurationJsonPackageVersion)" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Localization" Version="$(MicrosoftAspNetCoreMvcLocalizationPackageVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Localization" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Lucene.Net.Analysis.Common" Version="$(LuceneNetVersion)" />
<PackageReference Include="Lucene.Net.QueryParser" Version="$(LuceneNetVersion)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
<PackageReference Include="Lucene.Net.Analysis.Common" />
<PackageReference Include="Lucene.Net.QueryParser" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Markdig" Version="0.13.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="$(MicrosoftExtensionsDependencyInjectionPackageVersion)" />
<PackageReference Include="Markdig" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
</ItemGroup>

</Project>
Loading