You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I opened up a question on StackOverflow where I'm getting the MissingMethodException. I'm using MSTest build where I have an overload method to Create or Update some items in an MySQL Database where I need to include transactions. Given that MySQL does not do nested transactions, I had to do an overload of methods. Problem is, even before I do a unit test and trying to set up the Moq, I get MissingMethodException thrown; yet, when I run it using MySQL database to test it out, it works fine.
This is what I have:
`Mock _ProductRepositoryMoq = new Mock();
Now the first method with just a ProductExt parameter works fine in the Moq, but it's the second overloaded method that's giving me the MissingMethodException but as I stated, it is indeed working and I have verified through the database that data is being inserted and/or modified.
Something is telling me that there's a problem with Moq or I'm not setting this up correctly. How is it that it's working with the database, but not with a Moq?
Did I really find a bug, or am I doing a newbie mistake, and if so, where did I go wrong and how do I set it up correctly?
The text was updated successfully, but these errors were encountered:
I saw your question on Stack Overflow, and I commented there that the error you're seeing isn't reproducible with just the code shown.
Until you have ruled out some DLL versioning problem, there's no reason to assume that the problem lies with Moq.
What version of Moq does your project reference?
What version of Moq.dll do you actually find in your binaries folder?
Are there any other NuGet packages depending on Moq, and if so, what versions do they reference?
Do you have any assembly binding redirects set up in App.config or Web.config? Have you tried removing or updating them?
Have you tried deleting your solutions' binaries folders, clearing your NuGet package cache, then performing a package restore and rebuild?
If you've checked all of the above, found no inconsistencies or version conflicts, and you're still seeing the problem, then please post a small, standalone project (e. g. as a ZIP file) that exhibits the problem. Otherwise there's not much we can help you with.
I opened up a question on StackOverflow where I'm getting the MissingMethodException. I'm using MSTest build where I have an overload method to Create or Update some items in an MySQL Database where I need to include transactions. Given that MySQL does not do nested transactions, I had to do an overload of methods. Problem is, even before I do a unit test and trying to set up the Moq, I get MissingMethodException thrown; yet, when I run it using MySQL database to test it out, it works fine.
This is what I have:
`Mock _ProductRepositoryMoq = new Mock();
Now the first method with just a ProductExt parameter works fine in the Moq, but it's the second overloaded method that's giving me the MissingMethodException but as I stated, it is indeed working and I have verified through the database that data is being inserted and/or modified.
Something is telling me that there's a problem with Moq or I'm not setting this up correctly. How is it that it's working with the database, but not with a Moq?
Did I really find a bug, or am I doing a newbie mistake, and if so, where did I go wrong and how do I set it up correctly?
The text was updated successfully, but these errors were encountered: