Efferent-Health / fo-dicom.Codecs

Cross-platform Dicom native codecs for fo-dicom
Other
65 stars 23 forks source link

System.MissingMethodException: Method not found: 'Void Microsoft.VisualStudio.CodeCoverage.Shim.3309670844__coverage_runtime_method__249_19234__(UInt64)'.. #77

Closed lsqtest811 closed 1 month ago

lsqtest811 commented 1 month ago

I have updated fo-dicom from 4.0.5 to 5.1.2 and tried to implement the breaking changes. So after implementing the changes the unit test case is throwing below error System.MissingMethodException: Method not found: 'Void Microsoft.VisualStudio.CodeCoverage.Shim.3309670844coverage_runtime_method249_19234__(UInt64)'.. Stack Trace: at Processor.ProcessorContext..ctor(String countryISOCode, IList`1 ActiveFeatureToggleKeys) at ClinicalExtension_uTest.ProcessingUnitTests.TestInit() in S:\a\1\s\Test\ClinicalExtensionTests\ProcessingUnitTests.cs:line 76 at InvokeStub_ProcessingUnitTests.TestInit(Object, Object, IntPtr*) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

When I added code to initialize the transcoder then only it starts giving such error otherwise the UTs were passing before.

Environment:

jaime-olivares commented 1 month ago

How is this related to fo-dicom.Codecs?

jaime-olivares commented 1 month ago

Closing as not related

lsqtest811 commented 1 month ago

new DicomSetupBuilder() .RegisterServices(s => { s.AddFellowOakDicom().AddTranscoderManager(); }) .Build();

After adding the above code snippet from fo-dicom.codecs I am getting this error.

jaime-olivares commented 1 month ago

Try with the suggested code from the README:

new DicomSetupBuilder()
  .RegisterServices(s => s.AddFellowOakDicom().AddTranscoderManager<FellowOakDicom.Imaging.NativeCodec.NativeTranscoderManager>())
  .SkipValidation()
  .Build();