Author: brett
Date: Mon May  6 07:42:16 2013
New Revision: 1479480

URL: http://svn.apache.org/r1479480
Log:
Null check for configurations

Some projects do not supply this, such as the "Miscellaneous Files" project
that is created when a file outside of the solution is opened.

Modified:
    
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
    
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPandayImportProjectForm.cs

Modified: 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs?rev=1479480&r1=1479479&r2=1479480&view=diff
==============================================================================
--- 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
 (original)
+++ 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/Connect.cs
 Mon May  6 07:42:16 2013
@@ -585,6 +585,7 @@ namespace NPanday.VisualStudio.Addin
 
         private static void addProject(List<Project> projects, Project project)
         {
+            log.DebugFormat("Adding solution project: {0}, type: {1}", 
project.Name, project.Kind);
             if (IsFolder(project))
             {
                 foreach (ProjectItem item in project.ProjectItems)

Modified: 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPandayImportProjectForm.cs
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPandayImportProjectForm.cs?rev=1479480&r1=1479479&r2=1479480&view=diff
==============================================================================
--- 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPandayImportProjectForm.cs
 (original)
+++ 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPandayImportProjectForm.cs
 Mon May  6 07:42:16 2013
@@ -135,12 +135,15 @@ namespace NPanday.VisualStudio.Addin
                         bool web = isWebProject(project);
                         bool cloud = isCloudProject(project);
 
-                        foreach (object c in 
((object[])project.ConfigurationManager.ConfigurationRowNames))
+                        if (project.ConfigurationManager != null && 
project.ConfigurationManager.ConfigurationRowNames != null)
                         {
-                            string configuration = (string)c;
-                            if 
(!availableConfigurations.Contains(configuration))
+                            foreach (object c in 
((object[])project.ConfigurationManager.ConfigurationRowNames))
                             {
-                                availableConfigurations.Add(configuration);
+                                string configuration = (string)c;
+                                if 
(!availableConfigurations.Contains(configuration))
+                                {
+                                    availableConfigurations.Add(configuration);
+                                }
                             }
                         }
 


Reply via email to