Couple of bugs in NANT NAnt 0.84 (Build 0.84.1455.0; net-1.0.win32; release; 12/26/2003).

 

(1)  line 221 of project.cs.   When you have a project File that has no DependentUpon (like a xml resource), this line caused an internal error.  I fixed it with the blue code below.

 

FileInfo fi = new FileInfo(outputFile);

if (buildAction == "Compile") {

     _htFiles[fi.FullName] = null;

} else if (buildAction == "EmbeddedResource") {

Resource r = new Resource(this, fi.FullName, elemFile.Attributes["RelPath"].Value, (elemFile.Attributes["DependentUpon"]!= null) ? fi.DirectoryName + @"\" + elemFile.Attributes["DependentUpon"].Value : null, SolutionTask);

_htResources[r.InputFile] = r;

}

 

(2) line 158 of project.cs.  Not sure how to fix this yet, but wanted to let you know about it.  For a webservice project, the red line below fetches the solution’s file name.  Later, when the project direction is “combined” with the project reference’s HintPath, it creates an invalid location for the reference.  This is causing my solution task to fail.

 

            if (!_isWebProject) {

                _projectDirectory = new FileInfo(projectPath).DirectoryName;

            } else {

                string projectDirectory = projectPath.Replace(":", "_");

                projectDirectory = projectDirectory.Replace("/", "_");

                projectDirectory = projectDirectory.Replace("\\", "_");

                projectDirectory = Path.Combine(_projectSettings.TemporaryFiles.BasePath, projectDirectory);

                Directory.CreateDirectory(projectDirectory);

 

                webCacheDirectory = projectDirectory;

                _webProjectBaseUrl = projectPath.Substring(0, projectPath.LastIndexOf("/"));

                _projectDirectory = Path.GetDirectoryName(sln.FileName);

            }

 

 

Reply via email to