Closed Charlemagne65 closed 10 years ago
Sorry this was my command to the NUGet console:
PM> Install-Package Moq
Installing 'Moq 4.2.1312.1622'. Successfully installed 'Moq 4.2.1312.1622'. Adding 'Moq 4.2.1312.1622' to Generator. Uninstalling 'Moq 4.2.1312.1622'. Successfully uninstalled 'Moq 4.2.1312.1622'. Install failed. Rolling back...
Windows Store apps do not support dynamic code emitting (which is what Moq and all other dynamic proxy-based frameworks use), as noted in MSDN: http://msdn.microsoft.com/en-US/library/windows/apps/hh441595(v=vs.110).aspx
So Moq4 cannot support this platform.
Ok,
what are my alternatives besides writing my mocking classes manually?
@Chakotay - this issue is super old, but just for the record, Moq 5 will likely support this scenario.
Install-Package : Could not install package 'Moq 4.2.1312.1622'. You are trying to install this package into a project that targets '.NETCore,Version=v4.5.1', but the package does not contain any assembly references or content file s that are compatible with that framework. For more information, contact the package author. At line:1 char:1
I would like using moq in a Windows Store App. But this is the message I get from the NUGet PM.
What is going wrong?