0

I am facing a specific issue with VS2019 v16.11.1 and EF v6.4.4 where when I try to add a new Stored procedure in my edmx file, it shows successfully added, but in actual, the stored procedure is not added on edmx file.

This approach has been working for years and I started facing this issue from last 1 week or so (most probably i upgraded VS 2019 after that).

Any other developers facing this issue and any workarounds?

There is a reported issue in VS community as here

Nitesh
  • 2,286
  • 2
  • 43
  • 65
  • Please try the method in this thread and check if it works:https://stackoverflow.com/questions/18038405/stored-procedures-and-updating-edmx – DanielZhang-MSFT Aug 24 '21 at 08:25
  • @DanielZhang-MSFT I do not want to manually edit the XML as it will get overwritten every time the edmx file is updated. Also, have already tried other methodologies, nothing worked – Nitesh Aug 24 '21 at 08:56
  • 1
    It may be caused by Visual Studio 2019, you can try right-clicking on the .tt file in the solution and "Run Custom Tool". Or use Visual Studio 2017 to check if there is still a problem. Please see:https://github.com/dotnet/ef6/issues/705 – DanielZhang-MSFT Aug 25 '21 at 05:29
  • Thanks, "Run Custom Tool" didnt work. Have downgraded VS for now. Will upgrade in future when newer version comes. – Nitesh Aug 25 '21 at 05:33
  • After downgrading VS, does the problem still exist? – DanielZhang-MSFT Aug 26 '21 at 02:45
  • 1
    Nopes, its resolved. – Nitesh Aug 26 '21 at 06:02
  • I have made an answer and if you don't mind, you could accept it as an answer. It will also help others to solve the simliar problem. – DanielZhang-MSFT Aug 26 '21 at 06:25

1 Answers1

2

Based on the answer for the comment, the reason is that VS 2019 is currently unable to let us update our EDMX file.

And the solution is that downgrading VS or wait for it to be fixed in the new version of VS.

  • Upgrading to v16.11.2 fixes the problem. @Daniel, if you can pls update your answer, it would be great. – Nitesh Sep 11 '21 at 03:41