?
Solved

Error in Build of c# .net site

Posted on 2013-10-23
2
Medium Priority
?
268 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

Technology Partners: 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…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

771 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