Merge pull request #17 from bennmapes/update

rename project and solution on create
diff --git a/bin/create.js b/bin/create.js
index ec19ed8..a789e20 100644
--- a/bin/create.js
+++ b/bin/create.js
@@ -38,11 +38,9 @@
     TEMPLATES_PATH = '\\templates',
     // sub folder for standalone project
     STANDALONE_PATH = TEMPLATES_PATH + '\\standalone',
-    // sub folder for full project
-    FULL_PATH = TEMPLATES_PATH + '\\full',
-    CUSTOM_PATH = TEMPLATES_PATH + '\\custom',
     // default template to use when creating the project
     CREATE_TEMPLATE = STANDALONE_PATH,
+    USE_DLL = false,
     PROJECT_PATH, 
     PACKAGE, 
     NAME;
@@ -173,9 +171,15 @@
     replaceInFile(path + "\\MainPage.xaml",/\$safeprojectname\$/g,namespace);
     replaceInFile(path + "\\MainPage.xaml.cs",/\$safeprojectname\$/g,namespace);
     replaceInFile(path + "\\CordovaAppProj.csproj",/\$safeprojectname\$/g,namespace);
+    if (NAME != "CordovaAppProj") {
+        replaceInFile(path + "\\CordovaSolution.sln",/CordovaAppProj/g,NAME);
+        // rename project and solution
+        exec('%comspec% /c ren ' + path + "\\CordovaSolution.sln " + NAME + '.sln');
+        exec('%comspec% /c ren ' + path + "\\CordovaAppProj.csproj " + NAME + '.csproj');
+    }
 
     //copy .dll if necessary
-    if (CREATE_TEMPLATE == FULL_PATH || CREATE_TEMPLATE == CUSTOM_PATH) {
+    if (USE_DLL) {
         var dllPath = ROOT + FRAMEWORK_PATH + '\\Bin\\Release\\WPCordovaClassLib.dll';
         if (fso.FileExists(dllPath)) {
             Log("WPCordovaClassLib.dll Found,  creating project");
diff --git a/templates/standalone/cordova/lib/build.js b/templates/standalone/cordova/lib/build.js
index 948fca7..9986a7e 100644
--- a/templates/standalone/cordova/lib/build.js
+++ b/templates/standalone/cordova/lib/build.js
@@ -92,7 +92,7 @@
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild CordovaSolution.sln /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Release');
+    exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Release');
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Release')) {
@@ -116,7 +116,7 @@
     Log("\tDirectory : " + path);
     
     wscript_shell.CurrentDirectory = path;
-    exec_verbose('msbuild CordovaSolution.sln /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug');
+    exec_verbose('msbuild /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=Debug');
     
     // check if file xap was created
     if (fso.FolderExists(path + '\\Bin\\Debug')) {