Rank: Advanced Member
Groups: Registered
Joined: 9/12/2014(UTC) Posts: 155 Location: Netherlands
Thanks: 19 times Was thanked: 11 time(s) in 11 post(s)
|
The following exception is thrown if a relative path is contained in quotes: Code:
[19:23:02.7842-Core-29] Event [SettingValueChangedEvent:LogVerbosity] is being processed on Core thread with subscriber: CoreLogger.
ENGINE - [19:23:11.6937-InitialisationQueueTask-32] ERROR (Load): Error occurred during load of component at D:\Projects\OpenSource\VisualFSharp\tests\fsharpqa\testenv\src\ILComparer\ILComparer.fsproj: System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: An error occurred while trying to parse the file Path '"D:\Projects\OpenSource\VisualFSharp\tests\fsharpqa\testenv\src\ILComparer\..\..\..\..\..\src\fsharp\msft.pubkey"' as relative to 'D:\Projects\OpenSource\VisualFSharp\tests\fsharpqa\testenv\src\ILComparer'. Ensure the file path is valid and does not exceed the maximum length of 259 characters
at nCrunch.Common.IO.FilePath.FromRelativePath(String relativeFilePath, DirectoryPath relativeTo)
at nCrunch.Common.IO.FilePath.FromAbsoluteOrRelativePath(String absoluteOrRelativePath, DirectoryPath relativeTo)
at nCrunch.Compiler.RemoteBuildRunner.(String , DirectoryPath )
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.(CallMethodMessage )
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
at nCrunch.TaskRunner.Ipc.RemoteInstance.(Byte[] )
at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.Compiler.IRemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
at nCrunch.Core.BuildManagement.BuildProcessLauncher..(IRemoteBuildRunner )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , FilePath , String , ExternalProcess )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.(Action`1 , ProcessorArchitecture , GridClientId , BuildSystemParameters , IList`1 )
at nCrunch.Core.BuildManagement.BuildProcessLauncher.AnalyseComponentBuildInExternalProcess(ComponentLoadParameters parameters, IList`1 customEnvironmentVariables)
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.(ProcessorArchitecture , String )
at nCrunch.Client.ComponentLoader.SnapshotComponentLoader.CreateComponentFromXml(FilePath projectFilePath, ParsedBuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, VisualStudioVersion vsVersion, ComponentUniqueName componentName, TaskSettings componentTaskSettings, Exception parseException, String targetFramework)
The workaround is to remove the quotes, however for situations where the path contains spaces, this is not a solution. The cause is an OtherFlags directive in the fsproj file (but just as well applies to csproj files). In the below fragment, FSharpSourcesRoot is set to a path that contains "..\..\", which caused the path-resolver to be called in the first place, I think. Code:
<OtherFlags>$(OtherFlags) --keyfile:"$(FSharpSourcesRoot)\fsharp\msft.pubkey"</OtherFlags>
. A probable solution is to remove any single or double (paired) quotes when such a path is found. Note that MSBuild has no problem with this path.
|