Hi,
I try SLiNgshoT yesterday, and found that he don't have support for J# projet.
I wrote this little patch to had basic support for this.
Il also find some other thinks that may need more work.
For exemple, in our solution, we have configuration in the .sln that don't exist in some of the project.
This seems to break SLiNgshoT has he generate reference to task that don't existe in the ouput build file.
Il Also see strange reference in the build file to assembly that don't exist on my computer.
For exemple, I have reference to System.Xml that his write has :
c:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.XML.dll
but I don't have Winnt directory on my computer, and neither have install framework 1.0. This entry should be instead:
c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll
Perhaps there is missing some sort of "mapping mechanism". Visual studio seems to autatically remaps base assembly
that don't exist on the computer to existing framework assembly !
Laurent.
===
===================================================================
RCS file: /cvsroot/nantcontrib/NAntContrib/Tools/SLiNgshoT/SLiNgshoT.Core/NAntWriter.cs,v
retrieving revision 1.9
diff -u -r1.9 NAntWriter.cs
--- NAntWriter.cs 17 Jul 2004 11:20:34 -0000 1.9
+++ NAntWriter.cs 8 Nov 2004 13:36:16 -0000
@@ -287,7 +287,13 @@
writer.WriteStartElement("vbc");
writer.WriteAttributeString("rootnamespace", project.RootNamespace);
writer.WriteAttributeString("imports", project.GetImports());
- } else {
+ }
+ if (project.ProjectType.StartsWith("J#"))
+ {
+ writer.WriteStartElement("vsj");
+ } + else
+ {
// default to 'csc'
writer.WriteStartElement("csc");
writer.WriteAttributeString("unsafe", "${unsafe}");
===================================================================
RCS file: /cvsroot/nantcontrib/NAntContrib/Tools/SLiNgshoT/SLiNgshoT.Core/Project.cs,v
retrieving revision 1.6
diff -u -r1.6 Project.cs
--- Project.cs 17 Jul 2004 11:20:34 -0000 1.6
+++ Project.cs 8 Nov 2004 13:25:44 -0000
@@ -69,8 +69,15 @@
public void Read(string path) {
string extension = Path.GetExtension(path);
- if (extension == ".csproj" || extension == ".vcproj" || extension == ".vbproj") {
- _ProjectDocument = new XPathDocument(path);
+ if (extension == ".csproj" || extension == ".vcproj" || extension == ".vbproj" || extension == ".vjsproj") {
+ _ProjectDocument = new XPathDocument(path);
_ProjectNavigator = _ProjectDocument.CreateNavigator();
}
}
@@ -85,7 +92,12 @@
if ((bool)_ProjectNavigator.Evaluate("boolean(VisualStudioProject/@ProjectType='Visual C++')")) {
projectType = "Visual C++";
}
- else if ((bool)_ProjectNavigator.Evaluate("boolean(VisualStudioProject/CSHARP/@ProjectType='Local')")) {
+ else if ((bool)_ProjectNavigator.Evaluate("boolean(VisualStudioProject/VISUALJSHARP/@ProjectType='Local')"))
+ {
+ projectType = "J# Local";
+ }
+ else if ((bool)_ProjectNavigator.Evaluate("boolean(VisualStudioProject/CSHARP/@ProjectType='Local')"))
+ {
projectType = "C# Local";
}
else if ((bool)_ProjectNavigator.Evaluate("boolean(VisualStudioProject/CSHARP/@ProjectType='Web')")) {
@@ -114,6 +126,9 @@
case "C# Web":
assemblyName = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/CSHARP/Build/Settings/@AssemblyName)");
break;
+ case "J# Local":
+ assemblyName = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/VISUALJSHARP/Build/Settings/@AssemblyName)");
+ break;
case "VB Local":
case "VB Web":
assemblyName = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/VisualBasic/Build/Settings/@AssemblyName)");
@@ -140,6 +155,9 @@
case "C# Web":
outputType = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/CSHARP/Build/Settings/@OutputType)");
break;
+ case "J# Local":
+ outputType = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/VISUALJSHARP/Build/Settings/@OutputType)");
+ break;
case "VB Local":
case "VB Web":
outputType = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/VisualBasic/Build/Settings/@OutputType)");
@@ -182,6 +200,9 @@
case "C# Local":
case "C# Web":
return (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/CSHARP/Build/Settings/@RootNamespace)");
+ case "J# Local":
+ return (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/VISUALJSHARP/Build/Settings/@RootNamespace)");
+ break;
case "VB Local":
case "VB Web":
return (string)_ProjectNavigator.Evaluate("string(/VisualStudioProject/VisualBasic/Build/Settings/@RootNamespace)");
@@ -202,6 +223,9 @@
nodes =
_ProjectNavigator.Select("/VisualStudioProject/VisualBasic/Build/Settings/Config");
break;
+ case "J# Local":
+ nodes = _ProjectNavigator.Select("/VisualStudioProject/VISUALJSHARP/Build/Settings/Config");
+ break;
default:
nodes =
_ProjectNavigator.Select("/VisualStudioProject/CSHARP/Build/Settings/Config");
@@ -230,7 +254,13 @@
"/VisualStudioProject/VisualBasic/Build/Settings/[EMAIL PROTECTED]'{0}']",
name));
break;
- default:
+ case "J# Local":
+ nodes = _ProjectNavigator.Select(
+ String.Format(
+ "/VisualStudioProject/VISUALJSHARP/Build/Settings/[EMAIL PROTECTED]'{0}']",
+ name));
+ break;
+ default:
nodes = _ProjectNavigator.Select(
String.Format(
"/VisualStudioProject/CSHARP/Build/Settings/[EMAIL PROTECTED]'{0}']",
@@ -292,6 +322,10 @@
nodes =
_ProjectNavigator.Select("/VisualStudioProject/VisualBasic/Build/References/Reference");
break;
+ case "J# Local":
+ nodes =
+ _ProjectNavigator.Select("/VisualStudioProject/VISUALJSHARP/Build/References/Reference");
+ break;
default:
nodes =
_ProjectNavigator.Select("/VisualStudioProject/CSHARP/Build/References/Reference");
@@ -327,6 +361,7 @@
foreach (Reference reference in GetReferences()) {
if (reference.Type == "Project") {
+ if (reference.Value==null) continue;
Project project = _Solution.GetProject(reference.Value);
// Handle references to projects that cannot be found in the solution.
@@ -355,7 +390,11 @@
nodes =
_ProjectNavigator.Select("/VisualStudioProject/VisualBasic/Files/Include/File");
break;
- default:
+ case "J# Local":
+ nodes =
+ _ProjectNavigator.Select("/VisualStudioProject/VISUALJSHARP/Files/Include/File");
+ break;
+ default:
nodes =
_ProjectNavigator.Select("/VisualStudioProject/CSHARP/Files/Include/File");
break;
===================================================================
RCS file: /cvsroot/nantcontrib/NAntContrib/Tools/SLiNgshoT/SLiNgshoT.Core/Solution.cs,v
retrieving revision 1.8
diff -u -r1.8 Solution.cs
--- Solution.cs 17 Jul 2004 11:20:34 -0000 1.8
+++ Solution.cs 8 Nov 2004 13:13:15 -0000
@@ -98,6 +98,8 @@
string commonProjectId = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}";
string enterproseProjectId = "{FE3BBBB6-72D5-11D2-9ACE-00C04F79A2A4}";
+ string jsharpProjectId = "{E6FDF86B-F3D1-11D4-8576-0002A516ECE8}";
+
private void AddProject(string projectLine) {
string pattern = @"^Project\(""(?<unknown>\S+)""\) = ""(?<name>\S+)"", ""(?<path>\S+)"", ""(?<id>\S+)""";
@@ -112,32 +114,48 @@
path = ResolvePath(path);
- if (unknown == commonProjectId) {
- Project project = new Project(this, new Guid(id), name);
-
- string absoluteProjectPath = Path.Combine(SolutionDirectory, path);
- project.Read(absoluteProjectPath);
-
- string relativeProjectPath = Path.GetDirectoryName(path);
- project.RelativePath = relativeProjectPath;
-
- if (project.ProjectType == "C# Local" ||
- project.ProjectType == "C# Web" ||
- project.ProjectType == "VB Local" ||
- project.ProjectType == "VB Web") {
- _Projects.Add(project.ID, project);
- }
- }
- else if (unknown == enterproseProjectId) {
- EnterpriseProject etpProject = new EnterpriseProject(this, new Guid(id), name);
- string absoluteProjectPath = Path.Combine(SolutionDirectory, path);
- etpProject.Read(absoluteProjectPath);
-
- // get the list of projects from enterprise projects
- foreach(Project project in etpProject.GetProjects()) {
- _Projects.Add(project.ID, project);
- }
- }
+ if (unknown == commonProjectId)
+ {
+ Project project = new Project(this, new Guid(id), name);
+
+ string absoluteProjectPath = Path.Combine(SolutionDirectory, path);
+ project.Read(absoluteProjectPath);
+
+ string relativeProjectPath = Path.GetDirectoryName(path);
+ project.RelativePath = relativeProjectPath;
+
+ if (project.ProjectType == "C# Local" ||
+ project.ProjectType == "C# Web" ||
+ project.ProjectType == "VB Local" ||
+ project.ProjectType == "VB Web")
+ {
+ _Projects.Add(project.ID, project);
+ }
+ }
+ else if (unknown == jsharpProjectId)
+ {
+ Project project = new Project(this, new Guid(id), name);
+
+ string absoluteProjectPath = Path.Combine(SolutionDirectory, path);
+ project.Read(absoluteProjectPath);
+
+ string relativeProjectPath = Path.GetDirectoryName(path);
+ project.RelativePath = relativeProjectPath;
+
+ _Projects.Add(project.ID, project);
+ }
+ else if (unknown == enterproseProjectId)
+ {
+ EnterpriseProject etpProject = new EnterpriseProject(this, new Guid(id), name);
+ string absoluteProjectPath = Path.Combine(SolutionDirectory, path);
+ etpProject.Read(absoluteProjectPath);
+
+ // get the list of projects from enterprise projects
+ foreach(Project project in etpProject.GetProjects())
+ {
+ _Projects.Add(project.ID, project);
+ }
+ }
}
}
------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ NAntContrib-Developer mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer