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
Hi,
I tried to run Unit test cases from test explorer, but I am getting System.TypeLoadException.
Below is the error message -
Test Name: TestAddStock
Test FullName: Inventory.UnitTests.InventoryServiceTests.TestAddStock
Test Source: D:\service-fabric-dotnet-web-reference-app\ReferenceApp\Inventory.UnitTests\InventoryServiceTests.cs : line 67
Test Outcome: Failed
Test Duration: 0:00:00
Result StackTrace:
at Inventory.UnitTests.InventoryServiceTests..cctor()
--- End of inner exception stack trace ---
at Inventory.UnitTests.InventoryServiceTests..ctor()
Result Message: Unable to create instance of class Inventory.UnitTests.InventoryServiceTests. Error: System.TypeInitializationException: The type initializer for 'Inventory.UnitTests.InventoryServiceTests' threw an exception. ---> System.TypeLoadException: Method 'ReportApplicationHealth' in type 'Mocks.MockCodePackageActivationContext' from assembly 'Mocks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation..
Steps to reproduce the issue.
Clone the repo
Changed Test -> Test Settings -> Default Processor Architecture to X64.
Rebuild the solution
Run the test.
I am getting same exception for all the other test cases.
Am I missing something. Can anybody please look into this.
Thank you!
The text was updated successfully, but these errors were encountered:
The System.Fabric assemblies are also installed in the GAC when installing the fabric or the sdk.
I had installed fabric version 6 on my machine (latest) but then had to uninstall it and install 5.6 as it’s what my team is using.
The problem is that when I removed version 6, the installer didn’t remove the System.Fabric (and other related version 6 fabric assemblies) from the GAC and the .Net framework was confused between what was defined in the manifest of the tests (referencing version 5.6) and what it was loading (it’s talking the latest version from the GAC which is version 6).
The fix was to remove System.Fabric version 6 and related version 6 fabric assemblies from the GAC using gacutil.
The installer from version 5.6 do remove everything from the GAC, the issue only reproes with the fabric version 6 installer
Hi,
I tried to run Unit test cases from test explorer, but I am getting System.TypeLoadException.
Below is the error message -
Steps to reproduce the issue.
I am getting same exception for all the other test cases.
Am I missing something. Can anybody please look into this.
Thank you!
The text was updated successfully, but these errors were encountered: