[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Error in Build of c# .net site

Posted on 2013-10-23
2
Medium Priority
?
269 Views
Last Modified: 2013-10-23
I am seeing an error in the build of my c# page. It seems to be happening on using system.diagnostics.
Error      12      'System.Diagnostics.ProcessStartInfo' does not contain a definition for 'Filename' and no extension method 'Filename' accepting a first argument of type 'System.Diagnostics.ProcessStartInfo' could be found (are you missing a using directive or an assembly reference?)      C:\Code\Temp\MaintApp\MaintApp\default.aspx.cs      38      32      MaintApp

I checked my references and in system I see ProcessStartInfo listed along with Filename. I am not sure where else to look here, I also did a check to make sure it is all using .net 4.0. Am not exactly what else to try.
Here is the default.aspx.cs code that is erroring on build.


using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MaintApp
{
    public partial class _default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)

        {
            Process proc = new Process();
            proc.StartInfo.Filename = null;
            proc.StartInfo.WorkingDirectory = @"c:\scripts";

            if (this.DropDownList1.SelectedValue == "Maint Window Start")
            {
                proc.StartInfo.Filename = @"C:\Scripts\StopSVCFinal.ps1";
            }
            else if (this.DropDownList1.SelectedValue == "Maint Window Complete")
            {
                proc.StartInfo.Filename = @"C:\Scripts\StartSVCFinal.ps1";
            }
            if (proc.StartInfo.Filename != null)
            {
                proc.Start();
            }


        }

   
   
    }
}
MaintappError.PNG
0
Comment
Question by:AjarnJonesy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 39594599
C# is case-sensitive. The property is called FileName (capital "N").
0
 

Author Closing Comment

by:AjarnJonesy
ID: 39594895
MOST EXCELLENT>> That was it.:)
thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question