Author: mhutch
Date: 2007-09-28 11:55:35 -0400 (Fri, 28 Sep 2007)
New Revision: 86588
Modified:
trunk/monodevelop/Extras/AspNetAddIn/ChangeLog
trunk/monodevelop/Extras/AspNetAddIn/Project/AspNetAppProject.cs
Log:
* Project/AspNetAppProject.cs: Check for xsp before running it.
Modified: trunk/monodevelop/Extras/AspNetAddIn/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/AspNetAddIn/ChangeLog 2007-09-28 15:54:40 UTC
(rev 86587)
+++ trunk/monodevelop/Extras/AspNetAddIn/ChangeLog 2007-09-28 15:55:35 UTC
(rev 86588)
@@ -1,5 +1,9 @@
2007-09-28 Michael Hutchinson <[EMAIL PROTECTED]>
+ * Project/AspNetAppProject.cs: Check for xsp before running it.
+
+2007-09-28 Michael Hutchinson <[EMAIL PROTECTED]>
+
* Deployment/WebTargetEditor.cs, Deployment/WebDeployService.cs,
Deployment/WebDeployCommands.cs, Deployment/WebDeployResolver.cs,
Deployment/WebDeployTargetCollection.cs,
Deployment/WebDeployTarget.cs,
Modified: trunk/monodevelop/Extras/AspNetAddIn/Project/AspNetAppProject.cs
===================================================================
--- trunk/monodevelop/Extras/AspNetAddIn/Project/AspNetAppProject.cs
2007-09-28 15:54:40 UTC (rev 86587)
+++ trunk/monodevelop/Extras/AspNetAddIn/Project/AspNetAppProject.cs
2007-09-28 15:55:35 UTC (rev 86588)
@@ -183,6 +183,17 @@
#region build/prebuild/execute
+ static bool CheckXsp (string command)
+ {
+ try {
+ ProcessWrapper p =
Runtime.ProcessService.StartProcess (command, "--version", null, null);
+ p.WaitForOutput ();
+ return true;
+ } catch {
+ return false;
+ }
+ }
+
IProcessAsyncOperation StartXsp (IProgressMonitor monitor,
ExecutionContext context, IConsole console)
{
AspNetAppProjectConfiguration configuration =
(AspNetAppProjectConfiguration) ActiveConfiguration;
@@ -212,6 +223,14 @@
protected override void DoExecute (IProgressMonitor monitor,
ExecutionContext context)
{
+ //check XSP is available
+ ClrVersion clrVersion =
((AspNetAppProjectConfiguration) ActiveConfiguration).ClrVersion;
+ string xspVersion = (clrVersion == ClrVersion.Net_1_1)?
"xsp" : "xsp2";
+ if (!CheckXsp (xspVersion)) {
+ monitor.ReportError (string.Format ("The
\"{0}\" web server cannot be started. Please ensure that it is
installed.",xspVersion), null);
+ return;
+ }
+
CopyReferencesToOutputPath (true);
IConsole console = null;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches