Avatar of tancat
tancat
Flag for United States of America asked on

VS2019 error on MacBook

My background is Oracle development but I'm learning C#/.NET - very brand new.  I'm going through a tutorial and am getting an error message.  I'm using a MacBookPro (to which I am also new), VS2019 Free/Community(?) version, and trying to run some tests using "MSTest Project".  I got the same error using "xUnit Test Project".  Please forgive if I'm using the wrong terminology.  

My tiny little project builds with no errors.  I'm using 'Run All' under Unit Tests to run the tests.  When testing a static method, the test runs fine.  However, when testing a property, I get a pop-up box that starts with "dotnet quit unexpectedly" and includes a whole bunch (like pages and pages) of information about the error that might make sense to someone.  I have not found any answers on google that involve intermittent causes (usually it's on building or running after an upgrade or something like that).  

Here are my two tests:
     [TestMethod]
        public void FullNameTestValid()
        {
            //--Arrange
            Customer customer = new Customer
            {
                FirstName = "Bilbo",
                LastName = "Baggins"
            };
            string expected = "Baggins, Bilbo";

            //--Act
            string actual = customer.FullName;

            //--Assert
            Assert.AreEqual(expected, actual);
        }
        [TestMethod]
        public void StaticTest()
        {
            //--Arrange
            var c1 = new Customer();
            c1.FirstName = "Bilbo";
            Customer.InstanceCount += 1;

            var c2 = new Customer();
            c2.FirstName = "Frodo";
            Customer.InstanceCount += 1;

            var c3 = new Customer();
            c3.FirstName = "Rosie";
            Customer.InstanceCount += 1;

            //--Act

            //--Assert
            Assert.AreEqual(3, Customer.InstanceCount);

        }

Open in new window

 

As soon as I figure out how to create a text document on a Mac, I will attach the contents of the error message.  Besides the error message, please let me know what additional information is needed to investigate this problem.  

Thank you!
VS2019_MacBook_error_msg.rtf
* unit testing* VS2019Mac OS X

Avatar of undefined
Last Comment
tancat

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
tancat

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck