Search code examples
c#sql.netvisual-studioedmx

Unable to add stored procedures to EDMX file in VS 2022


I am wondering if anyone can recommend a possible solution or something I have not tried to help me solve the following problem.

Issue:

I am unable to add stored procedures to a EDMX file using the designer.

Notes

I am able to run the procedures via SQL management studio.

The procedures I am adding do not contain any complex field types or logic they are a basic selects for example.

CREATE PROCEDURE [dbo].[pTestProc]
AS
BEGIN
--ID is a INT and ItemName is a String
SELECT Id,ItemName FROM dbo.Items
END

Odd things of note

I am able to add and modify table structures using the EDMX designer.

Things I have tried

  1. Closed and restarted machine.
  2. Closed and restarted VS.
  3. Run VS as administrator.
  4. Confirmed connection string to database is correct.
  5. Confirmed permissions are ok and I am able to run the procedures.
  6. Confirmed procedures work ok.
  7. Rollback VS to a older version (There was a recent update).

Solution

  • After trial and error the issue for myself turned out to be a issue with a trusted certificate. To correct this I removed the old connection string and then re-added it. Which solved the issue.