I am pretty new in .NET\C# (I came from Java) and I have the following doubt.
In my solution I have a project that should be a SharePoint job, something like this in my solution explorer:
I know that this project is deployed as a SharePoint job and it works fine.
Now I have the need to manually perform a specific operation that is in some way related to this job. So my idea was to create this MigrateAttachments class into this project and put a Main() method here, then perform only this class as a script:
namespace XXXMigrationJob
{
class MigrateAttachments
{
static void Main(string[] args)
{
Debug.Print("MigrateAttachments Main() START");
Debug.Print("MigrateAttachments Main() END");
}
}
}
But it seems to me that I can't perform this Main() method as a standalone method and that the only way to do it is to create a brand new Console Application project that will contain this class.
is it true or am I missing something and I can manually run this MigrateAttachements Main() method also into my XXXMigrationJob project?