Skip to content

Commit

Permalink
DNN-10226: move newtonsoft josn into separate package.
Browse files Browse the repository at this point in the history
  • Loading branch information
zyhfish committed Sep 6, 2017
1 parent 54b8bb5 commit 1829d18
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 19 deletions.
49 changes: 49 additions & 0 deletions DNN Platform/Components/Newtonsoft/DotNetNuke.Newtonsoft.Json.dnn
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="DotNetNuke.Newtonsoft.Json" type="Library" version="10.00.03" isSystem="true">
<friendlyName>Newtonsoft Json Components</friendlyName>
<description>Provides Newtonsoft Json Components for DotNetNuke.</description>
<dependencies/>
<owner>
<name>DNN</name>
<organization>DNN Corp.</organization>
<url>http://www.dnnsoftware.com</url>
<email>support@dnnsoftware.com</email>
</owner>
<license>License.txt</license>
<releaseNotes>
This package includes Newtonsoft.Json assembly version 10.0.3.
Please go to https://www.newtonsoft.com/json to view release notes on this particular version.</releaseNotes>
<components>
<component type="Assembly">
<assemblies>
<assembly>
<path>bin</path>
<name>Newtonsoft.Json.dll</name>
<version>10.0.3</version>
</assembly>
</assemblies>
</component>
<component type="Config">
<config>
<configFile>web.config</configFile>
<install>
<configuration>
<nodes>
<node path="/configuration/runtime/ab:assemblyBinding/ab:dependentAssembly[ab:assemblyIdentity/@name='Newtonsoft.Json']" action="update" targetpath="/configuration/runtime/ab:assemblyBinding/ab:dependentAssembly[ab:assemblyIdentity/@name='Newtonsoft.Json']/ab:bindingRedirect" collision="save" nameSpace="urn:schemas-microsoft-com:asm.v1" nameSpacePrefix="ab">
<bindingRedirect oldVersion="0.0.0.0-32767.32767.32767.32767" newVersion="10.0.0.0" />
</node>
</nodes>
</configuration>
</install>
<uninstall>
<configuration>
<nodes />
</configuration>
</uninstall>
</config>
</component>
</components>
</package>
</packages>
</dotnetnuke>
9 changes: 9 additions & 0 deletions DNN Platform/Components/Newtonsoft/License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The MIT License (MIT)

Copyright (c) 2007 James Newton-King

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15 changes: 15 additions & 0 deletions DNN Platform/Library/Module.build
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@
</CreateItem>
<Zip Files="@(TelerikContent)" WorkingDirectory="..\Components\Telerik\Package" ZipFileName="$(WebsiteInstallPath)\Module\Telerik_$(TelerikVersion)_Install.zip" />
<RemoveDir Directories ="..\Components\Telerik\Package" />

<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
XPath="dotnetnuke/packages/package/@version"
XmlFileName="..\Components\Newtonsoft\DotNetNuke.Newtonsoft.Json.dnn">
<Output TaskParameter="Value" PropertyName="NewtonsoftVersion" />
</XmlRead>
<Copy SourceFiles="bin\Newtonsoft.Json.dll" DestinationFolder="..\Components\Newtonsoft\Package\bin" />
<Copy SourceFiles="..\Components\Newtonsoft\DotNetNuke.Newtonsoft.Json.dnn" DestinationFolder="..\Components\Newtonsoft\Package" />
<Copy SourceFiles="..\Components\Newtonsoft\License.txt" DestinationFolder="..\Components\Newtonsoft\Package" />
<CreateItem Include="..\Components\Newtonsoft\Package\**\*.*">
<Output TaskParameter="Include" ItemName="NewtonsoftContent" />
</CreateItem>
<Zip Files="@(NewtonsoftContent)" WorkingDirectory="..\Components\Newtonsoft\Package" ZipFileName="$(WebsiteInstallPath)\Module\Newtonsoft.Json_$(NewtonsoftVersion)_Install.zip" />
<RemoveDir Directories ="..\Components\Newtonsoft\Package" />

<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Expand Down
8 changes: 0 additions & 8 deletions DNN Platform/Website/Install/Config/09.02.00.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,5 @@
<nodes configfile="Web.config">
<node path="/configuration/system.web/httpModules/add[@name='Compression']" action="remove" />
<node path="/configuration/system.webServer/modules/add[@name='Compression']" action="remove" />
<node path="/configuration/runtime/ab:assemblyBinding" action="update"
targetpath="/configuration/runtime/ab:assemblyBinding/ab:dependentAssembly[ab:assemblyIdentity/@name='Newtonsoft.Json']"
collision="overwrite" nameSpace="urn:schemas-microsoft-com:asm.v1" nameSpacePrefix="ab">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
</node>
</nodes>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,9 @@ GO


/***** DNN-10200: update newtonsoft.json assembly to 10.0.3. *****/
IF NOT EXISTS(SELECT 1 FROM {databaseOwner}[{objectQualifier}Assemblies] WHERE AssemblyName = 'Newtonsoft.Json.dll' AND PackageID IS NULL)
BEGIN
INSERT INTO {databaseOwner}[{objectQualifier}Assemblies] (PackageID, AssemblyName, Version)
VALUES (NULL, 'Newtonsoft.Json.dll', '10.0.3')
END
ELSE
BEGIN
UPDATE {databaseOwner}[{objectQualifier}Assemblies]
SET Version = '10.0.3'
WHERE AssemblyName = 'Newtonsoft.Json.dll' AND PackageID IS NULL
END
DELETE FROM {databaseOwner}[{objectQualifier}Assemblies]
WHERE PackageID IS NULL AND AssemblyName = 'Newtonsoft.Json.dll'
GO

/***** CONTENT-8440: update default MessagingThrottlingInterval value to 30 seconds. *****/
UPDATE {databaseOwner}[{objectQualifier}PortalSettings]
Expand Down

0 comments on commit 1829d18

Please sign in to comment.