ItemTemplates and Code Snippets are not installed after adding NakedObjects.Ide

Dec 6, 2011 at 9:25 AM

ItemTemplates and Code Snippets are not available after adding NakedObjects.Ide to a project. Do I have to manually add them to Visual Studio or am I missing something?

-Jeroen

Coordinator
Dec 6, 2011 at 10:05 AM

It should not be necessary to do anything:  both the items and the snippets should be immediately available.

My guess is that there must be something different about your Visual Studio set-up / configuration, and I'd like to figure out what it is.

First, let's figure out if the NakedObjects.Ide Nuget package did install the items and snippets.  You should be able to check this in the trace in Output window, selecting the Package Manager option (imediately after the install). If not, go look in the right directories.  The items should be in e.g:

...\Documents\Visual Studio 2010\Templates\ItemTemplates\Visual C#\Naked Objects

and the code snippets in e.g.:

...\Documents\Visual Studio 2010\Code Snippets\Visual C#\Naked Objects

Can you first confirm that they are there.  If they are then we need to figure out why VS isn't picking them up automatically.

Dec 6, 2011 at 10:34 AM

The folders you pointed to do not exist. I found the snippets in the project folder: "..\packages\NakedObjects.Ide.4.0.110.0\" and also noticed there's a PowerShell install script. Perhaps this has not ran after adding the packages?

Coordinator
Dec 7, 2011 at 9:32 AM

The PowerShell script is what copies the ide elements into the correct directories.  So there are two possibilities:

1) That the PS script is not running at all.

2) That there is something different about your installation (e.g. where the VisualStudio2010 directory is) such that the script is failing.

Please look at the Output window Package Manager option after the package install (if necessary uninstall that package and re-install) to see if there is any evidence of the PS script starting.

Editor
Dec 7, 2011 at 10:23 AM
I did have the same issue, of the scripts not installing. So there may be some environments where there are glitches. I think I manually installed the files where the needed to go.

Dan


On 7 December 2011 09:33, richardpawson <notifications@codeplex.com> wrote:

From: richardpawson

The PowerShell script is what copies the ide elements into the correct directories. So there are two possibilities:

1) That the PS script is not running at all.

2) That there is something different about your installation (e.g. where the VisualStudio2010 directory is) such that the script is failing.

Please look at the Output window Package Manager option after the package install (if necessary uninstall that package and re-install) to see if there is any evidence of the PS script starting.

Read the full discussion online.

To add a post to this discussion, reply to this email (nakedobjects@discussions.codeplex.com)

To start a new discussion for this project, email nakedobjects@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Dec 7, 2011 at 11:00 AM

To me the issue is related to Windows 7. The Visual Studio folder does not reside in "My Documents" anymore but has been placed in "Documents". This is the part in the script where it goes wrong:

$CSSnippetsFolder = "$HOME\My Documents\Visual Studio $vsVersion\Code Snippets\Visual C#\My Code Snippets\"
$VBSnippetsFolder = "$HOME\My Documents\Visual Studio $vsVersion\Code Snippets\Visual Basic\My Code Snippets\"
$CSItemsFolder = "$HOME\My Documents\Visual Studio $vsVersion\Templates\ItemTemplates\Visual C#\"
$VBItemsFolder = "$HOME\My Documents\Visual Studio $vsVersion\Templates\ItemTemplates\Visual Basic\"
A manual copy made my templates appear.

Coordinator
Dec 7, 2011 at 11:11 AM

Stef and I both work with Windows 7 also and the install works fine for us.  As I understand it, in Windows 7,  Users\MyName\Documents\Visual Studio 2010 and Users\MyName\My Documents\Visual Studio 2010 are aliases, so both should work.  Having copied them manually, can you get to them via either of those two paths?  I'd like to get to the bottom of this as other people (e.g. Dan, above) must be hitting the same issue.

Editor
Dec 7, 2011 at 11:11 AM
I was on Windows 7 too, so that might indeed be the issue.


On 7 December 2011 11:00, jcvanderwal <notifications@codeplex.com> wrote:

From: jcvanderwal

To me the issue is related to Windows 7. The Visual Studio folder does not reside in "My Documents" anymore but has been placed in "Documents". This is the part in the script where it goes wrong:

$CSSnippetsFolder = "$HOME\My Documents\Visual Studio $vsVersion\Code Snippets\Visual C#\My Code Snippets\"
$VBSnippetsFolder = "$HOME\My Documents\Visual Studio $vsVersion\Code Snippets\Visual Basic\My Code Snippets\"
$CSItemsFolder = "$HOME\My Documents\Visual Studio $vsVersion\Templates\ItemTemplates\Visual C#\"
$VBItemsFolder = "$HOME\My Documents\Visual Studio $vsVersion\Templates\ItemTemplates\Visual Basic\"
A manual copy made my templates appear.

Read the full discussion online.

To add a post to this discussion, reply to this email (nakedobjects@discussions.codeplex.com)

To start a new discussion for this project, email nakedobjects@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Dec 7, 2011 at 12:55 PM

On my machine the home environment variable points to something different then expected (we expect the contents of USERPROFILE) :

HOME=C:\Windows\system32\config\systemprofile
USERPROFILE=C:\Users\jvanderwal

I also have a Win7 machine where the HOME variable is non-existent. Hope this helps solving this issue. Let me know if I have to dig deeper.

Coordinator
Dec 8, 2011 at 4:12 PM

That does look like a culprit.  I've raised this as an Issue to make sure we don't forget it  -  Stef and I are working flat-out on the Restful Objects API for Naked Objects up until Christmas, but we will return to addressing this and other issues next month.

Dec 9, 2011 at 9:49 AM

No worries, there's no rush since I managed to copy them manually. Here's some additional output from Powershell (which is different from the command promt) that might help:

PS L:\> $home
L:\
PS L:\> $env:home
C:\Windows\system32\config\systemprofile
PS L:\> $profile
C:\Users\jvanderwal\Documents\WindowsPowerShell
PS L:\> $env:UserProfile
C:\Users\jvanderwal

I'm connected to a network and my personal network folder (drive L) is being set on log on but that is not de folder where my VS Projects reside.