Author: jocaba
Date: Tue Mar  1 06:40:01 2011
New Revision: 1075675

URL: http://svn.apache.org/viewvc?rev=1075675&view=rev
Log:
[NPANDAY-314] Adding a Maven artifact from VS plugin generates NPANDAY-180-017 
error

Modified behavior of generating group Id to only use the solution name if no 
company name is registered in the machine. note: in VS2010 if no company name 
is registered VS automatically uses Microsoft as companyName registered.

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

Modified: 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/NPandayImportProjectForm.cs
URL: 
http://svn.apache.org/viewvc/incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/NPandayImportProjectForm.cs?rev=1075675&r1=1075674&r2=1075675&view=diff
==============================================================================
--- 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/NPandayImportProjectForm.cs
 (original)
+++ 
incubator/npanday/trunk/dotnet/assemblies/NPanday.VisualStudio.Addin/src/main/csharp/NPanday/VisualStudio/Addin/NPandayImportProjectForm.cs
 Tue Mar  1 06:40:01 2011
@@ -76,9 +76,15 @@ namespace NPanday.VisualStudio.Addin
                 txtBrowseDotNetSolutionFile.Text = 
applicationObject.Solution.FileName;
                 try
                 {                    
-                    string groupId = 
Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows 
NT\CurrentVersion").GetValue("RegisteredOrganization","mycompany").ToString();
-                    groupId = ConvertToPascalCase(groupId);
-                    groupId = FilterID(groupId) + "." + 
FilterID(ConvertToPascalCase(new 
FileInfo(applicationObject.Solution.FileName).Name.Replace(".sln", "")));
+                    string companyId = 
Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows 
NT\CurrentVersion").GetValue("RegisteredOrganization","mycompany").ToString();
+                    string groupId = string.Empty;
+                    
+                    if (companyId != string.Empty)
+                    {
+                        groupId = FilterID( ConvertToPascalCase(companyId) )+ 
".";
+                    }
+                    
+                    groupId = groupId +  FilterID(ConvertToPascalCase(new 
FileInfo(applicationObject.Solution.FileName).Name.Replace(".sln", "")));
                     txtGroupId.Text = groupId;
                     string scmTag = string.Empty;  
//getSCMTag(applicationObject.Solution.FileName);
                     string version = "1.0-SNAPSHOT";


Reply via email to