Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

To give some background, I am an ASP.net developer tasked with creating a calender event notification system with a lot of features beyond the out of the box calender. My application would read a list of SPList items, and send an email depending on some business criteria. So far, I was able to connect to the SharePoint and run all of my needed tasks using a console application.

My next step is to automate the process to run application daily and that is where I am stuck trying to convert this console application to an automated SharePoint feature (if I am using my terminology correctly).

I tried following tutorials (This is the one I am following now) but I am having problems with the deployment part as I never done this before. I can not seem to find any tutorials describing the deployment process. So far, my application just adds a new item to the list.

public override void Execute(Guid contentDbId)
    {
        // get a reference to the current site collection's content database
        SPWebApplication webApplication = this.Parent as SPWebApplication;
        SPContentDatabase contentDb = webApplication.ContentDatabases[contentDbId];

        // get a reference to the "Tasks" list in the RootWeb of the first site collection in the content database
        SPList taskList = contentDb.Sites[0].RootWeb.Lists["Tasks"];

        // create a new task, set the Title to the current day/time, and update the item
        SPListItem newTask = taskList.Items.Add();
        newTask["Title"] = DateTime.Now.ToString();
        newTask.Update();
    }

I am using VS2007 and my sharepoint is 2007

Here are my questions: 1- How can I build a .dll to move to the GAC without having a static void Main(string[] args) in my class? Am I using a wrong project file? 2- Given that I got the .dll, how can I create a feature?

Any help (or terminology correction) would be appreciated. I feel like this should be an easy task for someone who knows what they are doing. I just need some direction on what to do.

share|improve this question
add comment

1 Answer 1

Ammar,

As you already have Console Application build up, I would suggest you to make a Scheduled Task on your SharePoint server to run your Console Application...

See how to Schedule a Task

However, you should get yourself WSPBuilder, this is very handy when working with MOSS or WSS!

And you can follow How to Create a Custom Timer Jobs in Windows SharePoint Services 3.0? to easily setup your Timer Job!

However, I was looking the link you are following... It seems like he has updated the article here and given much more detail...

I hope this helps!

share|improve this answer
    
Thanks. I don't think that is what my client wants it to be a scheduled task. But it is something to keep in mind in case we run into a worst case scenario. –  Ammar Ahmed Dec 7 '12 at 20:04
1  
I have updated the answer! –  Arsalan Adam Khatri Dec 7 '12 at 20:06
    
Thanks for your help. I will look into it and let you know how it goes. –  Ammar Ahmed Dec 7 '12 at 20:09
1  
Don't know... Can't create your scenario, don't have Development machine here! Try searching on WSPBuilder's project discussions... –  Arsalan Adam Khatri Dec 7 '12 at 21:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.