-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
It.IsAny<decimal> throws "System.decimal is not a supported constant type" #265
Comments
Closed? Why? |
Sorry, kzu, my bad. Pressed the wrong button. Anyway, I've edited the initial issue. Now, with the code sample I've supplied, it's easier to reproduce the issue. |
The bug actually occurs when the object is constructed, therefore a much simpler repro is:
|
As mentioned in this SO post, this is related to a Castle Core bug: castleproject/Core#87 |
So what are we missing? A dependency bump only? PR? ;) |
Any news on that? We're facing false negatives all around :) |
Has anyone found a solution for this? |
@dampee You can use alpha version of Moq (4.6.25-alpha). |
@i4004 thanks. I have reverted to 4.2 yesterday. Can't upgrade to prerelease versions currently. Looking forward to the release. |
Any update on this issue? |
I've just run into this issue. 😢 |
same problem here. |
I hit what I believe is a similar issue trying to mock some Visual Studio Interfaces:
It does appear to be a dupe of the castle bug: castleproject/Core#87 In my tests I was able to work around this by upgrading the Castle NuGet package to 4.0.0-beta002. |
This is a necessary pre-req for adopting Application Insights. It is supported on 4.0 but it brings along too many dependencies with it for my comfort. Once 4.5 is targeted it brings down a single DLL which is managable. The only downside of moving to 4.0 is losing easy support for VS 2010. That release only required 4.0 be installed. But that is lost anyways by virtue of moving to VSIX V3. This change also forced me to upgrade to a new versiont of Moq. It itself not an issue but I did run into the following bug: - devlooped/moq#265 Worked around it by moving Castle forward to a newer version.
This is a necessary pre-req for adopting Application Insights. It is supported on 4.0 but it brings along too many dependencies with it for my comfort. Once 4.5 is targeted it brings down a single DLL which is managable. The only downside of moving to 4.0 is losing easy support for VS 2010. That release only required 4.0 be installed. But that is lost anyways by virtue of moving to VSIX V3. This change also forced me to upgrade to a new versiont of Moq. It itself not an issue but I did run into the following bug: - devlooped/moq#265 Worked around it by moving Castle forward to a newer version.
We've now bumped to Castle 4.0 stable, so it should be fixed |
I was using Moq 4.5.3. and decided to update Moq Nuget package to the latest version, which is 4.5.8.
Suddenly, a lot of my tests started to fail. I found that the issue occurs when using
It.IsAny<decimal>
on decimal optional arguments. It throws "System.decimal is not a supported constant type". It also happens in version 4.5.7.Simple, silly test:
The text was updated successfully, but these errors were encountered: