Correction.
It is not the path to solution that is at fault.
I modified the path to local ad that is what printed out:

---------------------------------------------
INTERNAL ERROR

System.IO.FileNotFoundException: Could not find file "N:\MySolution\Infrastructure\
utilities.sln".
File name: "N:\MySolution\Infrastructure\utilities.sln"
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFr
omProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access,
FileShare share, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detec
tEncodingFromByteOrderMarks, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path)
   at NAnt.VSNet.Tasks.Solution..ctor(String strSolutionFilename, ArrayList alAd
ditionalProjects, ArrayList alReferenceProjects, TempFileCollection tfc, Task na
nttask)
   at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()
-------------------------------------------------

Probably it has something to do with way projects are stored in the solution
Does any of you compile the solution from a distant directory?
A solution that contains project physically sitting on a different drive?
I successfully use <exec... devenv, but hate not being able to use <solution>.






Michael Kariv
10/26/2003 08:48 AM
       
        To:        [EMAIL PROTECTED]
        cc:        
        Subject:        <solution> throws exception on path with backslashes
                 


Hi,

Here is the exception (I use NAnt version 0.8.3) caused by the fallowing line:
<solution configuration="Debug" solutionfile="\MySolution\Infrastructure\Utilities\Utilities.sln">
</solution>

I suspect backslashes. However the very same path works fine for


        <exec  
            program="${VS.devenv.path}devenv.exe"  
            basedir="${MySolution.path}"
            commandline= "/build Debug \MySolution\Infrastructure\Utilities\Utilities.sln"
         />

Please advise.
Regards,
Michael Kariv

-----------------------------
INTERNAL ERROR

System.NotSupportedException: The given path's format is not supported.
   at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boo
lean needFullPath)
   at System.Security.Util.StringExpressionSet.AddExpressions(String[] str, Bool
ean checkForDuplicates, Boolean needFullPath)
   at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionA
ccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFul
lPath, Boolean copyPathList)
   at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess
access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
   at System.IO.DirectoryInfo..ctor(String path)
   at NAnt.VSNet.Tasks.ConfigurationSettings..ctor(ProjectSettings ps, XmlElemen
t elemConfig)
   at NAnt.VSNet.Tasks.Project.Load(Solution sln, String strFilename)
   at NAnt.VSNet.Tasks.Reference..ctor(Solution sln, ProjectSettings ps, XmlElem
ent elemReference, Task nanttask)
   at NAnt.VSNet.Tasks.Project.Load(Solution sln, String strFilename)
   at NAnt.VSNet.Tasks.Solution.LoadProjects()
   at NAnt.VSNet.Tasks.Solution..ctor(String strSolutionFilename, ArrayList alAd
ditionalProjects, ArrayList alReferenceProjects, TempFileCollection tfc, Task na
nttask)
   at NAnt.VSNet.Tasks.SolutionTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
   at NAnt.Core.Project.Execute(String targetName)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()


Reply via email to