Share via

can not execute the script because the script entry point is invalid

Nishan Ratna 150 Reputation points
2023-04-05T14:05:29.8933333+00:00

Hi All, I use the following code in script task in SSIS. This is the first part of the code, When I run this, I get the following error. "cannot execute the script because the script entry point is invalid. " When I hover over args, I can see the following message. "remove unused parameter args"

can anyone tell me how to fix this please. Thanks

#region Namespaces
using System;
using System.Data.SqlClient;
using System.Data;
using Microsoft.SqlServer.Dts.Runtime;
using System.Windows.Forms;
#endregion

namespace ST_3e2bfb6c1ba34b5da9eb15151ce3da7a
{
    /// <summary>
    /// ScriptMain is the entry point class of the script.  Do not change the name, attributes,
    /// or parent of this class.
    /// </summary>
	[Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]
	public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
	{
        
        static void Main(string[] args)
        {
SQL Server Integration Services
0 comments No comments

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 23,605 Reputation points
    2023-07-27T21:51:30.6966667+00:00

    If the args parameter is not used in your script; you can safely remove it from the method signature:

    static void Main()

    {

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.