Gert Driesen wrote:

Hi Laurent,

SLiNgshoT has actually been deprecated. Instead of creating build files for
VS.NET solutions/projects, we now have a <solution> task in NAnt that
supports building VS.NET solutions/projects.

Currently, the <solution> task does not support J# projects, but this should
be relatively easy to add. However, we are close to releasing
NAnt/NAntContrib 0.85 (or 0.90, that is still to be decided), so this won't
make it into that release.

However, if you're interesting : we're planning on refactoring the
<solution> task code to make it more extensible and to allow better support
for different project types and versions of VS.NET. It would be great if you
could help us with the J# support.



another option is to look at extending Gordon Weakliems stylesheet based conversion process to handle j# projects. It can be found in the tools directory of NAntContrib cvs. See Gordons blog post for more information :
http://www.eighty-twenty.net/blog/urn:www-eighty-twenty-net:1328.html


The official line is that slingshot is deprecated in favour of the solution tasks and if your goal is just to build projects in the vs.net format then this is correct. However if you really want to convert those projects to NAnt build files then it clearly isn't. The real reason for Slingshot being deprecated is that its currently not being maintained and is suffering from bitrot. If someone is willing to step up and maintain either it or Gordon's stylesheet based version then we should retain them. The solution task is excellent for what it does but it doesn't cover the "convert vs projects to nant build files" use-case.

Ian




-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Laurent ARNAL
Sent: maandag 8 november 2004 15:15
To: [EMAIL PROTECTED]
Subject: [NAntC-Dev] Support for JSharp in SLiNgshoT,


   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.Cor
e/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.Cor
e/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(/VisualStudioProjec
t/CSHARP/Build/Settings/@AssemblyName)");
break;
+ case "J# Local":
+ assemblyName = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProjec
t/VISUALJSHARP/Build/Settings/@AssemblyName)");
+ break;
case "VB Local":
case "VB Web":
assemblyName = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProjec
t/VisualBasic/Build/Settings/@AssemblyName)");
@@ -140,6 +155,9 @@
case "C# Web":
outputType = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProjec
t/CSHARP/Build/Settings/@OutputType)");
break;
+ case "J# Local":
+ outputType = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProjec
t/VISUALJSHARP/Build/Settings/@OutputType)");
+ break;
case "VB Local":
case "VB Web":
outputType = (string)_ProjectNavigator.Evaluate("string(/VisualStudioProjec
t/VisualBasic/Build/Settings/@OutputType)");
@@ -182,6 +200,9 @@
case "C# Local":
case "C# Web":
return (string)_ProjectNavigator.Evaluate("string(/VisualStudioProjec
t/CSHARP/Build/Settings/@RootNamespace)");
+ case "J# Local":
+ return (string)_ProjectNavigator.Evaluate("string(/VisualStudioProjec
t/VISUALJSHARP/Build/Settings/@RootNamespace)");
+ break;
case "VB Local":
case "VB Web":
return (string)_ProjectNavigator.Evaluate("string(/VisualStudioProjec
t/VisualBasic/Build/Settings/@RootNamespace)");
@@ -202,6 +223,9 @@
nodes =
_ProjectNavigator.Select("/VisualStudioProject/VisualBasic/Bui
ld/Settings/Config");
break;
+ case "J# Local":
+ nodes = _ProjectNavigator.Select("/VisualStudioProject/VISUALJSHARP/Bu
ild/Settings/Config");
+ break;
default:
nodes =
_ProjectNavigator.Select("/VisualStudioProject/CSHARP/Build/Se
ttings/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/Bui
ld/References/Reference");
break;
+ case "J# Local":
+ nodes =
+ _ProjectNavigator.Select("/VisualStudioProject/VISUALJSHARP/Bu
ild/References/Reference");
+ break;
default:
nodes =
_ProjectNavigator.Select("/VisualStudioProject/CSHARP/Build/Re
ferences/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/Fil
es/Include/File");
break;
- default:
+ case "J# Local":
+ nodes =
+ _ProjectNavigator.Select("/VisualStudioProject/VISUALJSHARP/Fi
les/Include/File");
+ break;
+ default:
nodes =
_ProjectNavigator.Select("/VisualStudioProject/CSHARP/Files/In
clude/File");
break;


===================================================================
RCS file: /cvsroot/nantcontrib/NAntContrib/Tools/SLiNgshoT/SLiNgshoT.Cor
e/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







-------------------------------------------------------
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





------------------------------------------------------- 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

Reply via email to