Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit Testing Framework - An error occurred while parsing entityname

I have created simple MS Unit Test Project. Assert.Equal(true, true). When I want to run a test I receive a error from Resharper and Visual Studio.

"Unit test Runner failed to run tests

System.Xml.XmlException: An Error occured while parsing EnityName. Line 1, position 17."

Do I missing something.

Edit: I can't add screenshot and I can't select text to copy. Ok I will write it the best I can.

at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.xml.XmlTextReaderImpl.Throw(String res,String arg)
at System.Xml.XmlText.ParseEnityName()
at System.Xml.XmlTextReaderImplparseEnityReference
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextLoader.ParsePartialContent(XmlNode parentNode,String innerxmltext, xmlNodeType nt)
at System.Xml.XmlElement.set_InnerXml(string value)
at Microsoft.VisualStudio.TestPlatform.Utilities.InferSettingHelper.AppendOrModifyChild(XpathNavigator,String nodePatH,String nodeNAME,sTRING INNERxML)
at Microsoft.VisualStudio.TestPlatform.Utilities.InferSettingsHelper.UpdatedRunConfiguration(XPathNavigator, ArchitectureeffectivePlatform,FrameworkVersion effectiveFramework,String resultsDirectory,String solutionDirectory,String binariesRootDirectory)
Microsoft.VisualStudio.TestPlatform.Utilities.InferSettingsHelper.MergeRunSettingsAndFindCompatibleSource()
at JetBrains.ReSharper.UnitTestProvider.MSTest11.MsTest11Runner.Run(IRemoteTaskServer server,String assemblyLocation,String runConfigurationFilename,IUnitTestRun run)
like image 628
user2932893 Avatar asked Mar 13 '26 04:03

user2932893


1 Answers

To solve this problem you don't need to reinstall Visual Studio or Resharper.

The problem was in a file path to my projects. This would explains why other Unit Test projects were fine because there were in a different location.

I guess this a bug inside Visual Studio Unit Testing Framework. If you have unit test project inside folders with special charts like '&' then Visual Studio will crash or Resharper will return this message.

I wonder where I can report this bug.

like image 184
user2932893 Avatar answered Mar 16 '26 00:03

user2932893