You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by br...@apache.org on 2012/01/02 17:27:42 UTC

svn commit: r1226483 - /incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Msbuild/src/main/csharp/NPanday/Plugin/Msbuild/MsbuildMojo.cs

Author: brett
Date: Mon Jan  2 17:27:42 2012
New Revision: 1226483

URL: http://svn.apache.org/viewvc?rev=1226483&view=rev
Log:
support CCPROJ files for MSBuild plugin as well

Modified:
    incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Msbuild/src/main/csharp/NPanday/Plugin/Msbuild/MsbuildMojo.cs

Modified: incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Msbuild/src/main/csharp/NPanday/Plugin/Msbuild/MsbuildMojo.cs
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Msbuild/src/main/csharp/NPanday/Plugin/Msbuild/MsbuildMojo.cs?rev=1226483&r1=1226482&r2=1226483&view=diff
==============================================================================
--- incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Msbuild/src/main/csharp/NPanday/Plugin/Msbuild/MsbuildMojo.cs (original)
+++ incubator/npanday/trunk/plugins/netplugins/NPanday.Plugin.Msbuild/src/main/csharp/NPanday/Plugin/Msbuild/MsbuildMojo.cs Mon Jan  2 17:27:42 2012
@@ -64,14 +64,17 @@ namespace NPanday.Plugin.Msbuild
                 Directory.SetCurrentDirectory(mavenProject.build.sourceDirectory);
             
                 string projectName = mavenProject.artifactId;
-                if (File.Exists(projectName + ".csproj"))
+
+                string[] exts = new string[] { "csproj", "vbproj", "ccproj" };
+                foreach (string ext in exts)
                 {
-                    projectName += ".csproj";
-                }
-                else
-                {
-                    projectName += ".vbproj";
+                    if (File.Exists(projectName + "." + ext))
+                    {
+                        projectName += "." + ext;
+                        break;
+                    }
                 }
+
                 // must use /v:q here, as /v:m and above report the csc command, that includes '/errorprompt', which
                 // erroneously triggers the NPANDAY-063-001 error
                 // BuildingInsideVisualStudio is required to avoid building project references on framework 2.0