Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

InvalidProjectFileException when running
btlog
#1 Posted : Friday, December 2, 2011 7:32:25 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/2/2011(UTC)
Posts: 1

All of my projects come up with the following error when I go to run tests. This is Visual Studio 2010 and NCrunch version 1.35b. This is the only version of NCrunch that has been installed on this machine.

Microsoft.Build.Exceptions.InvalidProjectFileException: The expression "[MSBuild]::GetDirectoryNameOfFileAbove('', enlistment.settings)" cannot be evaluated. The path is not of a legal form.

Server stack trace:
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args)
at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(IElementLocation elementLocation, String resourceName, Object arg0, Object arg1)
at Microsoft.Build.Evaluation.Expander`2.Function`1.Execute(Object objectInstance, IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation)
at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertyBody(String propertyBody, Object propertyValue, IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties)
at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertiesLeaveTypedAndEscaped(String expression, IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties)
at Microsoft.Build.Evaluation.Expander`2.PropertyExpander`1.ExpandPropertiesLeaveEscaped(String expression, IPropertyProvider`1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties)
at Microsoft.Build.Evaluation.Expander`2.ExpandIntoItemsLeaveEscaped[T](String expression, IItemFactory`2 itemFactory, ExpanderOptions options, IElementLocation elementLocation)
at Microsoft.Build.Evaluation.Expander`2.ExpandIntoTaskItemsLeaveEscaped(String expression, ExpanderOptions options, IElementLocation elementLocation)
at Microsoft.Build.Evaluation.ConditionEvaluator.ConditionEvaluationState`2.ExpandIntoTaskItems(String expression)
at Microsoft.Build.Evaluation.FunctionCallExpressionNode.ExpandArgumentForScalarParameter(String function, GenericExpressionNode argumentNode, IConditionEvaluationState state)
at Microsoft.Build.Evaluation.FunctionCallExpressionNode.BoolEvaluate(IConditionEvaluationState state)
at Microsoft.Build.Evaluation.GenericExpressionNode.Evaluate(IConditionEvaluationState state)
at Microsoft.Build.Evaluation.ConditionEvaluator.EvaluateConditionCollectingConditionedProperties[P,I](String condition, ParserOptions options, Expander`2 expander, ExpanderOptions expanderOptions, Dictionary`2 conditionedPropertiesTable, String evaluationDirectory, IElementLocation elementLocation, ILoggingService loggingServices, BuildEventContext buildEventContext)
at Microsoft.Build.Evaluation.Evaluator`4.EvaluateConditionCollectingConditionedProperties(ProjectElement element, ExpanderOptions expanderOptions, ParserOptions parserOptions)
at Microsoft.Build.Evaluation.Evaluator`4.EvaluateImportElement(String directoryOfImportingFile, ProjectImportElement importElement)
at Microsoft.Build.Evaluation.Evaluator`4.PerformDepthFirstPass(ProjectRootElement currentProjectOrImport)
at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()
at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCache projectRootElementCache, BuildEventContext buildEventContext, ProjectInstance projectInstanceIfAnyForDebuggerOnly)
at Microsoft.Build.Evaluation.Project.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation)
at Microsoft.Build.Evaluation.Project.Initialize(IDictionary`2 globalProperties, String toolsVersion, ProjectLoadSettings loadSettings)
at Microsoft.Build.Evaluation.Project..ctor(XmlReader xmlReader, IDictionary`2 globalProperties, String toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
at nCrunch.VSIntegration2010.MSBuildIntegration.BuildableProject.Initialise(String buildXml, String snapshotComponentName)
at nCrunch.Compiler.RemoteBuildRunner.#=q0BiQ$JhVGY7kRaQGPUBOQDCp57WGaYNmh0NosLc_dRI=(String #=qxrIx2SAsEt_Uc0oQv4RHkw==, String #=qyYLs1$WidH9olk$gIivS2w==, IList`1 #=qzXLjDRpdFoBMAxrEzvTYcA==, String #=qAzm0SjFyjCO99NGc2hj8EK0Ns0V4i4VpV_d$g_tgCZc=, String #=qqNVLmUhrlQMOMziTq$1y_Q==)
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(String projectFilePath, String buildXml, String useBuildConfiguration, String solutionDir)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(String projectFilePath, String buildXml, String useBuildConfiguration, String solutionDir)
at nCrunch.Core.BuildManagement.BuildProcessLauncher.#=qmc4hQ2sqjpyZGa_smhpXtxAppFbP2FhEeNzqCTpFohk=.#=qMsKq5X9Vu0V2loTirO9uDx_TalUcbyJ37u2bRTaP$pJepo0vwusSGNnGf6FSXYyv(IRemoteBuildRunner #=qU5ZFwyDNTMt3vkRZK5SCBaupmYkxXPlx18GdvqXHWa4=)
at nCrunch.Core.BuildManagement.BuildProcessLauncher.#=qfO4zMrAChS8R_IQWnfyYjpeef3BvuspR0sBt6_2$6Ggx6S5B0z9zKeG0G3jWnY0Y(Action`1 #=qzby81Gl79jMNsZ2ydluulw==)
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(String projectFilePath, String buildXml, String useBuildConfiguration, String solutionDir)
at nCrunch.Core.ComponentLoader.SnapshotComponentFactory.#=qhzH3fDgeMQNy$Q7f19YshrzzdhorlM05yRGA_P$fQ6c=()
at nCrunch.Core.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(String projectFilePath, String projectXml, String solutionFilePath)
Remco
#2 Posted : Friday, December 2, 2011 10:44:13 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,140

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting! Do you have any build customisations or build-integrated SDKs that make use of the GetDirectoryNameOfFileAbove function? It looks as though this is interfering with NCrunch's build analysis - we need to find a way to turn it off.
jnilsson
#3 Posted : Thursday, December 8, 2011 11:47:00 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/8/2011(UTC)
Posts: 1

Same problem here, VS 2010 Pro + NCrunch 1.35.0.16b. This was the first thing that happened after installing and trying to enable NCrunch. Definitely a non-starter for me. Same goes for not being able to reference projects outside the solution directory (if I understood the issue correctly, never got that far).

We use GetDirectoryNameOfFileAbove in order to include some global build settings for certain types of projects in different solutions.
Remco
#4 Posted : Thursday, December 8, 2011 8:54:54 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,140

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
My suspicion is that there may be file that you manually need to include using the AdditionalFilesToInclude setting. Check that your global build settings files are being picked up in the NCrunch workspace - you can view the workspace by right clicking on the project in the tests window and choosing to browse to it.

NCrunch should be able to handle situations where projects exist outside of the solution directory - though there is a known problem for referencing projects that are outside the solution itself (for example, solution includes only project A, but project A also references project B which isn't in the solution).
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.071 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download