[mapguide-commits] r9993 - in trunk/Tools/MgInstantSetup: InstantSetup InstantSetup.Core
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Oct 24 04:24:45 PDT 2022
Author: jng
Date: 2022-10-24 04:24:44 -0700 (Mon, 24 Oct 2022)
New Revision: 9993
Modified:
trunk/Tools/MgInstantSetup/InstantSetup.Core/AppCmd.cs
trunk/Tools/MgInstantSetup/InstantSetup.Core/IISSetupConfigurationProcess.cs
trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.Designer.cs
trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.cs
Log:
#2852: Revert r9956. The necessary netstandard reference is already pre-written into the web.config that comes with mapviewernet, so this feature is no longer necessary.
Modified: trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.Designer.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.Designer.cs 2022-10-24 11:20:17 UTC (rev 9992)
+++ trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.Designer.cs 2022-10-24 11:24:44 UTC (rev 9993)
@@ -47,7 +47,6 @@
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.rdDotNet = new System.Windows.Forms.RadioButton();
this.rdPhp = new System.Windows.Forms.RadioButton();
- this.chkRefNetstandard = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numSitePort)).BeginInit();
@@ -271,27 +270,15 @@
this.rdPhp.UseVisualStyleBackColor = true;
this.rdPhp.CheckedChanged += new System.EventHandler(this.rdPhp_CheckedChanged);
//
- // chkRefNetstandard
- //
- this.chkRefNetstandard.AutoSize = true;
- this.chkRefNetstandard.Location = new System.Drawing.Point(12, 352);
- this.chkRefNetstandard.Name = "chkRefNetstandard";
- this.chkRefNetstandard.Size = new System.Drawing.Size(368, 17);
- this.chkRefNetstandard.TabIndex = 2;
- this.chkRefNetstandard.Text = "Add netstandard reference (needed for MGOS 4.0 Preview 4 and newer)";
- this.chkRefNetstandard.UseVisualStyleBackColor = true;
- this.chkRefNetstandard.CheckedChanged += new System.EventHandler(this.chkRefNetstandard_CheckedChanged);
- //
// IISConfigCtrl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.chkRefNetstandard);
this.Controls.Add(this.groupBox4);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "IISConfigCtrl";
- this.Size = new System.Drawing.Size(422, 383);
+ this.Size = new System.Drawing.Size(422, 358);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
@@ -302,7 +289,6 @@
this.groupBox4.ResumeLayout(false);
this.groupBox4.PerformLayout();
this.ResumeLayout(false);
- this.PerformLayout();
}
@@ -327,6 +313,5 @@
private System.Windows.Forms.RadioButton rdPhp;
private System.Windows.Forms.TextBox txtAppPool;
private System.Windows.Forms.Label label7;
- private System.Windows.Forms.CheckBox chkRefNetstandard;
}
}
Modified: trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.cs 2022-10-24 11:20:17 UTC (rev 9992)
+++ trunk/Tools/MgInstantSetup/InstantSetup/IISConfigCtrl.cs 2022-10-24 11:24:44 UTC (rev 9993)
@@ -47,9 +47,6 @@
rdDotNet.Checked = _confImpl.EnableDotNet;
rdPhp.Checked = _confImpl.EnablePhp;
-
- chkRefNetstandard.Enabled = rdDotNet.Checked;
- _confImpl.AddNetstandardReference = chkRefNetstandard.Checked;
}
public AbstractSetupConfigurationProcess Config
@@ -67,8 +64,6 @@
{
_confImpl.EnableDotNet = rdDotNet.Checked;
_confImpl.EnablePhp = rdPhp.Checked;
- chkRefNetstandard.Enabled = rdDotNet.Checked;
- _confImpl.AddNetstandardReference = chkRefNetstandard.Checked;
}
private void rdPhp_CheckedChanged(object sender, EventArgs e)
@@ -111,10 +106,5 @@
{
_confImpl.ApplicationPool = txtAppPool.Text;
}
-
- private void chkRefNetstandard_CheckedChanged(object sender, EventArgs e)
- {
- _confImpl.AddNetstandardReference = chkRefNetstandard.Checked;
- }
}
}
Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/AppCmd.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/AppCmd.cs 2022-10-24 11:20:17 UTC (rev 9992)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/AppCmd.cs 2022-10-24 11:24:44 UTC (rev 9993)
@@ -3,7 +3,6 @@
using System.Text;
using System.IO;
using System.Diagnostics;
-using System.Xml;
namespace InstantSetup.Core
{
@@ -200,9 +199,9 @@
return Process.Start(psi);
}
- internal void SetupCore(FormatLineWriter writer, bool b64BitMapGuide, bool referenceNetstandard)
+ internal void SetupCore(FormatLineWriter writer, bool b64BitMapGuide)
{
- writer($"Running a series of appcmd calls to set up IIS (64-bit: {b64BitMapGuide}, ref netstandard: {referenceNetstandard})");
+ writer($"Running a series of appcmd calls to set up IIS (64-bit: {b64BitMapGuide})");
Process p = null;
p = StartAppCmdProcess(writer, string.Format(CREATE_FASTCGI, _phpDir));
@@ -278,64 +277,6 @@
p = StartAppCmdProcess(writer, string.Format(SET_MAPVIEWERNET_REQ_VALIDATION_MODE, _webSite, _virtualDir));
Trace.TraceInformation(p.StandardOutput.ReadToEnd()); p.WaitForExit();
//if (p.ExitCode != 0) Debugger.Break();
-
- //HACK: I'm pretty sure there's a way to do this through appcmd, but I can't figure it out
- //so we'll add the necessary reference through XML document manipulation
- if (referenceNetstandard)
- {
- var webConfigPath = Path.Combine(this._webExtensionsRootDir, "www", "mapviewernet", "web.config");
- if (File.Exists(webConfigPath))
- {
- var webConfig = new XmlDocument();
- webConfig.Load(webConfigPath);
-
- bool bChanged = false;
-
- // We should have at least a configuration/system.web/compilation element already there
- var conf = webConfig.SelectSingleNode("//configuration/system.web/compilation");
- if (conf != null)
- {
- const string NETSTANDARD_REF = "netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51";
-
- XmlNode asmNode = null;
- if (conf["assemblies"] == null)
- {
- asmNode = webConfig.CreateElement("assemblies");
- conf.AppendChild(asmNode);
- bChanged = true;
- }
-
- var nsRefNode = asmNode.SelectSingleNode($"add[assembly='{NETSTANDARD_REF}']");
- if (nsRefNode == null)
- {
- nsRefNode = webConfig.CreateElement("add");
-
- var asmAttr = webConfig.CreateAttribute("assembly");
- asmAttr.Value = NETSTANDARD_REF;
-
- nsRefNode.Attributes.Append(asmAttr);
-
- asmNode.AppendChild(nsRefNode);
- bChanged = true;
- writer($"Added netstandard reference to web.config");
- }
-
- if (bChanged)
- {
- webConfig.Save(webConfigPath);
- writer($"web.config updated");
- }
- }
- else
- {
- writer($"ERROR: Could not find the expected configuration/system.web/compilation element in this web.config file!");
- }
- }
- else
- {
- writer($"WARNING: Expected to find ({webConfigPath}), but it could not be found!");
- }
- }
}
internal void SetDefaultDotNetViewer(FormatLineWriter writer)
Modified: trunk/Tools/MgInstantSetup/InstantSetup.Core/IISSetupConfigurationProcess.cs
===================================================================
--- trunk/Tools/MgInstantSetup/InstantSetup.Core/IISSetupConfigurationProcess.cs 2022-10-24 11:20:17 UTC (rev 9992)
+++ trunk/Tools/MgInstantSetup/InstantSetup.Core/IISSetupConfigurationProcess.cs 2022-10-24 11:24:44 UTC (rev 9993)
@@ -65,8 +65,6 @@
public bool Enable32BitAppsOnWin64 { get; set; }
- public bool AddNetstandardReference { get; set; }
-
protected override void DoBackupConfigFiles(FormatLineWriter writer)
{
@@ -85,7 +83,7 @@
protected override void ConfigureWebServer(FormatLineWriter writer)
{
var cmd = new AppCmd(this.AppCmdPath, this.WebSiteName, this.VirtualDirectoryName, this.ApplicationPool, this.WebTierRootDir, this.WebTierPhpDir);
- cmd.SetupCore(writer, this.Is64BitMapGuide, this.AddNetstandardReference);
+ cmd.SetupCore(writer, this.Is64BitMapGuide);
if (this.EnableDotNet)
cmd.SetDefaultDotNetViewer(writer);
else if (this.EnablePhp)
More information about the mapguide-commits
mailing list