From 0fb47d4f3d766532bbd7c0077512b4c11ff9dc49 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Tue, 18 Aug 2015 18:03:11 -0700 Subject: [PATCH 01/31] Addin Installer Telemetry --- .../Setup/Custom_Action/CustomAction.config | 32 +++ Nodejs/Setup/Custom_Action/CustomAction.cs | 191 ++++++++++++++++++ .../Setup/Custom_Action/Custom_Action.csproj | 52 +++++ .../Custom_Action/Properties/AssemblyInfo.cs | 35 ++++ .../NodejsToolsInstaller.wixproj | 4 + .../NodejsToolsInstaller.wxs | 16 ++ Nodejs/Setup/setup.proj | 1 + 7 files changed, 331 insertions(+) create mode 100644 Nodejs/Setup/Custom_Action/CustomAction.config create mode 100644 Nodejs/Setup/Custom_Action/CustomAction.cs create mode 100644 Nodejs/Setup/Custom_Action/Custom_Action.csproj create mode 100644 Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs diff --git a/Nodejs/Setup/Custom_Action/CustomAction.config b/Nodejs/Setup/Custom_Action/CustomAction.config new file mode 100644 index 000000000..233c44d7f --- /dev/null +++ b/Nodejs/Setup/Custom_Action/CustomAction.config @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/Nodejs/Setup/Custom_Action/CustomAction.cs b/Nodejs/Setup/Custom_Action/CustomAction.cs new file mode 100644 index 000000000..133c17f23 --- /dev/null +++ b/Nodejs/Setup/Custom_Action/CustomAction.cs @@ -0,0 +1,191 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Deployment.WindowsInstaller; +using System.Diagnostics; +using System.Net; +using System.Collections.Specialized; +using System.Web.Script.Serialization; + +namespace Custom_Action +{ + public class CustomActions + { + [CustomAction] + public static ActionResult RecordInstallStartTime(Session session) + { + session["InstallStartTime"] = DateTime.Now.ToString(); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallSuccessResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + session.Log("Is Aready Installed: "+session.EvaluateCondition("Installed").ToString()); + + FeatureInfoCollection fc = session.Features; + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, + { "name", "Microsoft.ApplicationInsights.Event"}, + {"time", DateTime.Now.ToUniversalTime().ToString()}, + {"data",new Dictionary() + { + {"baseType","EventData"}, + {"baseData",new Dictionary() + { + {"ver","2"}, + {"name","NTVSInstallerTel"}, + {"properties",new Dictionary() + { + {"InstallStatus","Success"}, + {"IsNTVSInstalled",isInstalled.ToString()}, + {"CurrentState",currentState}, + {"RequestState",requestState}, + {"NTVSVersion",session["NTVSVersion"]}, + {"VSVersion",session["VSVersion"]}, + {"MSIVersion",session["MSIVersion"]}, + {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} + }} + }} + }} + }; + + string jsonString = (new JavaScriptSerializer()).Serialize(data); + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + public static ActionResult LogInstallErrorResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); + + FeatureInfoCollection fc = session.Features; + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, + { "name", "Microsoft.ApplicationInsights.Event"}, + {"time", DateTime.Now.ToUniversalTime().ToString()}, + {"data",new Dictionary() + { + {"baseType","EventData"}, + {"baseData",new Dictionary() + { + {"ver","2"}, + {"name","NTVSInstallerTel"}, + {"properties",new Dictionary() + { + {"InstallStatus","Error"}, + {"IsNTVSInstalled",isInstalled.ToString()}, + {"CurrentState",currentState}, + {"RequestState",requestState}, + {"NTVSVersion",session["NTVSVersion"]}, + {"VSVersion",session["VSVersion"]}, + {"MSIVersion",session["MSIVersion"]}, + {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} + }} + }} + }} + }; + + string jsonString = (new JavaScriptSerializer()).Serialize(data); + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + public static ActionResult LogInstallCancelResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); + + FeatureInfoCollection fc = session.Features; + + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, + { "name", "Microsoft.ApplicationInsights.Event"}, + {"time", DateTime.Now.ToUniversalTime().ToString()}, + {"data",new Dictionary() + { + {"baseType","EventData"}, + {"baseData",new Dictionary() + { + {"ver","2"}, + {"name","NTVSInstallerTel"}, + {"properties",new Dictionary() + { + {"InstallStatus","Cancel"}, + {"IsNTVSInstalled",isInstalled.ToString()}, + {"CurrentState",currentState}, + {"RequestState",requestState}, + {"NTVSVersion",session["NTVSVersion"]}, + {"VSVersion",session["VSVersion"]}, + {"MSIVersion",session["MSIVersion"]}, + {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} + }} + }} + }} + }; + string jsonString = (new JavaScriptSerializer()).Serialize(data); + + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + } +} diff --git a/Nodejs/Setup/Custom_Action/Custom_Action.csproj b/Nodejs/Setup/Custom_Action/Custom_Action.csproj new file mode 100644 index 000000000..be6cb7cef --- /dev/null +++ b/Nodejs/Setup/Custom_Action/Custom_Action.csproj @@ -0,0 +1,52 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {775E686D-C646-4DAB-9DCF-D2C37FF8EA78} + Library + Properties + Custom_Action + Custom_Action + v4.5 + 512 + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + True + + + + + + + + + + \ No newline at end of file diff --git a/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs b/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..3853d8bcb --- /dev/null +++ b/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Custom_Action")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Custom_Action")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a5faa5cc-5490-4ad9-a822-8c410cfee6a9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index 67a23b0f7..5f119cff4 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -56,6 +56,10 @@ + + Custom_Action + {775e686d-c646-4dab-9dcf-d2c37ff8ea78} + InteractiveWindow {C0D64130-C0E9-4CAB-99BC-68F62357F010} diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index cd4506c50..d2f33eea4 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -146,6 +146,7 @@ + @@ -153,11 +154,26 @@ + + + + + + + + + + + NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH + + + + NOT Installed diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index e21eeab17..6ab8b9ce0 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -19,6 +19,7 @@ + From 785acc2f3a178f01f43dcef626a3b009b15f538e Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Sat, 22 Aug 2015 08:48:39 -0700 Subject: [PATCH 02/31] InstallerTelemetry2 --- Nodejs/Setup/BuildRelease.ps1 | 4 +- .../CustomAction.config | 31 +++ .../InstallerTelemetryAction.cs | 220 ++++++++++++++++++ .../InstallerTelemetryAction.csproj | 96 ++++++++ .../NodejsToolsInstaller.wixproj | 184 +++++++-------- .../NodejsToolsInstaller.wxs | 24 +- Nodejs/Setup/setup.proj | 2 +- 7 files changed, 456 insertions(+), 105 deletions(-) create mode 100644 Nodejs/Setup/InstallerTelemetryAction/CustomAction.config create mode 100644 Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs create mode 100644 Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj diff --git a/Nodejs/Setup/BuildRelease.ps1 b/Nodejs/Setup/BuildRelease.ps1 index 1fa44d38b..d9d0b1907 100644 --- a/Nodejs/Setup/BuildRelease.ps1 +++ b/Nodejs/Setup/BuildRelease.ps1 @@ -243,7 +243,9 @@ $managed_files = ( "Microsoft.NodejsTools.Npm.dll", "Microsoft.NodejsTools.TestAdapter.dll", "Microsoft.NodejsTools.PressAnyKey.exe", - "Microsoft.NodejsTools.VsLogger.dll" + "Microsoft.NodejsTools.VsLogger.dll", + "Microsoft.NodejsTools.InstallerTelemetryAction.CA", + "Microsoft.NodejsTools.InstallerTelemetryAction" ) $native_files = @() diff --git a/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config b/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config new file mode 100644 index 000000000..5a3884082 --- /dev/null +++ b/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs new file mode 100644 index 000000000..9ed66349b --- /dev/null +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -0,0 +1,220 @@ +//*********************************************************// +// Copyright (c) Microsoft. All rights reserved. +// +// Apache 2.0 License +// +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. +// +//*********************************************************// + +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Deployment.WindowsInstaller; +using System.Diagnostics; +using System.Net; +using System.Collections.Specialized; +using System.Web.Script.Serialization; +using System.Globalization; + +namespace Microsoft.NodejsTools +{ + public class InstallerTelemetryActions + { + private static string AIVersion = "2"; + [CustomAction] + public static ActionResult RecordInstallStartTime(Session session) + { + session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallSuccessResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + + FeatureInfoCollection fc = session.Features; + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + break; + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, + { "name" , "Microsoft.ApplicationInsights.Event"}, + {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, + {"data" , new Dictionary() + { + {"baseType" , "EventData"}, + {"baseData" , new Dictionary() + { + {"ver" , AIVersion}, + {"name" , "NtvsInstallerTelemetry"}, + {"properties" , new Dictionary() + { + {"InstallStatus" , "Success"}, + {"IsNtvsInstalled" , isInstalled.ToString()}, + {"CurrentState" , currentState}, + {"RequestState" , requestState}, + {"NtvsVersion" , session["NTVSVersion"]}, + {"VSVersion" , session["VSVersion"]}, + {"MsiVersion" , session["MSIVersion"]}, + {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} + } + } + } + } + } + } + }; + + string jsonString = (new JavaScriptSerializer()).Serialize(data); + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallErrorResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); + + FeatureInfoCollection fc = session.Features; + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + break; + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, + { "name" , "Microsoft.ApplicationInsights.Event"}, + {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, + {"data" , new Dictionary() + { + {"baseType" , "EventData"}, + {"baseData" , new Dictionary() + { + {"ver" , AIVersion}, + {"name" , "NtvsInstallerTelemetry"}, + {"properties" , new Dictionary() + { + {"InstallStatus" , "Error"}, + {"IsNtvsInstalled" , isInstalled.ToString()}, + {"CurrentState" , currentState}, + {"RequestState" , requestState}, + {"NtvsVersion" , session["NTVSVersion"]}, + {"VSVersion" , session["VSVersion"]}, + {"MsiVersion" , session["MSIVersion"]}, + {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} + } + } + } + } + } + } + }; + + string jsonString = (new JavaScriptSerializer()).Serialize(data); + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallCancelResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + string AIVersion = "2"; + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + FeatureInfoCollection fc = session.Features; + + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + break; + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, + { "name" , "Microsoft.ApplicationInsights.Event"}, + {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, + {"data" , new Dictionary() + { + {"baseType" , "EventData"}, + {"baseData" , new Dictionary() + { + {"ver" , AIVersion}, + {"name" , "NtvsInstallerTelemetry"}, + {"properties" , new Dictionary() + { + {"InstallStatus" , "Cancel"}, + {"IsNtvsInstalled" , isInstalled.ToString()}, + {"CurrentState" , currentState}, + {"RequestState" , requestState}, + {"NtvsVersion" , session["NTVSVersion"]}, + {"VSVersion" , session["VSVersion"]}, + {"MsiVersion" , session["MSIVersion"]}, + {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} + } + } + } + } + } + } + }; + string jsonString = (new JavaScriptSerializer()).Serialize(data); + + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + } +} \ No newline at end of file diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj new file mode 100644 index 000000000..bd9e0ecaa --- /dev/null +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -0,0 +1,96 @@ + + + + + + 14.0 + + + + + 4.0 + + + + + 12.0 + + + + + 4.0 + + + + + 11.0 + + + + + 4.0 + + + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {775E686D-C646-4DAB-9DCF-D2C37FF8EA78} + Library + Properties + Microsoft.NodejsTools + Microsoft.NodejsTools.InstallerTelemetryAction + + + + + AnyCPU + + + + + + + + + + + True + + + + + + + + + + \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index 5f119cff4..09c5f62dc 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -1,93 +1,93 @@ - - - - - 3.5 - {DEE349D0-5AE5-4B6F-9720-785240AF3118} - 2.0 - NodejsToolsInstaller - Package - false - SAK - SAK - SAK - SAK - - $(DefineConstants); - IncludeVsLogger=$(IncludeVsLogger) - - - $(DefineConstants); - IncludeVWDExpress=12.0.30219.0; - - - $(DefineConstants); - IncludeVWDExpress=14.0.0.0; - - - - - WixUIExtension - WixUIExtension - - - WixUtilExtension - WixUtilExtension - - - WixDependencyExtension - WixDependencyExtension - - - WixNetFxExtension - WixNetFxExtension - - - - - - CommonLaunchConditions.wxs - - - - - - - - - - - Custom_Action - {775e686d-c646-4dab-9dcf-d2c37ff8ea78} - - - InteractiveWindow - {C0D64130-C0E9-4CAB-99BC-68F62357F010} - - - NodejsTools - {48D35916-497E-43A4-88A7-A829B7BF0EF1} - - - NodejsProfiler - {C7D3FCEB-47DA-4539-8D20-6B9047BAC3F7} - - - VsLoggerMsm - {639BFC80-B31B-4D3F-9DF3-A65913000B4B} - - - - - - - - - - - - - - - + + + + + 3.5 + {DEE349D0-5AE5-4B6F-9720-785240AF3118} + 2.0 + NodejsToolsInstaller + Package + false + SAK + SAK + SAK + SAK + + $(DefineConstants); + IncludeVsLogger=$(IncludeVsLogger) + + + $(DefineConstants); + IncludeVWDExpress=12.0.30219.0; + + + $(DefineConstants); + IncludeVWDExpress=14.0.0.0; + + + + + WixUIExtension + WixUIExtension + + + WixUtilExtension + WixUtilExtension + + + WixDependencyExtension + WixDependencyExtension + + + WixNetFxExtension + WixNetFxExtension + + + + + + CommonLaunchConditions.wxs + + + + + + + + + + + InstallerTelemetryAction + {775e686d-c646-4dab-9dcf-d2c37ff8ea78} + + + InteractiveWindow + {C0D64130-C0E9-4CAB-99BC-68F62357F010} + + + NodejsTools + {48D35916-497E-43A4-88A7-A829B7BF0EF1} + + + NodejsProfiler + {C7D3FCEB-47DA-4539-8D20-6B9047BAC3F7} + + + VsLoggerMsm + {639BFC80-B31B-4D3F-9DF3-A65913000B4B} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index d2f33eea4..8956a8fa7 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -146,7 +146,10 @@ - + + + + @@ -154,18 +157,16 @@ - - - - - - - - - - + + + + + + + + NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH @@ -174,6 +175,7 @@ + NOT Installed diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 6ab8b9ce0..6ff3e7326 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -19,7 +19,7 @@ - + From 2cda404f0ccb0bcd2693ea231322aabbea45c5b5 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Sat, 22 Aug 2015 08:52:49 -0700 Subject: [PATCH 03/31] Removing older files --- .../Setup/Custom_Action/CustomAction.config | 32 --- Nodejs/Setup/Custom_Action/CustomAction.cs | 191 ------------------ .../Setup/Custom_Action/Custom_Action.csproj | 52 ----- .../Custom_Action/Properties/AssemblyInfo.cs | 35 ---- 4 files changed, 310 deletions(-) delete mode 100644 Nodejs/Setup/Custom_Action/CustomAction.config delete mode 100644 Nodejs/Setup/Custom_Action/CustomAction.cs delete mode 100644 Nodejs/Setup/Custom_Action/Custom_Action.csproj delete mode 100644 Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs diff --git a/Nodejs/Setup/Custom_Action/CustomAction.config b/Nodejs/Setup/Custom_Action/CustomAction.config deleted file mode 100644 index 233c44d7f..000000000 --- a/Nodejs/Setup/Custom_Action/CustomAction.config +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Nodejs/Setup/Custom_Action/CustomAction.cs b/Nodejs/Setup/Custom_Action/CustomAction.cs deleted file mode 100644 index 133c17f23..000000000 --- a/Nodejs/Setup/Custom_Action/CustomAction.cs +++ /dev/null @@ -1,191 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Microsoft.Deployment.WindowsInstaller; -using System.Diagnostics; -using System.Net; -using System.Collections.Specialized; -using System.Web.Script.Serialization; - -namespace Custom_Action -{ - public class CustomActions - { - [CustomAction] - public static ActionResult RecordInstallStartTime(Session session) - { - session["InstallStartTime"] = DateTime.Now.ToString(); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallSuccessResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - - session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - session.Log("Is Aready Installed: "+session.EvaluateCondition("Installed").ToString()); - - FeatureInfoCollection fc = session.Features; - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, - { "name", "Microsoft.ApplicationInsights.Event"}, - {"time", DateTime.Now.ToUniversalTime().ToString()}, - {"data",new Dictionary() - { - {"baseType","EventData"}, - {"baseData",new Dictionary() - { - {"ver","2"}, - {"name","NTVSInstallerTel"}, - {"properties",new Dictionary() - { - {"InstallStatus","Success"}, - {"IsNTVSInstalled",isInstalled.ToString()}, - {"CurrentState",currentState}, - {"RequestState",requestState}, - {"NTVSVersion",session["NTVSVersion"]}, - {"VSVersion",session["VSVersion"]}, - {"MSIVersion",session["MSIVersion"]}, - {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} - }} - }} - }} - }; - - string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - - public static ActionResult LogInstallErrorResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - - session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); - - FeatureInfoCollection fc = session.Features; - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, - { "name", "Microsoft.ApplicationInsights.Event"}, - {"time", DateTime.Now.ToUniversalTime().ToString()}, - {"data",new Dictionary() - { - {"baseType","EventData"}, - {"baseData",new Dictionary() - { - {"ver","2"}, - {"name","NTVSInstallerTel"}, - {"properties",new Dictionary() - { - {"InstallStatus","Error"}, - {"IsNTVSInstalled",isInstalled.ToString()}, - {"CurrentState",currentState}, - {"RequestState",requestState}, - {"NTVSVersion",session["NTVSVersion"]}, - {"VSVersion",session["VSVersion"]}, - {"MSIVersion",session["MSIVersion"]}, - {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} - }} - }} - }} - }; - - string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - - public static ActionResult LogInstallCancelResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - - session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); - - FeatureInfoCollection fc = session.Features; - - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, - { "name", "Microsoft.ApplicationInsights.Event"}, - {"time", DateTime.Now.ToUniversalTime().ToString()}, - {"data",new Dictionary() - { - {"baseType","EventData"}, - {"baseData",new Dictionary() - { - {"ver","2"}, - {"name","NTVSInstallerTel"}, - {"properties",new Dictionary() - { - {"InstallStatus","Cancel"}, - {"IsNTVSInstalled",isInstalled.ToString()}, - {"CurrentState",currentState}, - {"RequestState",requestState}, - {"NTVSVersion",session["NTVSVersion"]}, - {"VSVersion",session["VSVersion"]}, - {"MSIVersion",session["MSIVersion"]}, - {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} - }} - }} - }} - }; - string jsonString = (new JavaScriptSerializer()).Serialize(data); - - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - } -} diff --git a/Nodejs/Setup/Custom_Action/Custom_Action.csproj b/Nodejs/Setup/Custom_Action/Custom_Action.csproj deleted file mode 100644 index be6cb7cef..000000000 --- a/Nodejs/Setup/Custom_Action/Custom_Action.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {775E686D-C646-4DAB-9DCF-D2C37FF8EA78} - Library - Properties - Custom_Action - Custom_Action - v4.5 - 512 - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - True - - - - - - - - - - \ No newline at end of file diff --git a/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs b/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs deleted file mode 100644 index 3853d8bcb..000000000 --- a/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Custom_Action")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Custom_Action")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a5faa5cc-5490-4ad9-a822-8c410cfee6a9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] From 99a5f49678dd592373a3a34f4777121e10144b22 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Mon, 24 Aug 2015 14:20:16 -0700 Subject: [PATCH 04/31] adding indentation --- .../InstallerTelemetryAction.cs | 243 ++++++++++++------ .../InstallerTelemetryAction.csproj | 29 --- .../NodejsToolsInstaller.wxs | 4 +- 3 files changed, 170 insertions(+), 106 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index 9ed66349b..bbe9ce308 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -57,31 +57,62 @@ public static ActionResult LogInstallSuccessResult(Session session) session.Log("Starting POST"); Dictionary data = new Dictionary() { - { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, - { "name" , "Microsoft.ApplicationInsights.Event"}, - {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, - {"data" , new Dictionary() - { - {"baseType" , "EventData"}, - {"baseData" , new Dictionary() - { - {"ver" , AIVersion}, - {"name" , "NtvsInstallerTelemetry"}, - {"properties" , new Dictionary() - { - {"InstallStatus" , "Success"}, - {"IsNtvsInstalled" , isInstalled.ToString()}, - {"CurrentState" , currentState}, - {"RequestState" , requestState}, - {"NtvsVersion" , session["NTVSVersion"]}, - {"VSVersion" , session["VSVersion"]}, - {"MsiVersion" , session["MSIVersion"]}, - {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} - } - } - } - } - } + { + "iKey", "377a3718-78a7-49df-abcc-1001317db729" + }, + { + "name", "Microsoft.ApplicationInsights.Event" + }, + { + "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) + }, + { + "data", new Dictionary < string, object > () + { + { + "baseType", "EventData" + }, + { + "baseData", new Dictionary < string, object > () + { + { + "ver", AIVersion + }, + { + "name", "NtvsInstallerTelemetry" + }, + { + "properties", new Dictionary < string, string > () + { + { + "InstallStatus", "Success" + }, + { + "IsNtvsInstalled", isInstalled.ToString() + }, + { + "CurrentState", currentState + }, + { + "RequestState", requestState + }, + { + "NtvsVersion", session["NtvsVersion"] + }, + { + "VSVersion", session["VSVersion"] + }, + { + "MsiVersion", session["MsiVersion"] + }, + { + "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) + } + } + } + } + } + } } }; @@ -118,31 +149,62 @@ public static ActionResult LogInstallErrorResult(Session session) session.Log("Starting POST"); Dictionary data = new Dictionary() { - { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, - { "name" , "Microsoft.ApplicationInsights.Event"}, - {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, - {"data" , new Dictionary() - { - {"baseType" , "EventData"}, - {"baseData" , new Dictionary() - { - {"ver" , AIVersion}, - {"name" , "NtvsInstallerTelemetry"}, - {"properties" , new Dictionary() - { - {"InstallStatus" , "Error"}, - {"IsNtvsInstalled" , isInstalled.ToString()}, - {"CurrentState" , currentState}, - {"RequestState" , requestState}, - {"NtvsVersion" , session["NTVSVersion"]}, - {"VSVersion" , session["VSVersion"]}, - {"MsiVersion" , session["MSIVersion"]}, - {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} - } - } - } - } - } + { + "iKey", "377a3718-78a7-49df-abcc-1001317db729" + }, + { + "name", "Microsoft.ApplicationInsights.Event" + }, + { + "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) + }, + { + "data", new Dictionary < string, object > () + { + { + "baseType", "EventData" + }, + { + "baseData", new Dictionary < string, object > () + { + { + "ver", AIVersion + }, + { + "name", "NtvsInstallerTelemetry" + }, + { + "properties", new Dictionary < string, string > () + { + { + "InstallStatus", "Error" + }, + { + "IsNtvsInstalled", isInstalled.ToString() + }, + { + "CurrentState", currentState + }, + { + "RequestState", requestState + }, + { + "NtvsVersion", session["NtvsVersion"] + }, + { + "VSVersion", session["VSVersion"] + }, + { + "MsiVersion", session["MsiVersion"] + }, + { + "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) + } + } + } + } + } + } } }; @@ -179,31 +241,62 @@ public static ActionResult LogInstallCancelResult(Session session) session.Log("Starting POST"); Dictionary data = new Dictionary() { - { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, - { "name" , "Microsoft.ApplicationInsights.Event"}, - {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, - {"data" , new Dictionary() - { - {"baseType" , "EventData"}, - {"baseData" , new Dictionary() - { - {"ver" , AIVersion}, - {"name" , "NtvsInstallerTelemetry"}, - {"properties" , new Dictionary() - { - {"InstallStatus" , "Cancel"}, - {"IsNtvsInstalled" , isInstalled.ToString()}, - {"CurrentState" , currentState}, - {"RequestState" , requestState}, - {"NtvsVersion" , session["NTVSVersion"]}, - {"VSVersion" , session["VSVersion"]}, - {"MsiVersion" , session["MSIVersion"]}, - {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} - } - } - } - } - } + { + "iKey", "377a3718-78a7-49df-abcc-1001317db729" + }, + { + "name", "Microsoft.ApplicationInsights.Event" + }, + { + "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) + }, + { + "data", new Dictionary < string, object > () + { + { + "baseType", "EventData" + }, + { + "baseData", new Dictionary < string, object > () + { + { + "ver", AIVersion + }, + { + "name", "NtvsInstallerTelemetry" + }, + { + "properties", new Dictionary < string, string > () + { + { + "InstallStatus", "Cancel" + }, + { + "IsNtvsInstalled", isInstalled.ToString() + }, + { + "CurrentState", currentState + }, + { + "RequestState", requestState + }, + { + "NtvsVersion", session["NtvsVersion"] + }, + { + "VSVersion", session["VSVersion"] + }, + { + "MsiVersion", session["MsiVersion"] + }, + { + "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) + } + } + } + } + } + } } }; string jsonString = (new JavaScriptSerializer()).Serialize(data); diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index bd9e0ecaa..7bd136c6f 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -43,37 +43,10 @@ Properties Microsoft.NodejsTools Microsoft.NodejsTools.InstallerTelemetryAction - - AnyCPU - @@ -89,8 +62,6 @@ - \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index 8956a8fa7..9aa497d40 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -147,8 +147,8 @@ - - + + From 9d75c2983d66cfa678c6555fbb3a729c4596b77d Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Mon, 24 Aug 2015 14:34:11 -0700 Subject: [PATCH 05/31] Removing tabs from Buildrelease.ps1 --- Nodejs/Setup/BuildRelease.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nodejs/Setup/BuildRelease.ps1 b/Nodejs/Setup/BuildRelease.ps1 index d9d0b1907..310dfb29a 100644 --- a/Nodejs/Setup/BuildRelease.ps1 +++ b/Nodejs/Setup/BuildRelease.ps1 @@ -244,8 +244,8 @@ $managed_files = ( "Microsoft.NodejsTools.TestAdapter.dll", "Microsoft.NodejsTools.PressAnyKey.exe", "Microsoft.NodejsTools.VsLogger.dll", - "Microsoft.NodejsTools.InstallerTelemetryAction.CA", - "Microsoft.NodejsTools.InstallerTelemetryAction" + "Microsoft.NodejsTools.InstallerTelemetryAction.CA", + "Microsoft.NodejsTools.InstallerTelemetryAction" ) $native_files = @() From a4cba5d7f1c5c41f0155ff4dba2ad509098d6738 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Mon, 24 Aug 2015 23:31:43 -0700 Subject: [PATCH 06/31] Addressing PR feedback --- .../Prerequisites/DisableSkipVerification.reg | 4 + .../DisableSkipVerificationX86.reg | 2 + .../Prerequisites/EnableSkipVerification.reg | 4 + .../EnableSkipVerificationX86.reg | 2 + Nodejs/Prerequisites/generate.js | 2 + Nodejs/Setup/BuildRelease.ps1 | 6 +- .../InstallerTelemetryAction.cs | 279 +++--------------- .../NodejsToolsInstaller.wixproj | 2 +- Nodejs/Setup/setup.proj | 2 +- 9 files changed, 64 insertions(+), 239 deletions(-) diff --git a/Nodejs/Prerequisites/DisableSkipVerification.reg b/Nodejs/Prerequisites/DisableSkipVerification.reg index 940dd5b10..facbeed5a 100644 --- a/Nodejs/Prerequisites/DisableSkipVerification.reg +++ b/Nodejs/Prerequisites/DisableSkipVerification.reg @@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] @@ -39,6 +41,8 @@ Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] diff --git a/Nodejs/Prerequisites/DisableSkipVerificationX86.reg b/Nodejs/Prerequisites/DisableSkipVerificationX86.reg index e2eefeff0..efbbf0e61 100644 --- a/Nodejs/Prerequisites/DisableSkipVerificationX86.reg +++ b/Nodejs/Prerequisites/DisableSkipVerificationX86.reg @@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] diff --git a/Nodejs/Prerequisites/EnableSkipVerification.reg b/Nodejs/Prerequisites/EnableSkipVerification.reg index 96510d3a8..76e69382a 100644 --- a/Nodejs/Prerequisites/EnableSkipVerification.reg +++ b/Nodejs/Prerequisites/EnableSkipVerification.reg @@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] @@ -39,6 +41,8 @@ Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] diff --git a/Nodejs/Prerequisites/EnableSkipVerificationX86.reg b/Nodejs/Prerequisites/EnableSkipVerificationX86.reg index c906f51cb..a6e0f68f8 100644 --- a/Nodejs/Prerequisites/EnableSkipVerificationX86.reg +++ b/Nodejs/Prerequisites/EnableSkipVerificationX86.reg @@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] diff --git a/Nodejs/Prerequisites/generate.js b/Nodejs/Prerequisites/generate.js index 8ff45ab2c..b8bf4882f 100644 --- a/Nodejs/Prerequisites/generate.js +++ b/Nodejs/Prerequisites/generate.js @@ -39,6 +39,8 @@ var assemblies = [ 'Microsoft.NodejsTools.WebRole', 'Microsoft.NodejsTools.Npm', 'Microsoft.NodejsTools.PressAnyKey', + 'Microsoft.NodejsTools.InstallerTelemetryAction.CA', + 'Microsoft.NodejsTools.InstallerTelemetryAction', 'Microsoft.NodejsTools.VsLogger' ].sort(); diff --git a/Nodejs/Setup/BuildRelease.ps1 b/Nodejs/Setup/BuildRelease.ps1 index 310dfb29a..6c82e32ea 100644 --- a/Nodejs/Setup/BuildRelease.ps1 +++ b/Nodejs/Setup/BuildRelease.ps1 @@ -243,9 +243,9 @@ $managed_files = ( "Microsoft.NodejsTools.Npm.dll", "Microsoft.NodejsTools.TestAdapter.dll", "Microsoft.NodejsTools.PressAnyKey.exe", - "Microsoft.NodejsTools.VsLogger.dll", - "Microsoft.NodejsTools.InstallerTelemetryAction.CA", - "Microsoft.NodejsTools.InstallerTelemetryAction" + "Microsoft.NodejsTools.InstallerTelemetryAction.CA.dll", + "Microsoft.NodejsTools.InstallerTelemetryAction.dll", + "Microsoft.NodejsTools.VsLogger.dll" ) $native_files = @() diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index bbe9ce308..a70fed297 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -26,86 +26,55 @@ namespace Microsoft.NodejsTools { - public class InstallerTelemetryActions - { - private static string AIVersion = "2"; - [CustomAction] - public static ActionResult RecordInstallStartTime(Session session) - { - session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallSuccessResult(Session session) - { + public class InstallerTelemetryActions { + private static void LogInstallStatus(string InstallStatus,Session session) { TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - session.Log("Begin Telemetry Log"); bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; + string currentState = null; + string requestState = null; - FeatureInfoCollection fc = session.Features; - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); + FeatureInfoCollection featureInfoCollection = session.Features; + foreach (FeatureInfo featureInfo in featureInfoCollection) { + currentState = featureInfo.CurrentState.ToString(); + requestState = featureInfo.RequestState.ToString(); // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - break; + break; } - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { + Dictionary data = new Dictionary() { { "iKey", "377a3718-78a7-49df-abcc-1001317db729" - }, - { + }, { "name", "Microsoft.ApplicationInsights.Event" - }, - { + }, { "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) - }, - { - "data", new Dictionary < string, object > () - { + }, { + "data", new Dictionary () { { "baseType", "EventData" - }, - { - "baseData", new Dictionary < string, object > () - { - { - "ver", AIVersion - }, + }, { + "baseData", new Dictionary () { { + "ver", "2" + }, { "name", "NtvsInstallerTelemetry" - }, - { - "properties", new Dictionary < string, string > () - { - { - "InstallStatus", "Success" - }, + }, { + "properties", new Dictionary () { { + "InstallStatus", InstallStatus + }, { "IsNtvsInstalled", isInstalled.ToString() - }, - { + }, { "CurrentState", currentState - }, - { + }, { "RequestState", requestState - }, - { + }, { "NtvsVersion", session["NtvsVersion"] - }, - { + }, { "VSVersion", session["VSVersion"] - }, - { + }, { "MsiVersion", session["MsiVersion"] - }, - { + }, { "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) } } @@ -115,197 +84,39 @@ public static ActionResult LogInstallSuccessResult(Session session) } } }; - string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) - { + using (WebClient client = new WebClient()) { string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); session.Log(response); } + } + + [CustomAction] + public static ActionResult RecordInstallStartTime(Session session) { + session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallSuccessResult(Session session) { + session.Log("Begin Telemetry Log"); + LogInstallStatus("Success", session); session.Log("End Telemetry Log"); return ActionResult.Success; } [CustomAction] - public static ActionResult LogInstallErrorResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - + public static ActionResult LogInstallErrorResult(Session session) { session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); - - FeatureInfoCollection fc = session.Features; - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - break; - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { - "iKey", "377a3718-78a7-49df-abcc-1001317db729" - }, - { - "name", "Microsoft.ApplicationInsights.Event" - }, - { - "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) - }, - { - "data", new Dictionary < string, object > () - { - { - "baseType", "EventData" - }, - { - "baseData", new Dictionary < string, object > () - { - { - "ver", AIVersion - }, - { - "name", "NtvsInstallerTelemetry" - }, - { - "properties", new Dictionary < string, string > () - { - { - "InstallStatus", "Error" - }, - { - "IsNtvsInstalled", isInstalled.ToString() - }, - { - "CurrentState", currentState - }, - { - "RequestState", requestState - }, - { - "NtvsVersion", session["NtvsVersion"] - }, - { - "VSVersion", session["VSVersion"] - }, - { - "MsiVersion", session["MsiVersion"] - }, - { - "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) - } - } - } - } - } - } - } - }; - - string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } + LogInstallStatus("Error", session); session.Log("End Telemetry Log"); return ActionResult.Success; } [CustomAction] - public static ActionResult LogInstallCancelResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - string AIVersion = "2"; - + public static ActionResult LogInstallCancelResult(Session session) { session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - FeatureInfoCollection fc = session.Features; - - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - break; - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { - "iKey", "377a3718-78a7-49df-abcc-1001317db729" - }, - { - "name", "Microsoft.ApplicationInsights.Event" - }, - { - "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) - }, - { - "data", new Dictionary < string, object > () - { - { - "baseType", "EventData" - }, - { - "baseData", new Dictionary < string, object > () - { - { - "ver", AIVersion - }, - { - "name", "NtvsInstallerTelemetry" - }, - { - "properties", new Dictionary < string, string > () - { - { - "InstallStatus", "Cancel" - }, - { - "IsNtvsInstalled", isInstalled.ToString() - }, - { - "CurrentState", currentState - }, - { - "RequestState", requestState - }, - { - "NtvsVersion", session["NtvsVersion"] - }, - { - "VSVersion", session["VSVersion"] - }, - { - "MsiVersion", session["MsiVersion"] - }, - { - "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) - } - } - } - } - } - } - } - }; - string jsonString = (new JavaScriptSerializer()).Serialize(data); - - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } + LogInstallStatus("Cancel", session); session.Log("End Telemetry Log"); return ActionResult.Success; } diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index 09c5f62dc..e813e8bad 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -56,7 +56,7 @@ - + InstallerTelemetryAction {775e686d-c646-4dab-9dcf-d2c37ff8ea78} diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 6ff3e7326..3d5707d09 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -19,7 +19,7 @@ - + From 06f51e246ff4756652216c99b2db365e487416b2 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Tue, 25 Aug 2015 17:30:07 -0700 Subject: [PATCH 07/31] Added final feedback --- .../InstallerTelemetryAction/InstallerTelemetryAction.cs | 8 ++++---- .../InstallerTelemetryAction.csproj | 5 +++-- .../NodejsToolsInstaller/NodejsToolsInstaller.wixproj | 4 ++++ .../Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs | 4 ++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index a70fed297..71982a6c7 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -24,7 +24,7 @@ using System.Web.Script.Serialization; using System.Globalization; -namespace Microsoft.NodejsTools +namespace Microsoft.NodejsTools.Telemetry { public class InstallerTelemetryActions { private static void LogInstallStatus(string InstallStatus,Session session) { @@ -35,8 +35,8 @@ private static void LogInstallStatus(string InstallStatus,Session session) { FeatureInfoCollection featureInfoCollection = session.Features; foreach (FeatureInfo featureInfo in featureInfoCollection) { - currentState = featureInfo.CurrentState.ToString(); - requestState = featureInfo.RequestState.ToString(); + currentState = featureInfo.CurrentState.ToString("F"); + requestState = featureInfo.RequestState.ToString("F"); // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. break; } @@ -63,7 +63,7 @@ private static void LogInstallStatus(string InstallStatus,Session session) { { "InstallStatus", InstallStatus }, { - "IsNtvsInstalled", isInstalled.ToString() + "IsNtvsInstalled", isInstalled.ToString(CultureInfo.InvariantCulture) }, { "CurrentState", currentState }, { diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index 7bd136c6f..b8204af05 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -41,7 +41,7 @@ {775E686D-C646-4DAB-9DCF-D2C37FF8EA78} Library Properties - Microsoft.NodejsTools + Microsoft.NodejsTools.Telemetry Microsoft.NodejsTools.InstallerTelemetryAction @@ -63,5 +63,6 @@ - + + \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index e813e8bad..e99abfcec 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -16,6 +16,10 @@ $(DefineConstants); IncludeVsLogger=$(IncludeVsLogger) + + $(DefineConstants); + ReleaseBuild=$(ReleaseBuild) + $(DefineConstants); IncludeVWDExpress=12.0.30219.0; diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index 9aa497d40..a9e78dada 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -157,6 +157,7 @@ + @@ -164,6 +165,7 @@ + @@ -171,10 +173,12 @@ NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH + + From 77de181c6c4091776f50b5905b26321218a77784 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Tue, 25 Aug 2015 17:57:07 -0700 Subject: [PATCH 08/31] using default wix targets --- .../InstallerTelemetryAction/InstallerTelemetryAction.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index b8204af05..eeb766238 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -63,6 +63,5 @@ - - + \ No newline at end of file From ef73165425f10ca883658920a8354c1148f275de Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 05:52:20 -0700 Subject: [PATCH 09/31] Adding build.targets --- Build/Common.Build.targets | 6 +++++- .../InstallerTelemetryAction.csproj | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Build/Common.Build.targets b/Build/Common.Build.targets index 84ab3dc29..1cfffb94c 100644 --- a/Build/Common.Build.targets +++ b/Build/Common.Build.targets @@ -133,7 +133,7 @@ Condition="'$(CopyOutputsToPath)' != '' and $(MSBuildProjectExtension) != '.wixproj' and Exists($(TargetPath))"> $(CopyOutputsToPath)\ - + @@ -144,5 +144,9 @@ + + diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index eeb766238..c49ffabb1 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -60,8 +60,11 @@ - - + + + + + \ No newline at end of file From 7b3b3369e5d14ec8611324f72887d92c241f5d76 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 10:19:34 -0700 Subject: [PATCH 10/31] Adding Build.targets --- Build/Common.Build.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Common.Build.targets b/Build/Common.Build.targets index 1cfffb94c..c9b0bf405 100644 --- a/Build/Common.Build.targets +++ b/Build/Common.Build.targets @@ -147,6 +147,6 @@ + Condition="'@(OutputBinariesToSign)' != ''"/> From 82500a553ac8b17a49fb223d8fff2d4f75b525f6 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 12:13:07 -0700 Subject: [PATCH 11/31] Reverting build.targets changes as my dlls are projects and not dlls so should be signed automatically --- Build/Common.Build.targets | 4 ---- .../InstallerTelemetryAction/InstallerTelemetryAction.csproj | 3 --- 2 files changed, 7 deletions(-) diff --git a/Build/Common.Build.targets b/Build/Common.Build.targets index c9b0bf405..dfa1ad09b 100644 --- a/Build/Common.Build.targets +++ b/Build/Common.Build.targets @@ -144,9 +144,5 @@ - - diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index c49ffabb1..d20de5917 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -62,9 +62,6 @@ - - - \ No newline at end of file From 32ff6272b660577ce9c8cf60d4903a3ec0c845ae Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 13:42:42 -0700 Subject: [PATCH 12/31] Adding feedback --- Nodejs/Product/AssemblyVersion.cs | 128 +++++++++++++++--------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/Nodejs/Product/AssemblyVersion.cs b/Nodejs/Product/AssemblyVersion.cs index 1a08522dc..5fedb4821 100644 --- a/Nodejs/Product/AssemblyVersion.cs +++ b/Nodejs/Product/AssemblyVersion.cs @@ -1,64 +1,64 @@ -//*********************************************************// -// Copyright (c) Microsoft. All rights reserved. -// -// Apache 2.0 License -// -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -// implied. See the License for the specific language governing -// permissions and limitations under the License. -// -//*********************************************************// - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// If you get compiler errors CS0579, "Duplicate '' attribute", check your -// Properties\AssemblyInfo.cs file and remove any lines duplicating the ones below. -// (See also AssemblyInfoCommon.cs in this same directory.) - -#if !SUPPRESS_COMMON_ASSEMBLY_VERSION -[assembly: AssemblyVersion(AssemblyVersionInfo.StableVersion)] -#endif -[assembly: AssemblyFileVersion(AssemblyVersionInfo.Version)] - -class AssemblyVersionInfo { - // This version string (and the comment for StableVersion) should be - // updated manually between major releases (e.g. from 1.0 to 2.0). - // Servicing branches and minor releases should retain the value. - public const string ReleaseVersion = "1.0"; - - // This version string (and the comment for Version) should be updated - // manually between minor releases (e.g. from 1.0 to 1.1). - // Servicing branches and prereleases should retain the value. - public const string FileVersion = "1.1"; - - // This version should never change from "4100.00"; BuildRelease.ps1 - // will replace it with a generated value. - public const string BuildNumber = "4100.00"; -#if DEV11 - public const string VSMajorVersion = "11"; - const string VSVersionSuffix = "2012"; -#elif DEV12 - public const string VSMajorVersion = "12"; - const string VSVersionSuffix = "2013"; -#elif DEV14 - public const string VSMajorVersion = "14"; - const string VSVersionSuffix = "2015"; -#else -#error Unrecognized VS Version. -#endif - - public const string VSVersion = VSMajorVersion + ".0"; - - // Defaults to "1.0.0.(2012|2013|2015)" - public const string StableVersion = ReleaseVersion + "." + VSVersionSuffix; - - // Defaults to "1.1.4100.00" - public const string Version = FileVersion + "." + BuildNumber; -} +//*********************************************************// +// Copyright (c) Microsoft. All rights reserved. +// +// Apache 2.0 License +// +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. +// +//*********************************************************// + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// If you get compiler errors CS0579, "Duplicate '' attribute", check your +// Properties\AssemblyInfo.cs file and remove any lines duplicating the ones below. +// (See also AssemblyInfoCommon.cs in this same directory.) + +#if !SUPPRESS_COMMON_ASSEMBLY_VERSION +[assembly: AssemblyVersion(AssemblyVersionInfo.StableVersion)] +#endif +[assembly: AssemblyFileVersion(AssemblyVersionInfo.Version)] + +class AssemblyVersionInfo { + // This version string (and the comment for StableVersion) should be + // updated manually between major releases (e.g. from 1.0 to 2.0). + // Servicing branches and minor releases should retain the value. + public const string ReleaseVersion = "1.0"; + + // This version string (and the comment for Version) should be updated + // manually between minor releases (e.g. from 1.0 to 1.1). + // Servicing branches and prereleases should retain the value. + public const string FileVersion = "1.1"; + + // This version should never change from "4100.00"; BuildRelease.ps1 + // will replace it with a generated value. + public const string BuildNumber = "30826.00"; +#if DEV11 + public const string VSMajorVersion = "11"; + const string VSVersionSuffix = "2012"; +#elif DEV12 + public const string VSMajorVersion = "12"; + const string VSVersionSuffix = "2013"; +#elif DEV14 + public const string VSMajorVersion = "14"; + const string VSVersionSuffix = "2015"; +#else +#error Unrecognized VS Version. +#endif + + public const string VSVersion = VSMajorVersion + ".0"; + + // Defaults to "1.0.0.(2012|2013|2015)" + public const string StableVersion = ReleaseVersion + "." + VSVersionSuffix; + + // Defaults to "1.1.4100.00" + public const string Version = FileVersion + "." + BuildNumber; +} From 4931fe40caf386d5482529726f4c9b3b4ff829c3 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 13:46:09 -0700 Subject: [PATCH 13/31] Adding feedback from CR --- .../InstallerTelemetryAction.cs | 69 ++++++++++--------- .../NodejsToolsInstaller.wixproj | 2 +- .../NodejsToolsInstaller.wxs | 4 +- Nodejs/Setup/setup.proj | 4 +- 4 files changed, 42 insertions(+), 37 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index 71982a6c7..cb4a407c1 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -27,14 +27,47 @@ namespace Microsoft.NodejsTools.Telemetry { public class InstallerTelemetryActions { - private static void LogInstallStatus(string InstallStatus,Session session) { + + [CustomAction] + public static ActionResult RecordInstallStartTime(Session session) { + session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallSuccessResult(Session session) { + session.Log("Begin Telemetry Log"); + LogInstallStatus("Success", session); + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallErrorResult(Session session) { + session.Log("Begin Telemetry Log"); + LogInstallStatus("Error", session); + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallCancelResult(Session session) { + session.Log("Begin Telemetry Log"); + LogInstallStatus("Cancel", session); + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + private static void LogInstallStatus(string InstallStatus, Session session) + { TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); bool isInstalled = session.EvaluateCondition("Installed"); string currentState = null; string requestState = null; FeatureInfoCollection featureInfoCollection = session.Features; - foreach (FeatureInfo featureInfo in featureInfoCollection) { + foreach (FeatureInfo featureInfo in featureInfoCollection) + { currentState = featureInfo.CurrentState.ToString("F"); requestState = featureInfo.RequestState.ToString("F"); // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. @@ -85,40 +118,12 @@ private static void LogInstallStatus(string InstallStatus,Session session) { } }; string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) { + using (WebClient client = new WebClient()) + { string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); session.Log(response); } } - [CustomAction] - public static ActionResult RecordInstallStartTime(Session session) { - session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallSuccessResult(Session session) { - session.Log("Begin Telemetry Log"); - LogInstallStatus("Success", session); - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallErrorResult(Session session) { - session.Log("Begin Telemetry Log"); - LogInstallStatus("Error", session); - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallCancelResult(Session session) { - session.Log("Begin Telemetry Log"); - LogInstallStatus("Cancel", session); - session.Log("End Telemetry Log"); - return ActionResult.Success; - } } } \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index e99abfcec..51b6c5674 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -60,7 +60,7 @@ - + InstallerTelemetryAction {775e686d-c646-4dab-9dcf-d2c37ff8ea78} diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index a9e78dada..1a3c6d721 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -157,7 +157,7 @@ - + @@ -173,7 +173,7 @@ NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH - + diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 3d5707d09..949d25bf3 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -18,8 +18,8 @@ - - + + From 3c6a3457dd75420f64eb095221af481be21f1048 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 16:20:01 -0700 Subject: [PATCH 14/31] Using Checked in wix.ca.targets --- .../InstallerTelemetryAction/InstallerTelemetryAction.cs | 6 +++--- .../InstallerTelemetryAction.csproj | 3 ++- Nodejs/Setup/setup.proj | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index cb4a407c1..953ff5a79 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -16,13 +16,13 @@ using System; using System.Collections.Generic; -using System.Text; -using Microsoft.Deployment.WindowsInstaller; +using System.Collections.Specialized; using System.Diagnostics; using System.Net; -using System.Collections.Specialized; +using System.Text; using System.Web.Script.Serialization; using System.Globalization; +using Microsoft.Deployment.WindowsInstaller; namespace Microsoft.NodejsTools.Telemetry { diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index d20de5917..c66937562 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -62,6 +62,7 @@ + + - \ No newline at end of file diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 949d25bf3..51a20d6dd 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -23,6 +23,5 @@ - From 190322ce5db7b8b3b380644a04927992b25eba2a Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 16:51:23 -0700 Subject: [PATCH 15/31] Removing assemblyversions.cs --- Nodejs/Product/AssemblyVersion.cs | 64 ------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 Nodejs/Product/AssemblyVersion.cs diff --git a/Nodejs/Product/AssemblyVersion.cs b/Nodejs/Product/AssemblyVersion.cs deleted file mode 100644 index 5fedb4821..000000000 --- a/Nodejs/Product/AssemblyVersion.cs +++ /dev/null @@ -1,64 +0,0 @@ -//*********************************************************// -// Copyright (c) Microsoft. All rights reserved. -// -// Apache 2.0 License -// -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -// implied. See the License for the specific language governing -// permissions and limitations under the License. -// -//*********************************************************// - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// If you get compiler errors CS0579, "Duplicate '' attribute", check your -// Properties\AssemblyInfo.cs file and remove any lines duplicating the ones below. -// (See also AssemblyInfoCommon.cs in this same directory.) - -#if !SUPPRESS_COMMON_ASSEMBLY_VERSION -[assembly: AssemblyVersion(AssemblyVersionInfo.StableVersion)] -#endif -[assembly: AssemblyFileVersion(AssemblyVersionInfo.Version)] - -class AssemblyVersionInfo { - // This version string (and the comment for StableVersion) should be - // updated manually between major releases (e.g. from 1.0 to 2.0). - // Servicing branches and minor releases should retain the value. - public const string ReleaseVersion = "1.0"; - - // This version string (and the comment for Version) should be updated - // manually between minor releases (e.g. from 1.0 to 1.1). - // Servicing branches and prereleases should retain the value. - public const string FileVersion = "1.1"; - - // This version should never change from "4100.00"; BuildRelease.ps1 - // will replace it with a generated value. - public const string BuildNumber = "30826.00"; -#if DEV11 - public const string VSMajorVersion = "11"; - const string VSVersionSuffix = "2012"; -#elif DEV12 - public const string VSMajorVersion = "12"; - const string VSVersionSuffix = "2013"; -#elif DEV14 - public const string VSMajorVersion = "14"; - const string VSVersionSuffix = "2015"; -#else -#error Unrecognized VS Version. -#endif - - public const string VSVersion = VSMajorVersion + ".0"; - - // Defaults to "1.0.0.(2012|2013|2015)" - public const string StableVersion = ReleaseVersion + "." + VSVersionSuffix; - - // Defaults to "1.1.4100.00" - public const string Version = FileVersion + "." + BuildNumber; -} From 5a093e5f0adc84b5a214c22095842ecb1642fb8a Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 22:58:47 -0700 Subject: [PATCH 16/31] Fixing releasebuild variable and adding csharp target to build .ca.dll file --- .../InstallerTelemetryAction.csproj | 11 ++++++----- .../NodejsToolsInstaller/NodejsToolsInstaller.wixproj | 2 +- .../NodejsToolsInstaller/NodejsToolsInstaller.wxs | 10 ++++++---- Nodejs/Setup/setup.proj | 6 +++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index c66937562..d7254662b 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -1,6 +1,6 @@  - + 14.0 @@ -43,6 +43,7 @@ Properties Microsoft.NodejsTools.Telemetry Microsoft.NodejsTools.InstallerTelemetryAction + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets AnyCPU @@ -60,9 +61,9 @@ - + - - - + + + \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index 51b6c5674..0d733b765 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -60,7 +60,7 @@ - + InstallerTelemetryAction {775e686d-c646-4dab-9dcf-d2c37ff8ea78} diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index 1a3c6d721..c8e77625a 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -157,15 +157,17 @@ - + + - + + - + @@ -173,7 +175,7 @@ NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH - + diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 51a20d6dd..6f509177b 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -18,10 +18,10 @@ - - + + - + From ca896ec1cdddafba97de90194aa39ba3ae55fe16 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 23:06:19 -0700 Subject: [PATCH 17/31] Adding default AssemblyVersion.cs --- Nodejs/Product/AssemblyVersion.cs | 64 +++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Nodejs/Product/AssemblyVersion.cs diff --git a/Nodejs/Product/AssemblyVersion.cs b/Nodejs/Product/AssemblyVersion.cs new file mode 100644 index 000000000..5b7bbfa10 --- /dev/null +++ b/Nodejs/Product/AssemblyVersion.cs @@ -0,0 +1,64 @@ +//*********************************************************// +// Copyright (c) Microsoft. All rights reserved. +// +// Apache 2.0 License +// +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. +// +//*********************************************************// + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// If you get compiler errors CS0579, "Duplicate '' attribute", check your +// Properties\AssemblyInfo.cs file and remove any lines duplicating the ones below. +// (See also AssemblyInfoCommon.cs in this same directory.) + +#if !SUPPRESS_COMMON_ASSEMBLY_VERSION +[assembly: AssemblyVersion(AssemblyVersionInfo.StableVersion)] +#endif +[assembly: AssemblyFileVersion(AssemblyVersionInfo.Version)] + +class AssemblyVersionInfo { + // This version string (and the comment for StableVersion) should be + // updated manually between major releases (e.g. from 1.0 to 2.0). + // Servicing branches and minor releases should retain the value. + public const string ReleaseVersion = "1.0"; + + // This version string (and the comment for Version) should be updated + // manually between minor releases (e.g. from 1.0 to 1.1). + // Servicing branches and prereleases should retain the value. + public const string FileVersion = "1.1"; + + // This version should never change from "4100.00"; BuildRelease.ps1 + // will replace it with a generated value. + public const string BuildNumber = "4100.00"; +#if DEV11 + public const string VSMajorVersion = "11"; + const string VSVersionSuffix = "2012"; +#elif DEV12 + public const string VSMajorVersion = "12"; + const string VSVersionSuffix = "2013"; +#elif DEV14 + public const string VSMajorVersion = "14"; + const string VSVersionSuffix = "2015"; +#else +#error Unrecognized VS Version. +#endif + + public const string VSVersion = VSMajorVersion + ".0"; + + // Defaults to "1.0.0.(2012|2013|2015)" + public const string StableVersion = ReleaseVersion + "." + VSVersionSuffix; + + // Defaults to "1.1.4100.00" + public const string Version = FileVersion + "." + BuildNumber; +} From 34a9c26d4eb65ce8a94854281a08be0a26fd3366 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Tue, 18 Aug 2015 18:03:11 -0700 Subject: [PATCH 18/31] Addin Installer Telemetry --- .../Setup/Custom_Action/CustomAction.config | 32 +++ Nodejs/Setup/Custom_Action/CustomAction.cs | 191 ++++++++++++++++++ .../Setup/Custom_Action/Custom_Action.csproj | 52 +++++ .../Custom_Action/Properties/AssemblyInfo.cs | 35 ++++ .../NodejsToolsInstaller.wixproj | 4 + .../NodejsToolsInstaller.wxs | 16 ++ Nodejs/Setup/setup.proj | 2 + 7 files changed, 332 insertions(+) create mode 100644 Nodejs/Setup/Custom_Action/CustomAction.config create mode 100644 Nodejs/Setup/Custom_Action/CustomAction.cs create mode 100644 Nodejs/Setup/Custom_Action/Custom_Action.csproj create mode 100644 Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs diff --git a/Nodejs/Setup/Custom_Action/CustomAction.config b/Nodejs/Setup/Custom_Action/CustomAction.config new file mode 100644 index 000000000..233c44d7f --- /dev/null +++ b/Nodejs/Setup/Custom_Action/CustomAction.config @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + diff --git a/Nodejs/Setup/Custom_Action/CustomAction.cs b/Nodejs/Setup/Custom_Action/CustomAction.cs new file mode 100644 index 000000000..133c17f23 --- /dev/null +++ b/Nodejs/Setup/Custom_Action/CustomAction.cs @@ -0,0 +1,191 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Deployment.WindowsInstaller; +using System.Diagnostics; +using System.Net; +using System.Collections.Specialized; +using System.Web.Script.Serialization; + +namespace Custom_Action +{ + public class CustomActions + { + [CustomAction] + public static ActionResult RecordInstallStartTime(Session session) + { + session["InstallStartTime"] = DateTime.Now.ToString(); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallSuccessResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + session.Log("Is Aready Installed: "+session.EvaluateCondition("Installed").ToString()); + + FeatureInfoCollection fc = session.Features; + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, + { "name", "Microsoft.ApplicationInsights.Event"}, + {"time", DateTime.Now.ToUniversalTime().ToString()}, + {"data",new Dictionary() + { + {"baseType","EventData"}, + {"baseData",new Dictionary() + { + {"ver","2"}, + {"name","NTVSInstallerTel"}, + {"properties",new Dictionary() + { + {"InstallStatus","Success"}, + {"IsNTVSInstalled",isInstalled.ToString()}, + {"CurrentState",currentState}, + {"RequestState",requestState}, + {"NTVSVersion",session["NTVSVersion"]}, + {"VSVersion",session["VSVersion"]}, + {"MSIVersion",session["MSIVersion"]}, + {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} + }} + }} + }} + }; + + string jsonString = (new JavaScriptSerializer()).Serialize(data); + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + public static ActionResult LogInstallErrorResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); + + FeatureInfoCollection fc = session.Features; + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, + { "name", "Microsoft.ApplicationInsights.Event"}, + {"time", DateTime.Now.ToUniversalTime().ToString()}, + {"data",new Dictionary() + { + {"baseType","EventData"}, + {"baseData",new Dictionary() + { + {"ver","2"}, + {"name","NTVSInstallerTel"}, + {"properties",new Dictionary() + { + {"InstallStatus","Error"}, + {"IsNTVSInstalled",isInstalled.ToString()}, + {"CurrentState",currentState}, + {"RequestState",requestState}, + {"NTVSVersion",session["NTVSVersion"]}, + {"VSVersion",session["VSVersion"]}, + {"MSIVersion",session["MSIVersion"]}, + {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} + }} + }} + }} + }; + + string jsonString = (new JavaScriptSerializer()).Serialize(data); + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + public static ActionResult LogInstallCancelResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); + + FeatureInfoCollection fc = session.Features; + + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, + { "name", "Microsoft.ApplicationInsights.Event"}, + {"time", DateTime.Now.ToUniversalTime().ToString()}, + {"data",new Dictionary() + { + {"baseType","EventData"}, + {"baseData",new Dictionary() + { + {"ver","2"}, + {"name","NTVSInstallerTel"}, + {"properties",new Dictionary() + { + {"InstallStatus","Cancel"}, + {"IsNTVSInstalled",isInstalled.ToString()}, + {"CurrentState",currentState}, + {"RequestState",requestState}, + {"NTVSVersion",session["NTVSVersion"]}, + {"VSVersion",session["VSVersion"]}, + {"MSIVersion",session["MSIVersion"]}, + {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} + }} + }} + }} + }; + string jsonString = (new JavaScriptSerializer()).Serialize(data); + + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + } +} diff --git a/Nodejs/Setup/Custom_Action/Custom_Action.csproj b/Nodejs/Setup/Custom_Action/Custom_Action.csproj new file mode 100644 index 000000000..be6cb7cef --- /dev/null +++ b/Nodejs/Setup/Custom_Action/Custom_Action.csproj @@ -0,0 +1,52 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {775E686D-C646-4DAB-9DCF-D2C37FF8EA78} + Library + Properties + Custom_Action + Custom_Action + v4.5 + 512 + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + True + + + + + + + + + + \ No newline at end of file diff --git a/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs b/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..3853d8bcb --- /dev/null +++ b/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Custom_Action")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Custom_Action")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a5faa5cc-5490-4ad9-a822-8c410cfee6a9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index ebc9e50d0..c6792e947 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -52,6 +52,10 @@ + + Custom_Action + {775e686d-c646-4dab-9dcf-d2c37ff8ea78} + InteractiveWindow {C0D64130-C0E9-4CAB-99BC-68F62357F010} diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index 8ba800483..51c51743e 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -133,6 +133,7 @@ + @@ -140,11 +141,26 @@ + + + + + + + + + + + NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH + + + + NOT Installed diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 867ebe1bb..6ab8b9ce0 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -18,6 +18,8 @@ + + From d1b4d202eae574a79f670f667aa6b3fa445045ab Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Sat, 22 Aug 2015 08:48:39 -0700 Subject: [PATCH 19/31] InstallerTelemetry2 --- Nodejs/Setup/BuildRelease.ps1 | 3 + .../CustomAction.config | 31 +++ .../InstallerTelemetryAction.cs | 220 ++++++++++++++++++ .../InstallerTelemetryAction.csproj | 96 ++++++++ .../NodejsToolsInstaller.wixproj | 95 ++++++++ .../NodejsToolsInstaller.wxs | 24 +- Nodejs/Setup/setup.proj | 2 +- 7 files changed, 459 insertions(+), 12 deletions(-) create mode 100644 Nodejs/Setup/InstallerTelemetryAction/CustomAction.config create mode 100644 Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs create mode 100644 Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj diff --git a/Nodejs/Setup/BuildRelease.ps1 b/Nodejs/Setup/BuildRelease.ps1 index c48b72037..67b3da612 100644 --- a/Nodejs/Setup/BuildRelease.ps1 +++ b/Nodejs/Setup/BuildRelease.ps1 @@ -242,6 +242,9 @@ $managed_files = ( "Microsoft.NodejsTools.Telemetry.11.0.dll", "Microsoft.NodejsTools.Telemetry.12.0.dll", "Microsoft.NodejsTools.Telemetry.14.0.dll" + "Microsoft.NodejsTools.VsLogger.dll", + "Microsoft.NodejsTools.InstallerTelemetryAction.CA", + "Microsoft.NodejsTools.InstallerTelemetryAction" ) $native_files = @() diff --git a/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config b/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config new file mode 100644 index 000000000..5a3884082 --- /dev/null +++ b/Nodejs/Setup/InstallerTelemetryAction/CustomAction.config @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs new file mode 100644 index 000000000..9ed66349b --- /dev/null +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -0,0 +1,220 @@ +//*********************************************************// +// Copyright (c) Microsoft. All rights reserved. +// +// Apache 2.0 License +// +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. +// +//*********************************************************// + +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Deployment.WindowsInstaller; +using System.Diagnostics; +using System.Net; +using System.Collections.Specialized; +using System.Web.Script.Serialization; +using System.Globalization; + +namespace Microsoft.NodejsTools +{ + public class InstallerTelemetryActions + { + private static string AIVersion = "2"; + [CustomAction] + public static ActionResult RecordInstallStartTime(Session session) + { + session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallSuccessResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + + FeatureInfoCollection fc = session.Features; + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + break; + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, + { "name" , "Microsoft.ApplicationInsights.Event"}, + {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, + {"data" , new Dictionary() + { + {"baseType" , "EventData"}, + {"baseData" , new Dictionary() + { + {"ver" , AIVersion}, + {"name" , "NtvsInstallerTelemetry"}, + {"properties" , new Dictionary() + { + {"InstallStatus" , "Success"}, + {"IsNtvsInstalled" , isInstalled.ToString()}, + {"CurrentState" , currentState}, + {"RequestState" , requestState}, + {"NtvsVersion" , session["NTVSVersion"]}, + {"VSVersion" , session["VSVersion"]}, + {"MsiVersion" , session["MSIVersion"]}, + {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} + } + } + } + } + } + } + }; + + string jsonString = (new JavaScriptSerializer()).Serialize(data); + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallErrorResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); + + FeatureInfoCollection fc = session.Features; + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + break; + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, + { "name" , "Microsoft.ApplicationInsights.Event"}, + {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, + {"data" , new Dictionary() + { + {"baseType" , "EventData"}, + {"baseData" , new Dictionary() + { + {"ver" , AIVersion}, + {"name" , "NtvsInstallerTelemetry"}, + {"properties" , new Dictionary() + { + {"InstallStatus" , "Error"}, + {"IsNtvsInstalled" , isInstalled.ToString()}, + {"CurrentState" , currentState}, + {"RequestState" , requestState}, + {"NtvsVersion" , session["NTVSVersion"]}, + {"VSVersion" , session["VSVersion"]}, + {"MsiVersion" , session["MSIVersion"]}, + {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} + } + } + } + } + } + } + }; + + string jsonString = (new JavaScriptSerializer()).Serialize(data); + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallCancelResult(Session session) + { + TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); + string AIVersion = "2"; + + session.Log("Begin Telemetry Log"); + bool isInstalled = session.EvaluateCondition("Installed"); + string currentState = ""; + string requestState = ""; + FeatureInfoCollection fc = session.Features; + + foreach (FeatureInfo f in fc) + { + currentState = f.CurrentState.ToString(); + requestState = f.RequestState.ToString(); + // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. + break; + } + + session.Log("Starting POST"); + Dictionary data = new Dictionary() + { + { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, + { "name" , "Microsoft.ApplicationInsights.Event"}, + {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, + {"data" , new Dictionary() + { + {"baseType" , "EventData"}, + {"baseData" , new Dictionary() + { + {"ver" , AIVersion}, + {"name" , "NtvsInstallerTelemetry"}, + {"properties" , new Dictionary() + { + {"InstallStatus" , "Cancel"}, + {"IsNtvsInstalled" , isInstalled.ToString()}, + {"CurrentState" , currentState}, + {"RequestState" , requestState}, + {"NtvsVersion" , session["NTVSVersion"]}, + {"VSVersion" , session["VSVersion"]}, + {"MsiVersion" , session["MSIVersion"]}, + {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} + } + } + } + } + } + } + }; + string jsonString = (new JavaScriptSerializer()).Serialize(data); + + using (WebClient client = new WebClient()) + { + string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); + session.Log(response); + } + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + } +} \ No newline at end of file diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj new file mode 100644 index 000000000..bd9e0ecaa --- /dev/null +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -0,0 +1,96 @@ + + + + + + 14.0 + + + + + 4.0 + + + + + 12.0 + + + + + 4.0 + + + + + 11.0 + + + + + 4.0 + + + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {775E686D-C646-4DAB-9DCF-D2C37FF8EA78} + Library + Properties + Microsoft.NodejsTools + Microsoft.NodejsTools.InstallerTelemetryAction + + + + + AnyCPU + + + + + + + + + + + True + + + + + + + + + + \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index c6792e947..49d7ac0c9 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -1,3 +1,4 @@ +<<<<<<< HEAD  @@ -82,4 +83,98 @@ +======= + + + + + 3.5 + {DEE349D0-5AE5-4B6F-9720-785240AF3118} + 2.0 + NodejsToolsInstaller + Package + false + SAK + SAK + SAK + SAK + + $(DefineConstants); + IncludeVsLogger=$(IncludeVsLogger) + + + $(DefineConstants); + IncludeVWDExpress=12.0.30219.0; + + + $(DefineConstants); + IncludeVWDExpress=14.0.0.0; + + + + + WixUIExtension + WixUIExtension + + + WixUtilExtension + WixUtilExtension + + + WixDependencyExtension + WixDependencyExtension + + + WixNetFxExtension + WixNetFxExtension + + + + + + CommonLaunchConditions.wxs + + + + + + + + + + + InstallerTelemetryAction + {775e686d-c646-4dab-9dcf-d2c37ff8ea78} + + + InteractiveWindow + {C0D64130-C0E9-4CAB-99BC-68F62357F010} + + + NodejsTools + {48D35916-497E-43A4-88A7-A829B7BF0EF1} + + + NodejsProfiler + {C7D3FCEB-47DA-4539-8D20-6B9047BAC3F7} + + + VsLoggerMsm + {639BFC80-B31B-4D3F-9DF3-A65913000B4B} + + + + + + + + + + + + + + + +>>>>>>> InstallerTelemetry2 \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index 51c51743e..e390280a1 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -133,7 +133,10 @@ - + + + + @@ -141,18 +144,16 @@ - - - - - - - - - - + + + + + + + + NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH @@ -161,6 +162,7 @@ + NOT Installed diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 6ab8b9ce0..6ff3e7326 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -19,7 +19,7 @@ - + From b5c4e10a1f45d4949c080b84e35215a63affa7b2 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Sat, 22 Aug 2015 08:52:49 -0700 Subject: [PATCH 20/31] Removing older files --- .../Setup/Custom_Action/CustomAction.config | 32 --- Nodejs/Setup/Custom_Action/CustomAction.cs | 191 ------------------ .../Setup/Custom_Action/Custom_Action.csproj | 52 ----- .../Custom_Action/Properties/AssemblyInfo.cs | 35 ---- 4 files changed, 310 deletions(-) delete mode 100644 Nodejs/Setup/Custom_Action/CustomAction.config delete mode 100644 Nodejs/Setup/Custom_Action/CustomAction.cs delete mode 100644 Nodejs/Setup/Custom_Action/Custom_Action.csproj delete mode 100644 Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs diff --git a/Nodejs/Setup/Custom_Action/CustomAction.config b/Nodejs/Setup/Custom_Action/CustomAction.config deleted file mode 100644 index 233c44d7f..000000000 --- a/Nodejs/Setup/Custom_Action/CustomAction.config +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Nodejs/Setup/Custom_Action/CustomAction.cs b/Nodejs/Setup/Custom_Action/CustomAction.cs deleted file mode 100644 index 133c17f23..000000000 --- a/Nodejs/Setup/Custom_Action/CustomAction.cs +++ /dev/null @@ -1,191 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Microsoft.Deployment.WindowsInstaller; -using System.Diagnostics; -using System.Net; -using System.Collections.Specialized; -using System.Web.Script.Serialization; - -namespace Custom_Action -{ - public class CustomActions - { - [CustomAction] - public static ActionResult RecordInstallStartTime(Session session) - { - session["InstallStartTime"] = DateTime.Now.ToString(); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallSuccessResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - - session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - session.Log("Is Aready Installed: "+session.EvaluateCondition("Installed").ToString()); - - FeatureInfoCollection fc = session.Features; - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, - { "name", "Microsoft.ApplicationInsights.Event"}, - {"time", DateTime.Now.ToUniversalTime().ToString()}, - {"data",new Dictionary() - { - {"baseType","EventData"}, - {"baseData",new Dictionary() - { - {"ver","2"}, - {"name","NTVSInstallerTel"}, - {"properties",new Dictionary() - { - {"InstallStatus","Success"}, - {"IsNTVSInstalled",isInstalled.ToString()}, - {"CurrentState",currentState}, - {"RequestState",requestState}, - {"NTVSVersion",session["NTVSVersion"]}, - {"VSVersion",session["VSVersion"]}, - {"MSIVersion",session["MSIVersion"]}, - {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} - }} - }} - }} - }; - - string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - - public static ActionResult LogInstallErrorResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - - session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); - - FeatureInfoCollection fc = session.Features; - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, - { "name", "Microsoft.ApplicationInsights.Event"}, - {"time", DateTime.Now.ToUniversalTime().ToString()}, - {"data",new Dictionary() - { - {"baseType","EventData"}, - {"baseData",new Dictionary() - { - {"ver","2"}, - {"name","NTVSInstallerTel"}, - {"properties",new Dictionary() - { - {"InstallStatus","Error"}, - {"IsNTVSInstalled",isInstalled.ToString()}, - {"CurrentState",currentState}, - {"RequestState",requestState}, - {"NTVSVersion",session["NTVSVersion"]}, - {"VSVersion",session["VSVersion"]}, - {"MSIVersion",session["MSIVersion"]}, - {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} - }} - }} - }} - }; - - string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - - public static ActionResult LogInstallCancelResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - - session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); - - FeatureInfoCollection fc = session.Features; - - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - break; // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { "iKey", "377a3718-78a7-49df-abcc-1001317db729" }, - { "name", "Microsoft.ApplicationInsights.Event"}, - {"time", DateTime.Now.ToUniversalTime().ToString()}, - {"data",new Dictionary() - { - {"baseType","EventData"}, - {"baseData",new Dictionary() - { - {"ver","2"}, - {"name","NTVSInstallerTel"}, - {"properties",new Dictionary() - { - {"InstallStatus","Cancel"}, - {"IsNTVSInstalled",isInstalled.ToString()}, - {"CurrentState",currentState}, - {"RequestState",requestState}, - {"NTVSVersion",session["NTVSVersion"]}, - {"VSVersion",session["VSVersion"]}, - {"MSIVersion",session["MSIVersion"]}, - {"TimeTakenInSeconds",installTime.TotalSeconds.ToString()} - }} - }} - }} - }; - string jsonString = (new JavaScriptSerializer()).Serialize(data); - - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - } -} diff --git a/Nodejs/Setup/Custom_Action/Custom_Action.csproj b/Nodejs/Setup/Custom_Action/Custom_Action.csproj deleted file mode 100644 index be6cb7cef..000000000 --- a/Nodejs/Setup/Custom_Action/Custom_Action.csproj +++ /dev/null @@ -1,52 +0,0 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {775E686D-C646-4DAB-9DCF-D2C37FF8EA78} - Library - Properties - Custom_Action - Custom_Action - v4.5 - 512 - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - True - - - - - - - - - - \ No newline at end of file diff --git a/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs b/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs deleted file mode 100644 index 3853d8bcb..000000000 --- a/Nodejs/Setup/Custom_Action/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Custom_Action")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Custom_Action")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a5faa5cc-5490-4ad9-a822-8c410cfee6a9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] From a722233dcbe372c8fbecb04631d4f9265777bf25 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Mon, 24 Aug 2015 14:20:16 -0700 Subject: [PATCH 21/31] adding indentation --- .../InstallerTelemetryAction.cs | 243 ++++++++++++------ .../InstallerTelemetryAction.csproj | 29 --- .../NodejsToolsInstaller.wxs | 4 +- 3 files changed, 170 insertions(+), 106 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index 9ed66349b..bbe9ce308 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -57,31 +57,62 @@ public static ActionResult LogInstallSuccessResult(Session session) session.Log("Starting POST"); Dictionary data = new Dictionary() { - { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, - { "name" , "Microsoft.ApplicationInsights.Event"}, - {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, - {"data" , new Dictionary() - { - {"baseType" , "EventData"}, - {"baseData" , new Dictionary() - { - {"ver" , AIVersion}, - {"name" , "NtvsInstallerTelemetry"}, - {"properties" , new Dictionary() - { - {"InstallStatus" , "Success"}, - {"IsNtvsInstalled" , isInstalled.ToString()}, - {"CurrentState" , currentState}, - {"RequestState" , requestState}, - {"NtvsVersion" , session["NTVSVersion"]}, - {"VSVersion" , session["VSVersion"]}, - {"MsiVersion" , session["MSIVersion"]}, - {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} - } - } - } - } - } + { + "iKey", "377a3718-78a7-49df-abcc-1001317db729" + }, + { + "name", "Microsoft.ApplicationInsights.Event" + }, + { + "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) + }, + { + "data", new Dictionary < string, object > () + { + { + "baseType", "EventData" + }, + { + "baseData", new Dictionary < string, object > () + { + { + "ver", AIVersion + }, + { + "name", "NtvsInstallerTelemetry" + }, + { + "properties", new Dictionary < string, string > () + { + { + "InstallStatus", "Success" + }, + { + "IsNtvsInstalled", isInstalled.ToString() + }, + { + "CurrentState", currentState + }, + { + "RequestState", requestState + }, + { + "NtvsVersion", session["NtvsVersion"] + }, + { + "VSVersion", session["VSVersion"] + }, + { + "MsiVersion", session["MsiVersion"] + }, + { + "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) + } + } + } + } + } + } } }; @@ -118,31 +149,62 @@ public static ActionResult LogInstallErrorResult(Session session) session.Log("Starting POST"); Dictionary data = new Dictionary() { - { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, - { "name" , "Microsoft.ApplicationInsights.Event"}, - {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, - {"data" , new Dictionary() - { - {"baseType" , "EventData"}, - {"baseData" , new Dictionary() - { - {"ver" , AIVersion}, - {"name" , "NtvsInstallerTelemetry"}, - {"properties" , new Dictionary() - { - {"InstallStatus" , "Error"}, - {"IsNtvsInstalled" , isInstalled.ToString()}, - {"CurrentState" , currentState}, - {"RequestState" , requestState}, - {"NtvsVersion" , session["NTVSVersion"]}, - {"VSVersion" , session["VSVersion"]}, - {"MsiVersion" , session["MSIVersion"]}, - {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} - } - } - } - } - } + { + "iKey", "377a3718-78a7-49df-abcc-1001317db729" + }, + { + "name", "Microsoft.ApplicationInsights.Event" + }, + { + "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) + }, + { + "data", new Dictionary < string, object > () + { + { + "baseType", "EventData" + }, + { + "baseData", new Dictionary < string, object > () + { + { + "ver", AIVersion + }, + { + "name", "NtvsInstallerTelemetry" + }, + { + "properties", new Dictionary < string, string > () + { + { + "InstallStatus", "Error" + }, + { + "IsNtvsInstalled", isInstalled.ToString() + }, + { + "CurrentState", currentState + }, + { + "RequestState", requestState + }, + { + "NtvsVersion", session["NtvsVersion"] + }, + { + "VSVersion", session["VSVersion"] + }, + { + "MsiVersion", session["MsiVersion"] + }, + { + "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) + } + } + } + } + } + } } }; @@ -179,31 +241,62 @@ public static ActionResult LogInstallCancelResult(Session session) session.Log("Starting POST"); Dictionary data = new Dictionary() { - { "iKey" , "377a3718-78a7-49df-abcc-1001317db729" }, - { "name" , "Microsoft.ApplicationInsights.Event"}, - {"time" , DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture)}, - {"data" , new Dictionary() - { - {"baseType" , "EventData"}, - {"baseData" , new Dictionary() - { - {"ver" , AIVersion}, - {"name" , "NtvsInstallerTelemetry"}, - {"properties" , new Dictionary() - { - {"InstallStatus" , "Cancel"}, - {"IsNtvsInstalled" , isInstalled.ToString()}, - {"CurrentState" , currentState}, - {"RequestState" , requestState}, - {"NtvsVersion" , session["NTVSVersion"]}, - {"VSVersion" , session["VSVersion"]}, - {"MsiVersion" , session["MSIVersion"]}, - {"TimeTakenInSeconds" , installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture)} - } - } - } - } - } + { + "iKey", "377a3718-78a7-49df-abcc-1001317db729" + }, + { + "name", "Microsoft.ApplicationInsights.Event" + }, + { + "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) + }, + { + "data", new Dictionary < string, object > () + { + { + "baseType", "EventData" + }, + { + "baseData", new Dictionary < string, object > () + { + { + "ver", AIVersion + }, + { + "name", "NtvsInstallerTelemetry" + }, + { + "properties", new Dictionary < string, string > () + { + { + "InstallStatus", "Cancel" + }, + { + "IsNtvsInstalled", isInstalled.ToString() + }, + { + "CurrentState", currentState + }, + { + "RequestState", requestState + }, + { + "NtvsVersion", session["NtvsVersion"] + }, + { + "VSVersion", session["VSVersion"] + }, + { + "MsiVersion", session["MsiVersion"] + }, + { + "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) + } + } + } + } + } + } } }; string jsonString = (new JavaScriptSerializer()).Serialize(data); diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index bd9e0ecaa..7bd136c6f 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -43,37 +43,10 @@ Properties Microsoft.NodejsTools Microsoft.NodejsTools.InstallerTelemetryAction - - AnyCPU - @@ -89,8 +62,6 @@ - \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index e390280a1..6b7fe8966 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -134,8 +134,8 @@ - - + + From 963accebe231a2d4242a4ac21ab7df0b7a96b8be Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Mon, 24 Aug 2015 14:34:11 -0700 Subject: [PATCH 22/31] Removing tabs from Buildrelease.ps1 --- Nodejs/Setup/BuildRelease.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nodejs/Setup/BuildRelease.ps1 b/Nodejs/Setup/BuildRelease.ps1 index 67b3da612..521701460 100644 --- a/Nodejs/Setup/BuildRelease.ps1 +++ b/Nodejs/Setup/BuildRelease.ps1 @@ -243,8 +243,8 @@ $managed_files = ( "Microsoft.NodejsTools.Telemetry.12.0.dll", "Microsoft.NodejsTools.Telemetry.14.0.dll" "Microsoft.NodejsTools.VsLogger.dll", - "Microsoft.NodejsTools.InstallerTelemetryAction.CA", - "Microsoft.NodejsTools.InstallerTelemetryAction" + "Microsoft.NodejsTools.InstallerTelemetryAction.CA", + "Microsoft.NodejsTools.InstallerTelemetryAction" ) $native_files = @() From 82518c943a6e323920b40bde8fdac7f0b2a3a33e Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Mon, 24 Aug 2015 23:31:43 -0700 Subject: [PATCH 23/31] Addressing PR feedback --- .../Prerequisites/DisableSkipVerification.reg | 4 + .../DisableSkipVerificationX86.reg | 2 + .../Prerequisites/EnableSkipVerification.reg | 4 + .../EnableSkipVerificationX86.reg | 2 + Nodejs/Prerequisites/generate.js | 3 + Nodejs/Setup/BuildRelease.ps1 | 6 +- .../InstallerTelemetryAction.cs | 279 +++--------------- .../NodejsToolsInstaller.wixproj | 2 +- Nodejs/Setup/setup.proj | 2 +- 9 files changed, 65 insertions(+), 239 deletions(-) diff --git a/Nodejs/Prerequisites/DisableSkipVerification.reg b/Nodejs/Prerequisites/DisableSkipVerification.reg index e675360b6..ad1b09a64 100644 --- a/Nodejs/Prerequisites/DisableSkipVerification.reg +++ b/Nodejs/Prerequisites/DisableSkipVerification.reg @@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] @@ -42,6 +44,8 @@ Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] diff --git a/Nodejs/Prerequisites/DisableSkipVerificationX86.reg b/Nodejs/Prerequisites/DisableSkipVerificationX86.reg index f02e3e5fb..bb15e711c 100644 --- a/Nodejs/Prerequisites/DisableSkipVerificationX86.reg +++ b/Nodejs/Prerequisites/DisableSkipVerificationX86.reg @@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00 [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] diff --git a/Nodejs/Prerequisites/EnableSkipVerification.reg b/Nodejs/Prerequisites/EnableSkipVerification.reg index 12e6a3409..154793904 100644 --- a/Nodejs/Prerequisites/EnableSkipVerification.reg +++ b/Nodejs/Prerequisites/EnableSkipVerification.reg @@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] @@ -42,6 +44,8 @@ Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] diff --git a/Nodejs/Prerequisites/EnableSkipVerificationX86.reg b/Nodejs/Prerequisites/EnableSkipVerificationX86.reg index addfe82eb..d7ec752f4 100644 --- a/Nodejs/Prerequisites/EnableSkipVerificationX86.reg +++ b/Nodejs/Prerequisites/EnableSkipVerificationX86.reg @@ -7,6 +7,8 @@ Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.AjaxMin,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Analysis,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction,B03F5F7F11D50A3A] +[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InstallerTelemetryAction.CA,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.InteractiveWindow,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.NodeLogConverter,B03F5F7F11D50A3A] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\StrongName\Verification\Microsoft.NodejsTools.Npm,B03F5F7F11D50A3A] diff --git a/Nodejs/Prerequisites/generate.js b/Nodejs/Prerequisites/generate.js index a795051cc..c9dd7d1e4 100644 --- a/Nodejs/Prerequisites/generate.js +++ b/Nodejs/Prerequisites/generate.js @@ -42,6 +42,9 @@ var assemblies = [ 'Microsoft.NodejsTools.Telemetry.11.0', 'Microsoft.NodejsTools.Telemetry.12.0', 'Microsoft.NodejsTools.Telemetry.14.0' + 'Microsoft.NodejsTools.InstallerTelemetryAction.CA', + 'Microsoft.NodejsTools.InstallerTelemetryAction', + 'Microsoft.NodejsTools.VsLogger' ].sort(); var files = [ diff --git a/Nodejs/Setup/BuildRelease.ps1 b/Nodejs/Setup/BuildRelease.ps1 index 521701460..b936ddeea 100644 --- a/Nodejs/Setup/BuildRelease.ps1 +++ b/Nodejs/Setup/BuildRelease.ps1 @@ -242,9 +242,9 @@ $managed_files = ( "Microsoft.NodejsTools.Telemetry.11.0.dll", "Microsoft.NodejsTools.Telemetry.12.0.dll", "Microsoft.NodejsTools.Telemetry.14.0.dll" - "Microsoft.NodejsTools.VsLogger.dll", - "Microsoft.NodejsTools.InstallerTelemetryAction.CA", - "Microsoft.NodejsTools.InstallerTelemetryAction" + "Microsoft.NodejsTools.InstallerTelemetryAction.CA.dll", + "Microsoft.NodejsTools.InstallerTelemetryAction.dll", + "Microsoft.NodejsTools.VsLogger.dll" ) $native_files = @() diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index bbe9ce308..a70fed297 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -26,86 +26,55 @@ namespace Microsoft.NodejsTools { - public class InstallerTelemetryActions - { - private static string AIVersion = "2"; - [CustomAction] - public static ActionResult RecordInstallStartTime(Session session) - { - session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallSuccessResult(Session session) - { + public class InstallerTelemetryActions { + private static void LogInstallStatus(string InstallStatus,Session session) { TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - session.Log("Begin Telemetry Log"); bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; + string currentState = null; + string requestState = null; - FeatureInfoCollection fc = session.Features; - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); + FeatureInfoCollection featureInfoCollection = session.Features; + foreach (FeatureInfo featureInfo in featureInfoCollection) { + currentState = featureInfo.CurrentState.ToString(); + requestState = featureInfo.RequestState.ToString(); // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - break; + break; } - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { + Dictionary data = new Dictionary() { { "iKey", "377a3718-78a7-49df-abcc-1001317db729" - }, - { + }, { "name", "Microsoft.ApplicationInsights.Event" - }, - { + }, { "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) - }, - { - "data", new Dictionary < string, object > () - { + }, { + "data", new Dictionary () { { "baseType", "EventData" - }, - { - "baseData", new Dictionary < string, object > () - { - { - "ver", AIVersion - }, + }, { + "baseData", new Dictionary () { { + "ver", "2" + }, { "name", "NtvsInstallerTelemetry" - }, - { - "properties", new Dictionary < string, string > () - { - { - "InstallStatus", "Success" - }, + }, { + "properties", new Dictionary () { { + "InstallStatus", InstallStatus + }, { "IsNtvsInstalled", isInstalled.ToString() - }, - { + }, { "CurrentState", currentState - }, - { + }, { "RequestState", requestState - }, - { + }, { "NtvsVersion", session["NtvsVersion"] - }, - { + }, { "VSVersion", session["VSVersion"] - }, - { + }, { "MsiVersion", session["MsiVersion"] - }, - { + }, { "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) } } @@ -115,197 +84,39 @@ public static ActionResult LogInstallSuccessResult(Session session) } } }; - string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) - { + using (WebClient client = new WebClient()) { string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); session.Log(response); } + } + + [CustomAction] + public static ActionResult RecordInstallStartTime(Session session) { + session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallSuccessResult(Session session) { + session.Log("Begin Telemetry Log"); + LogInstallStatus("Success", session); session.Log("End Telemetry Log"); return ActionResult.Success; } [CustomAction] - public static ActionResult LogInstallErrorResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - + public static ActionResult LogInstallErrorResult(Session session) { session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - session.Log("Is Aready Installed: " + session.EvaluateCondition("Installed").ToString()); - - FeatureInfoCollection fc = session.Features; - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - break; - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { - "iKey", "377a3718-78a7-49df-abcc-1001317db729" - }, - { - "name", "Microsoft.ApplicationInsights.Event" - }, - { - "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) - }, - { - "data", new Dictionary < string, object > () - { - { - "baseType", "EventData" - }, - { - "baseData", new Dictionary < string, object > () - { - { - "ver", AIVersion - }, - { - "name", "NtvsInstallerTelemetry" - }, - { - "properties", new Dictionary < string, string > () - { - { - "InstallStatus", "Error" - }, - { - "IsNtvsInstalled", isInstalled.ToString() - }, - { - "CurrentState", currentState - }, - { - "RequestState", requestState - }, - { - "NtvsVersion", session["NtvsVersion"] - }, - { - "VSVersion", session["VSVersion"] - }, - { - "MsiVersion", session["MsiVersion"] - }, - { - "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) - } - } - } - } - } - } - } - }; - - string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } + LogInstallStatus("Error", session); session.Log("End Telemetry Log"); return ActionResult.Success; } [CustomAction] - public static ActionResult LogInstallCancelResult(Session session) - { - TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); - string AIVersion = "2"; - + public static ActionResult LogInstallCancelResult(Session session) { session.Log("Begin Telemetry Log"); - bool isInstalled = session.EvaluateCondition("Installed"); - string currentState = ""; - string requestState = ""; - FeatureInfoCollection fc = session.Features; - - foreach (FeatureInfo f in fc) - { - currentState = f.CurrentState.ToString(); - requestState = f.RequestState.ToString(); - // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. - break; - } - - session.Log("Starting POST"); - Dictionary data = new Dictionary() - { - { - "iKey", "377a3718-78a7-49df-abcc-1001317db729" - }, - { - "name", "Microsoft.ApplicationInsights.Event" - }, - { - "time", DateTime.Now.ToUniversalTime().ToString(CultureInfo.InvariantCulture) - }, - { - "data", new Dictionary < string, object > () - { - { - "baseType", "EventData" - }, - { - "baseData", new Dictionary < string, object > () - { - { - "ver", AIVersion - }, - { - "name", "NtvsInstallerTelemetry" - }, - { - "properties", new Dictionary < string, string > () - { - { - "InstallStatus", "Cancel" - }, - { - "IsNtvsInstalled", isInstalled.ToString() - }, - { - "CurrentState", currentState - }, - { - "RequestState", requestState - }, - { - "NtvsVersion", session["NtvsVersion"] - }, - { - "VSVersion", session["VSVersion"] - }, - { - "MsiVersion", session["MsiVersion"] - }, - { - "TimeTakenInSeconds", installTime.TotalSeconds.ToString(CultureInfo.InvariantCulture) - } - } - } - } - } - } - } - }; - string jsonString = (new JavaScriptSerializer()).Serialize(data); - - using (WebClient client = new WebClient()) - { - string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); - session.Log(response); - } + LogInstallStatus("Cancel", session); session.Log("End Telemetry Log"); return ActionResult.Success; } diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index 49d7ac0c9..b6b506c2a 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -142,7 +142,7 @@ - + InstallerTelemetryAction {775e686d-c646-4dab-9dcf-d2c37ff8ea78} diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 6ff3e7326..3d5707d09 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -19,7 +19,7 @@ - + From 135fca07086bcce41e9820fec5230964d84a1380 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Tue, 25 Aug 2015 17:30:07 -0700 Subject: [PATCH 24/31] Added final feedback --- .../InstallerTelemetryAction/InstallerTelemetryAction.cs | 8 ++++---- .../InstallerTelemetryAction.csproj | 5 +++-- .../NodejsToolsInstaller/NodejsToolsInstaller.wixproj | 4 ++++ .../Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs | 4 ++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index a70fed297..71982a6c7 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -24,7 +24,7 @@ using System.Web.Script.Serialization; using System.Globalization; -namespace Microsoft.NodejsTools +namespace Microsoft.NodejsTools.Telemetry { public class InstallerTelemetryActions { private static void LogInstallStatus(string InstallStatus,Session session) { @@ -35,8 +35,8 @@ private static void LogInstallStatus(string InstallStatus,Session session) { FeatureInfoCollection featureInfoCollection = session.Features; foreach (FeatureInfo featureInfo in featureInfoCollection) { - currentState = featureInfo.CurrentState.ToString(); - requestState = featureInfo.RequestState.ToString(); + currentState = featureInfo.CurrentState.ToString("F"); + requestState = featureInfo.RequestState.ToString("F"); // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. break; } @@ -63,7 +63,7 @@ private static void LogInstallStatus(string InstallStatus,Session session) { { "InstallStatus", InstallStatus }, { - "IsNtvsInstalled", isInstalled.ToString() + "IsNtvsInstalled", isInstalled.ToString(CultureInfo.InvariantCulture) }, { "CurrentState", currentState }, { diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index 7bd136c6f..b8204af05 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -41,7 +41,7 @@ {775E686D-C646-4DAB-9DCF-D2C37FF8EA78} Library Properties - Microsoft.NodejsTools + Microsoft.NodejsTools.Telemetry Microsoft.NodejsTools.InstallerTelemetryAction @@ -63,5 +63,6 @@ - + + \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index b6b506c2a..b0eb54031 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -102,6 +102,10 @@ $(DefineConstants); IncludeVsLogger=$(IncludeVsLogger) + + $(DefineConstants); + ReleaseBuild=$(ReleaseBuild) + $(DefineConstants); IncludeVWDExpress=12.0.30219.0; diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index 6b7fe8966..69be7ea48 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -144,6 +144,7 @@ + @@ -151,6 +152,7 @@ + @@ -158,10 +160,12 @@ NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH + + From 8d23423e8547a2519a2329f0d2388151c2823a88 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Tue, 25 Aug 2015 17:57:07 -0700 Subject: [PATCH 25/31] using default wix targets --- .../InstallerTelemetryAction/InstallerTelemetryAction.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index b8204af05..eeb766238 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -63,6 +63,5 @@ - - + \ No newline at end of file From 7974ad45c76b5434a3b07f224164d55d1ad7118d Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 05:52:20 -0700 Subject: [PATCH 26/31] Adding build.targets --- Build/Common.Build.targets | 2 +- .../InstallerTelemetryAction.csproj | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Build/Common.Build.targets b/Build/Common.Build.targets index bb5c8a01d..32198d9fa 100644 --- a/Build/Common.Build.targets +++ b/Build/Common.Build.targets @@ -133,7 +133,7 @@ Condition="'$(CopyOutputsToPath)' != '' and $(MSBuildProjectExtension) != '.wixproj' and Exists($(TargetPath))"> $(CopyOutputsToPath)\ - + diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index eeb766238..c49ffabb1 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -60,8 +60,11 @@ - - + + + + + \ No newline at end of file From 0a848ce34f36697619507a06d24381ec9f62adb6 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 12:13:07 -0700 Subject: [PATCH 27/31] Reverting build.targets changes as my dlls are projects and not dlls so should be signed automatically --- Build/Common.Build.targets | 1 - .../InstallerTelemetryAction/InstallerTelemetryAction.csproj | 3 --- 2 files changed, 4 deletions(-) diff --git a/Build/Common.Build.targets b/Build/Common.Build.targets index 32198d9fa..2b18cd261 100644 --- a/Build/Common.Build.targets +++ b/Build/Common.Build.targets @@ -144,7 +144,6 @@ - diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index c49ffabb1..d20de5917 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -62,9 +62,6 @@ - - - \ No newline at end of file From 8d883183d314352d17bd6a1ff7537e0f6555d959 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 13:46:09 -0700 Subject: [PATCH 28/31] Adding feedback from CR --- .../InstallerTelemetryAction.cs | 69 ++++++++++--------- .../NodejsToolsInstaller.wixproj | 2 +- .../NodejsToolsInstaller.wxs | 4 +- Nodejs/Setup/setup.proj | 4 +- 4 files changed, 42 insertions(+), 37 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index 71982a6c7..cb4a407c1 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -27,14 +27,47 @@ namespace Microsoft.NodejsTools.Telemetry { public class InstallerTelemetryActions { - private static void LogInstallStatus(string InstallStatus,Session session) { + + [CustomAction] + public static ActionResult RecordInstallStartTime(Session session) { + session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallSuccessResult(Session session) { + session.Log("Begin Telemetry Log"); + LogInstallStatus("Success", session); + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallErrorResult(Session session) { + session.Log("Begin Telemetry Log"); + LogInstallStatus("Error", session); + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + [CustomAction] + public static ActionResult LogInstallCancelResult(Session session) { + session.Log("Begin Telemetry Log"); + LogInstallStatus("Cancel", session); + session.Log("End Telemetry Log"); + return ActionResult.Success; + } + + private static void LogInstallStatus(string InstallStatus, Session session) + { TimeSpan installTime = DateTime.Now - DateTime.Parse(session["InstallStartTime"]); bool isInstalled = session.EvaluateCondition("Installed"); string currentState = null; string requestState = null; FeatureInfoCollection featureInfoCollection = session.Features; - foreach (FeatureInfo featureInfo in featureInfoCollection) { + foreach (FeatureInfo featureInfo in featureInfoCollection) + { currentState = featureInfo.CurrentState.ToString("F"); requestState = featureInfo.RequestState.ToString("F"); // we just want the current and requested state of A feature to understand if its a new user, upgrade, reinstall or remove. @@ -85,40 +118,12 @@ private static void LogInstallStatus(string InstallStatus,Session session) { } }; string jsonString = (new JavaScriptSerializer()).Serialize(data); - using (WebClient client = new WebClient()) { + using (WebClient client = new WebClient()) + { string response = client.UploadString("https://dc.services.visualstudio.com/v2/track", jsonString); session.Log(response); } } - [CustomAction] - public static ActionResult RecordInstallStartTime(Session session) { - session["InstallStartTime"] = DateTime.Now.ToString(CultureInfo.InvariantCulture); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallSuccessResult(Session session) { - session.Log("Begin Telemetry Log"); - LogInstallStatus("Success", session); - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallErrorResult(Session session) { - session.Log("Begin Telemetry Log"); - LogInstallStatus("Error", session); - session.Log("End Telemetry Log"); - return ActionResult.Success; - } - - [CustomAction] - public static ActionResult LogInstallCancelResult(Session session) { - session.Log("Begin Telemetry Log"); - LogInstallStatus("Cancel", session); - session.Log("End Telemetry Log"); - return ActionResult.Success; - } } } \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index b0eb54031..662fde55e 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -146,7 +146,7 @@ - + InstallerTelemetryAction {775e686d-c646-4dab-9dcf-d2c37ff8ea78} diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index 69be7ea48..21405b0c4 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -144,7 +144,7 @@ - + @@ -160,7 +160,7 @@ NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH - + diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 3d5707d09..949d25bf3 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -18,8 +18,8 @@ - - + + From 7f6c793b15820e4ef2abca93a49ae864984b6121 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 16:20:01 -0700 Subject: [PATCH 29/31] Using Checked in wix.ca.targets --- .../InstallerTelemetryAction/InstallerTelemetryAction.cs | 6 +++--- .../InstallerTelemetryAction.csproj | 3 ++- Nodejs/Setup/setup.proj | 1 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs index cb4a407c1..953ff5a79 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.cs @@ -16,13 +16,13 @@ using System; using System.Collections.Generic; -using System.Text; -using Microsoft.Deployment.WindowsInstaller; +using System.Collections.Specialized; using System.Diagnostics; using System.Net; -using System.Collections.Specialized; +using System.Text; using System.Web.Script.Serialization; using System.Globalization; +using Microsoft.Deployment.WindowsInstaller; namespace Microsoft.NodejsTools.Telemetry { diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index d20de5917..c66937562 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -62,6 +62,7 @@ + + - \ No newline at end of file diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 949d25bf3..51a20d6dd 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -23,6 +23,5 @@ - From 3003c200d8a0ca30eed09d733e3be2d5063bdaa4 Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Wed, 26 Aug 2015 22:58:47 -0700 Subject: [PATCH 30/31] Fixing releasebuild variable and adding csharp target to build .ca.dll file --- .../InstallerTelemetryAction.csproj | 11 ++++++----- .../NodejsToolsInstaller/NodejsToolsInstaller.wixproj | 2 +- .../NodejsToolsInstaller/NodejsToolsInstaller.wxs | 10 ++++++---- Nodejs/Setup/setup.proj | 6 +++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj index c66937562..d7254662b 100644 --- a/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj +++ b/Nodejs/Setup/InstallerTelemetryAction/InstallerTelemetryAction.csproj @@ -1,6 +1,6 @@  - + 14.0 @@ -43,6 +43,7 @@ Properties Microsoft.NodejsTools.Telemetry Microsoft.NodejsTools.InstallerTelemetryAction + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets AnyCPU @@ -60,9 +61,9 @@ - + - - - + + + \ No newline at end of file diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index 662fde55e..ab0749a7e 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -146,7 +146,7 @@ - + InstallerTelemetryAction {775e686d-c646-4dab-9dcf-d2c37ff8ea78} diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs index 21405b0c4..397075419 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wxs @@ -144,15 +144,17 @@ - + + - + + - + @@ -160,7 +162,7 @@ NOT SKIP_DEVENV_SETUP AND DEVENV_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH NOT SKIP_DEVENV_SETUP AND VWDEXPRESS_PATH - + diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 51a20d6dd..6f509177b 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -18,10 +18,10 @@ - - + + - + From 7ea8a49cf6b3e5fc914b790efe8c08c92dc8730e Mon Sep 17 00:00:00 2001 From: sanyamc-msft Date: Thu, 27 Aug 2015 14:40:28 -0700 Subject: [PATCH 31/31] Updating with latest changes from master --- Nodejs/Prerequisites/generate.js | 5 +- Nodejs/Setup/BuildRelease.ps1 | 5 +- .../NodejsToolsInstaller.wixproj | 97 +------------------ Nodejs/Setup/setup.proj | 1 - 4 files changed, 5 insertions(+), 103 deletions(-) diff --git a/Nodejs/Prerequisites/generate.js b/Nodejs/Prerequisites/generate.js index c9dd7d1e4..5cc7edb40 100644 --- a/Nodejs/Prerequisites/generate.js +++ b/Nodejs/Prerequisites/generate.js @@ -41,10 +41,9 @@ var assemblies = [ 'Microsoft.NodejsTools.PressAnyKey', 'Microsoft.NodejsTools.Telemetry.11.0', 'Microsoft.NodejsTools.Telemetry.12.0', - 'Microsoft.NodejsTools.Telemetry.14.0' + 'Microsoft.NodejsTools.Telemetry.14.0', 'Microsoft.NodejsTools.InstallerTelemetryAction.CA', - 'Microsoft.NodejsTools.InstallerTelemetryAction', - 'Microsoft.NodejsTools.VsLogger' + 'Microsoft.NodejsTools.InstallerTelemetryAction' ].sort(); var files = [ diff --git a/Nodejs/Setup/BuildRelease.ps1 b/Nodejs/Setup/BuildRelease.ps1 index b936ddeea..5843780cf 100644 --- a/Nodejs/Setup/BuildRelease.ps1 +++ b/Nodejs/Setup/BuildRelease.ps1 @@ -241,10 +241,9 @@ $managed_files = ( "Microsoft.NodejsTools.PressAnyKey.exe", "Microsoft.NodejsTools.Telemetry.11.0.dll", "Microsoft.NodejsTools.Telemetry.12.0.dll", - "Microsoft.NodejsTools.Telemetry.14.0.dll" + "Microsoft.NodejsTools.Telemetry.14.0.dll", "Microsoft.NodejsTools.InstallerTelemetryAction.CA.dll", - "Microsoft.NodejsTools.InstallerTelemetryAction.dll", - "Microsoft.NodejsTools.VsLogger.dll" + "Microsoft.NodejsTools.InstallerTelemetryAction.dll" ) $native_files = @() diff --git a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj index ab0749a7e..1001d2c43 100644 --- a/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj +++ b/Nodejs/Setup/NodejsToolsInstaller/NodejsToolsInstaller.wixproj @@ -1,89 +1,3 @@ -<<<<<<< HEAD - - - - - 3.5 - {DEE349D0-5AE5-4B6F-9720-785240AF3118} - 2.0 - NodejsToolsInstaller - Package - false - SAK - SAK - SAK - SAK - - $(DefineConstants); - IncludeVWDExpress=12.0.30219.0; - - - $(DefineConstants); - IncludeVWDExpress=14.0.0.0; - - - - - WixUIExtension - WixUIExtension - - - WixUtilExtension - WixUtilExtension - - - WixDependencyExtension - WixDependencyExtension - - - WixNetFxExtension - WixNetFxExtension - - - - - - CommonLaunchConditions.wxs - - - - - - - - - - - Custom_Action - {775e686d-c646-4dab-9dcf-d2c37ff8ea78} - - - InteractiveWindow - {C0D64130-C0E9-4CAB-99BC-68F62357F010} - - - NodejsTools - {48D35916-497E-43A4-88A7-A829B7BF0EF1} - - - NodejsProfiler - {C7D3FCEB-47DA-4539-8D20-6B9047BAC3F7} - - - - - - - - - - - - - - - -=======  @@ -98,10 +12,6 @@ SAK SAK SAK - - $(DefineConstants); - IncludeVsLogger=$(IncludeVsLogger) - $(DefineConstants); ReleaseBuild=$(ReleaseBuild) @@ -162,10 +72,6 @@ NodejsProfiler {C7D3FCEB-47DA-4539-8D20-6B9047BAC3F7} - - VsLoggerMsm - {639BFC80-B31B-4D3F-9DF3-A65913000B4B} - @@ -179,6 +85,5 @@ - ->>>>>>> InstallerTelemetry2 + \ No newline at end of file diff --git a/Nodejs/Setup/setup.proj b/Nodejs/Setup/setup.proj index 6f509177b..204fcc0aa 100644 --- a/Nodejs/Setup/setup.proj +++ b/Nodejs/Setup/setup.proj @@ -18,7 +18,6 @@ -