locked
Test method TestProjectsucceed.Form1Test.AddTest threw exception: System.TypeLoadException: Could not load type 'Smart.Form1' from assembly 'Smart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.. RRS feed

  • Question

  • Hi guys,
    I set up the VSTS 2008 and write a little program to to try to use the the 'unit test', but when I run the following coding and want to test the fuction 'Add', I alway got the failed result with the error prompt : Test method TestProjectsucceed.Form1Test.AddTest threw exception:  System.TypeLoadException: Could not load type 'Smart.Form1' from assembly 'Smart, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.. 

            /// <summary>
            ///A test for Add
            ///</summary>
            [TestMethod()]
            public void AddTest()
            {
                Form1 target = new Form1(); // TODO: Initialize to an appropriate value
                int a = 1; // TODO: Initialize to an appropriate value
                int b = 2; // TODO: Initialize to an appropriate value
                int expected = 3; // TODO: Initialize to an appropriate value
                int actual;
                actual = target.Add(a, b);
                Assert.AreEqual(expected, actual);
              }

    could you help me out with this problem? I set up the VSTS normally with no other configurations, did I missed something?

    thanks,
    Seattlein
    • Moved by Figo Fei Monday, June 23, 2008 3:37 AM off topic for vs setup
    Thursday, June 19, 2008 10:46 AM

Answers