update package json
This commit is contained in:
Binary file not shown.
@@ -75,9 +75,8 @@
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net462" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net462" />
|
||||
<package id="Modernizr" version="2.8.3" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net462" />
|
||||
<package id="Respond" version="1.4.2" targetFramework="net462" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -114,9 +114,8 @@
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
|
||||
+70
-70
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
For more information on how to configure your ASP.NET application, please visit
|
||||
http://go.microsoft.com/fwlink/?LinkId=169433
|
||||
@@ -6,10 +6,10 @@
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="elmah">
|
||||
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/>
|
||||
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/>
|
||||
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah"/>
|
||||
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/>
|
||||
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
|
||||
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
|
||||
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
|
||||
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<!--
|
||||
@@ -21,73 +21,73 @@
|
||||
</system.Web>
|
||||
-->
|
||||
<system.web>
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="Default.aspx"/>
|
||||
<compilation debug="true" targetFramework="4.6.2"/>
|
||||
<globalization uiCulture="it-IT" culture="it-IT"/>
|
||||
<sessionState mode="InProc" timeout="180"/>
|
||||
<customErrors mode="RemoteOnly" defaultRedirect="Default.aspx" />
|
||||
<compilation debug="true" targetFramework="4.6.2" />
|
||||
<globalization uiCulture="it-IT" culture="it-IT" />
|
||||
<sessionState mode="InProc" timeout="180" />
|
||||
<httpModules>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
|
||||
</httpModules>
|
||||
<pages controlRenderingCompatibilityVersion="4.0">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Optimization"/>
|
||||
<add namespace="System.Web.Optimization" />
|
||||
</namespaces>
|
||||
<controls>
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
|
||||
</controls>
|
||||
</pages>
|
||||
</system.web>
|
||||
<appSettings>
|
||||
<!--gestione timeout "esteso" x chiamate SQL critiche, in secondi -->
|
||||
<add key="sqlLongCommandTimeout" value="600"/>
|
||||
<add key="sqlLongCommandTimeout" value="600" />
|
||||
<!--Conf generale-->
|
||||
<add key="CodModulo" value="MoonPro"/>
|
||||
<add key="CodModulo" value="MoonPro" />
|
||||
<!--impostazione cambio tempo calcolato tra minuti-ore-gg-->
|
||||
<add key="maxMinuti" value="60"/>
|
||||
<add key="maxOre" value="1440"/>
|
||||
<add key="maxMinuti" value="60" />
|
||||
<add key="maxOre" value="1440" />
|
||||
<!--refresh MSE-->
|
||||
<add key="refrMSE_0" value="1001"/>
|
||||
<add key="refrMSE_0" value="1001" />
|
||||
<!--!!!FARE!!! riportare a 0!!!-->
|
||||
<add key="refrMSE_5" value="5"/>
|
||||
<add key="refrMSE_5" value="5" />
|
||||
<!-- Logging -->
|
||||
<add key="_logDir" value="~/logs/"/>
|
||||
<add key="_logLevel" value="7"/>
|
||||
<add key="_logMaxMb" value="30"/>
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="_logLevel" value="7" />
|
||||
<add key="_logMaxMb" value="30" />
|
||||
<!--Ottimizzazioni liberie esterne-->
|
||||
<add key="EnableCdnAjax" value="false"/>
|
||||
<add key="EnableCdnJQ" value="true"/>
|
||||
<add key="EnableCdnAjax" value="false" />
|
||||
<add key="EnableCdnJQ" value="true" />
|
||||
<!--Gestione auth dispositivi mobile-->
|
||||
<add key="cookieName" value="AuthMoonPro"/>
|
||||
<add key="mainPage" value="~/MappaStato.aspx"/>
|
||||
<add key="dominio" value="Donati"/>
|
||||
<add key="user" value="Mobile"/>
|
||||
<add key="cookieDayExpire" value="3650"/>
|
||||
<add key="cookieName" value="AuthMoonPro" />
|
||||
<add key="mainPage" value="~/MappaStato.aspx" />
|
||||
<add key="dominio" value="Donati" />
|
||||
<add key="user" value="Mobile" />
|
||||
<add key="cookieDayExpire" value="3650" />
|
||||
<!--conf commenti e ricalcoli-->
|
||||
<add key="idxTipoCommento" value="999"/>
|
||||
<add key="commEnableEditDel" value="false"/>
|
||||
<add key="minAnticipoRicalcolo" value="-2"/>
|
||||
<add key="dltMinRealtime" value="5"/>
|
||||
<add key="idxTipoCommento" value="999" />
|
||||
<add key="commEnableEditDel" value="false" />
|
||||
<add key="minAnticipoRicalcolo" value="-2" />
|
||||
<add key="dltMinRealtime" value="5" />
|
||||
<!--conf URL-->
|
||||
<add key="baseUrlAdmin" value="http://iis02/MP/ADM/"/>
|
||||
<add key="pageUrlApprODL" value="approvazioneODL.aspx"/>
|
||||
<add key="baseUrlAdmin" value="http://iis02/MP/ADM/" />
|
||||
<add key="pageUrlApprODL" value="approvazioneODL.aspx" />
|
||||
<!--conf modalità conferma produzione: 1=gg, 2=turni, 0=periodo intero -->
|
||||
<add key="modoConfProd" value="1"/>
|
||||
<add key="modoConfProd" value="1" />
|
||||
<!--Gestione email-->
|
||||
<!--<add key="_adminEmail" value="samuele@steamware.net" />-->
|
||||
<add key="_adminEmail" value="samuele@steamware.net,info@steamware.net"/>
|
||||
<add key="_fromEmail" value="MoonPro@steamware.net"/>
|
||||
<add key="_adminEmail" value="samuele@steamware.net,info@steamware.net" />
|
||||
<add key="_fromEmail" value="MoonPro@steamware.net" />
|
||||
<!-- <add key="_useAuthSmtp" value="false" />
|
||||
<add key="_smtpCli" value="keyhammer.ath.cx" />-->
|
||||
<add key="_useAuthSmtp" value="true"/>
|
||||
<add key="_smtpCli" value="smtp.gmail.com"/>
|
||||
<add key="_emailUser" value="steamwarebot@gmail.com"/>
|
||||
<add key="_emailPwd" value="drmfsls16"/>
|
||||
<add key="_enableSSL" value="true"/>
|
||||
<add key="_useAuthSmtp" value="true" />
|
||||
<add key="_smtpCli" value="smtp.gmail.com" />
|
||||
<add key="_emailUser" value="steamwarebot@gmail.com" />
|
||||
<add key="_emailPwd" value="drmfsls16" />
|
||||
<add key="_enableSSL" value="true" />
|
||||
<!--gestione approvazione ODL-->
|
||||
<add key="oggettoChgTc" value="Richiesta modifica tempo ciclo da autorizzare"/>
|
||||
<add key="corpoChgTc" value="E' stata inserita una richeista di modifica Tempo Ciclo in fase di attrezzaggio.{0}Per proseguire cliccare sul link seguente:{0}{0}{1}{0}{0}{0}{0}MoonPro@Steamware"/>
|
||||
<add key="oggettoChgTc" value="Richiesta modifica tempo ciclo da autorizzare" />
|
||||
<add key="corpoChgTc" value="E' stata inserita una richeista di modifica Tempo Ciclo in fase di attrezzaggio.{0}Per proseguire cliccare sul link seguente:{0}{0}{1}{0}{0}{0}{0}MoonPro@Steamware" />
|
||||
<!--stringhe connessione SQL2012-->
|
||||
<!--<add key="MoonProConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer;"/>
|
||||
<add key="PermessiConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer;"/>
|
||||
@@ -95,19 +95,19 @@
|
||||
<add key="VocabolarioConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=MoonPro_Vocabolario;Persist Security Info=True;User ID=sa;Password=keyhammer;"/>
|
||||
<add key="DevicesConnectionString" value="Data Source=SQL-STEAM\SQL2012;Initial Catalog=Donati_Anagrafica;Persist Security Info=True;User ID=sa;Password=keyhammer;"/>-->
|
||||
<!--stringhe connessione SQL2016-->
|
||||
<add key="MoonProConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="PermessiConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="UtenteCdcConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_AnagraficaLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="VocabolarioConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_VocabolarioLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="DevicesConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_AnagraficaLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;"/>
|
||||
<add key="MoonProConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
|
||||
<add key="PermessiConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
|
||||
<add key="UtenteCdcConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_AnagraficaLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
|
||||
<add key="VocabolarioConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_VocabolarioLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
|
||||
<add key="DevicesConnectionString" value="Data Source=WIN2016-SQL;Initial Catalog=Donati_AnagraficaLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" />
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
<!--stringhe connessione SQL2012-->
|
||||
<!--<add name="MoonProConnectionString" connectionString="Data Source=SQL-STEAM\SQL2012;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer;" providerName="System.Data.SqlClient"/>
|
||||
<add name="MapoDb.Properties.Settings.MoonProConnectionString" connectionString="Data Source=SQL-STEAM\SQL2012;Initial Catalog=MoonPro;Persist Security Info=True;User ID=sa;Password=keyhammer;" providerName="System.Data.SqlClient"/>-->
|
||||
<!--stringhe connessione SQL2016-->
|
||||
<add name="MoonProConnectionString" connectionString="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient"/>
|
||||
<add name="MapoDb.Properties.Settings.MoonProConnectionString" connectionString="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient"/>
|
||||
<add name="MoonProConnectionString" connectionString="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
|
||||
<add name="MapoDb.Properties.Settings.MoonProConnectionString" connectionString="Data Source=WIN2016-SQL;Initial Catalog=Donati_MoonProLAV_prod;Persist Security Info=True;User ID=sa;Password=keyhammer16;" providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
@@ -116,31 +116,31 @@
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.86.0.518" newVersion="0.86.0.518" />
|
||||
</dependentAssembly>-->
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930"/>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2"/>
|
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler"/>
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler"/>
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler"/>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
|
||||
</modules>
|
||||
<staticContent>
|
||||
<remove fileExtension=".woff"/>
|
||||
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff"/>
|
||||
<remove fileExtension=".svg"/>
|
||||
<mimeMap fileExtension=".svg" mimeType="image/svg+xml"/>
|
||||
<remove fileExtension=".woff" />
|
||||
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
|
||||
<remove fileExtension=".svg" />
|
||||
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
<elmah>
|
||||
@@ -148,12 +148,12 @@
|
||||
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
|
||||
more information on remote access and securing ELMAH.
|
||||
-->
|
||||
<security allowRemoteAccess="false"/>
|
||||
<security allowRemoteAccess="false" />
|
||||
</elmah>
|
||||
<location path="elmah.axd" inheritInChildApplications="false">
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>
|
||||
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
|
||||
</httpHandlers>
|
||||
<!--
|
||||
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
|
||||
@@ -167,7 +167,7 @@
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode"/>
|
||||
<add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</location>
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
<package id="Microsoft.ScriptManager.MSAjax" version="1.0.1" targetFramework="net45" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
|
||||
<package id="Modernizr" version="2.8.3" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net462" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
|
||||
</packages>
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
-8409
File diff suppressed because it is too large
Load Diff
BIN
Binary file not shown.
-8756
File diff suppressed because it is too large
Load Diff
-116
@@ -1,116 +0,0 @@
|
||||
param($installPath, $toolsPath, $package, $project)
|
||||
|
||||
# open json.net splash page on package install
|
||||
# don't open if json.net is installed as a dependency
|
||||
|
||||
try
|
||||
{
|
||||
$url = "http://www.newtonsoft.com/json/install?version=" + $package.Version
|
||||
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
|
||||
|
||||
if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
|
||||
{
|
||||
# user is installing from VS NuGet console
|
||||
# get reference to the window, the console host and the input history
|
||||
# show webpage if "install-package newtonsoft.json" was last input
|
||||
|
||||
$consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
|
||||
|
||||
$props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
|
||||
[System.Reflection.BindingFlags]::NonPublic)
|
||||
|
||||
$prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
|
||||
if ($prop -eq $null) { return }
|
||||
|
||||
$hostInfo = $prop.GetValue($consoleWindow)
|
||||
if ($hostInfo -eq $null) { return }
|
||||
|
||||
$history = $hostInfo.WpfConsole.InputHistory.History
|
||||
|
||||
$lastCommand = $history | select -last 1
|
||||
|
||||
if ($lastCommand)
|
||||
{
|
||||
$lastCommand = $lastCommand.Trim().ToLower()
|
||||
if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
|
||||
{
|
||||
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# user is installing from VS NuGet dialog
|
||||
# get reference to the window, then smart output console provider
|
||||
# show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
|
||||
|
||||
$instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
|
||||
[System.Reflection.BindingFlags]::NonPublic)
|
||||
|
||||
$consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
|
||||
[System.Reflection.BindingFlags]::NonPublic)
|
||||
|
||||
if ($instanceField -eq $null -or $consoleField -eq $null) { return }
|
||||
|
||||
$instance = $instanceField.GetValue($null)
|
||||
|
||||
if ($instance -eq $null) { return }
|
||||
|
||||
$consoleProvider = $consoleField.GetValue($instance)
|
||||
if ($consoleProvider -eq $null) { return }
|
||||
|
||||
$console = $consoleProvider.CreateOutputConsole($false)
|
||||
|
||||
$messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
|
||||
[System.Reflection.BindingFlags]::NonPublic)
|
||||
if ($messagesField -eq $null) { return }
|
||||
|
||||
$messages = $messagesField.GetValue($console)
|
||||
if ($messages -eq $null) { return }
|
||||
|
||||
$operations = $messages -split "=============================="
|
||||
|
||||
$lastOperation = $operations | select -last 1
|
||||
|
||||
if ($lastOperation)
|
||||
{
|
||||
$lastOperation = $lastOperation.ToLower()
|
||||
|
||||
$lines = $lastOperation -split "`r`n"
|
||||
|
||||
$installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
|
||||
|
||||
if ($installMatch)
|
||||
{
|
||||
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
$pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager")
|
||||
|
||||
$selection = $pmPane.TextDocument.Selection
|
||||
$selection.StartOfDocument($false)
|
||||
$selection.EndOfDocument($true)
|
||||
|
||||
if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'"))
|
||||
{
|
||||
# don't show on upgrade
|
||||
if (!$selection.Text.Contains("Removed package"))
|
||||
{
|
||||
$dte2.ItemOperations.Navigate($url) | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
# stop potential errors from bubbling up
|
||||
# worst case the splash page won't open
|
||||
}
|
||||
}
|
||||
|
||||
# still yolo
|
||||
Reference in New Issue
Block a user