I'm trying to add a new stored procedure to my Asp.Net website with Visual Studio 2008, the way I did some time ago, but this doesn't generate any code in the *.designer.cs and when I try to call the SP, I just get a undefined/not-found error.
Here is what I have done so far :
- make sure I have read/write access to
MyApp.dbml
,MyApp.dbml.layout
andMyApp.designer.css
- Open the DBML (in "graphic" mode)
- Refresh the list of SPs in the server explorer
- Drag and Drop the targeted SP onto the DBML
- Save it
- Build the website
The XML inside the DBML is created with the correct types for each column of the result, but absolutely nothing is created in the designer.cs.
- I checked, and no "new" designer.cs is created like it did for this person.
- I tried using "Run custom tool" (as suggested here) with and without deleting the MyApp.designer.cs, and it never did anything
Does anybody know were the problem might come from? Am I missing something?
Best Answer
As nothing else seemed to work, I used Pleun's idea, which worked like a charm:
MyApp.dbml
MyApp.designer.cs
(the method that calls the SP + the partial class with accessors for the result of the SP)In fact, I had to close and reopen VS for that to work completely.