Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlProgrammabilityProvider doesn't refresh cache even after cleaning/rebuilding solution. #342

Closed
willnationsdev opened this issue May 25, 2019 · 1 comment

Comments

@willnationsdev
Copy link

willnationsdev commented May 25, 2019

Description

According to #138, in this comment, cleaning and/or rebuilding the solution fixes the cache-not-updating issue. This does not work for me.

If I define a new stored procedure in the same database, and then clean/rebuild, the Intellisense does not find the updated database's newly added stored procedure in the SqlProgrammabilityProvider, even if I try modifying my web.config file's connection string and back or modifying the code to make it break and then changing it back.

Repro steps

Please provide the steps required to reproduce the problem

  1. Create a stored procedure to fetch some data.

  2. Create a project that uses SqlProgrammabilityProvider to access that stored procedure.

  3. Create a new stored procedure to fetch different data from the same table.

  4. Clean and rebuild the solution.

  5. Observe that the Intellisense does not update to allow you to switch to the new stored procedure. Compilation fails with error...

    FS0039 "The type <\identifier> is not defined. Maybe you want one of the following: ..."

...when attempting to reference the stored procedure name in <typename>.dbo.<identifier> type associated with the stored procedure (because it does not recognize the identifier).

Expected behavior

There is an expected workflow to update autocompletion/compilation options to recognize new stored procedures when they are defined. Be it auto-updating or cleaning/rebuilding the project/solution to refresh the cache.

Actual behavior

No such cache-refreshes are occurring.

Known workarounds

Could potentially use the SqlCommandProvider to execute the stored procedures, but that doesn't bring with it the same kind of intellisense support which is the whole reason we started using the SqlProgrammabilityProvider in the first place. Our team exclusively uses stored procedures to interact with our database.

Related information

  • Windows 10
  • Whatever the stable release currently on nuget is (version 2.0.2)
  • SQL Server 13.0.5081.1, a production database at my work
  • .NET Framework 4.5.2
  • Visual Studio 2017 Community Edition
@willnationsdev
Copy link
Author

Nevermind, it was just my own brainfart. Forgot to grant execute on the stored procedures and thought I already had, so, naturally, it didn't show up as an executable behavior in the SqlProgrammabilityProvider. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant