Using VS2012, latest SP/update applied.
I have been very frustrated trying to get an ObjectDataSource to work. See http://bit.ly/XTpdvN and http://bit.ly/XTpsHi.
I started a new Web Application project, compiling and running after each step, trying to make the steps as granular as possible.
1) Create new empty web application.
2) Add WebForm1.aspx.
3) Clean, rebuild, run (either View in Browser or in debugger).
4) Add new class to App_Code.
5) Repeat #3.
5) Add existing .mdf to App_Data.
6) Repeat #3.
7) Add Linq-to-Sql class to App_Code (Items.dbml). Leave it empty.
8) Clean, Rebuild, run in Debugger:
Compiler Error Message: CS0234: The type or namespace name 'Linq' does not exist in the namespace 'System.Data' (are you missing an assembly reference?)
Source Error:Line 12: namespace ODS_Restart.App_Code Line 13: { Line 14: using System.Data.Linq; Line 15: using System.Data.Linq.Mapping; Line 16: using System.Data;
As far as I can tell, there is nothing in the code in App_Code that needs Linq:
namespace ODS_Restart.App_Code
{
public class BAL
{
public static List<string> GetCountries()
{
return new List<string>() { "USA", "Aus", "NZ"};
}
}
}
As I said, very frustrating. Any insight on how to get past this problem would be greatly apprectiated....