question

shivashpal-5723 avatar image
0 Votes"
shivashpal-5723 asked KyleWang-MSFT answered

System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Message:
Test method UnitTestProject1.UnitTest1.TestMethod1 threw exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Stack Trace:
Mathe.get_AddNum()
UnitTest1.TestMethod1() line 27

This occurs when i was trying to do unit test on small addition app. Please give any suggestion
I will be great of you

dotnet-xamarinformsvs-testing
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KyleWang-MSFT avatar image
1 Vote"
KyleWang-MSFT answered

Hi shivashpal-5723,

Welcome to our Microsoft Q&A platform!

"Xamarin.Forms.Core" is contained in "Xamarin.Forms", so try to uninstall the "Xamarin.Forms" Nuget Package and install the latest version.

Then delete the "bin" and "obj" folder under project path, and clean&rebuild the project.

Regards,
Kyle


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.