Friday, August 31, 2012

SharePoint runs in ASP.NET 3.5

The last two using statements in my console app (below) where red (angry) in Visual Studio until I right-clicked on the project and set it to be of ASP.NET 3.5.

using System.Configuration;
using System;
using System.Collections.Generic;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Linq;
namespace SharePoint.FSC.AOPC.ConsoleApplication
{
   public class Program
   {
      public static string siteUrl =
            ConfigurationManager.AppSettings["http://fscee42471-2/"];
      public static string subsiteUrl =
            siteUrl + ConfigurationManager.AppSettings["AOPCPortal/"];
      
      static void Main(string[] args)
      {
         Console.WriteLine("SPMetal Console Application");
         Console.WriteLine("Press any key to create dummy data for the Application");
         Console.ReadLine();
         Console.WriteLine("Creating Items...");
         Console.WriteLine("Finished...");
         Console.WriteLine("Press any key to exit.");
         Console.ReadLine();
      }
   }
}

No comments:

Post a Comment