microsoft / UnitTestBoilerplateGenerator

An extension for Visual Studio that generates a unit test boilerplate from a given class, setting up mocks for all dependencies. Supports NUnit, Visual Studio Test, Moq and SimpleStubs.
MIT License
158 stars 51 forks source link

Not implemented Exception #39

Closed davidatorres closed 5 years ago

davidatorres commented 5 years ago

Installed product versions

Description

Not implemented Exception, NUnit & Moq options selected

Steps to recreate

  1. Right click on .cs file
  2. Click "Create Unit Test Boilerplate..."
  3. Error Exception HRESULT 0x80004001 (E_NOTIMPL) 2018-11-15_10-30-10

Current behavior

Unable to create a boilerplate test file

Expected behavior

Able to create a boilerplate test file.

RandomEngy commented 5 years ago

Thanks for the report. Updated VS to 15.9.0 and saw the error myself.

I think this is an issue with Visual Studio and have opened an issue with them: https://developercommunity.visualstudio.com/content/problem/383952/envdteprojectfilename-throws-notimplementedexcepti.html

jszybisz commented 5 years ago

I had the same issue, and finally resolve it. The problem seems not to be related with VS version. In my case it was collision of some projects in a solution. I have found out that after creating new class library project (.net framework) it started to work. You may try to create new solution and add only the project for which you want to generate test classes. This helped in my case. I am working on VS professional 15.9.1 (but the behavior was the same on 15.8.7 and 15.7.4)

RandomEngy commented 5 years ago

Do you happen to have an unloaded project in your solution?

jszybisz commented 5 years ago

Yes

pt., 16 lis 2018, 20:07: David Rickard notifications@github.com napisał(a):

Do you happen to have an unloaded project in your solution?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/UnitTestBoilerplateGenerator/issues/39#issuecomment-439495005, or mute the thread https://github.com/notifications/unsubscribe-auth/AGsLaJKRMYklsOZ6Zqa7vSVyO64DSAFQks5uvwzxgaJpZM4Yg9Qb .

RandomEngy commented 5 years ago

Thanks for confirming. Should be fixed in 1.9.11. I submitted to the marketplace and it's in verification now.