Author Topic: Problem loading VS 2005 .SLN file  (Read 7148 times)

dnicholls

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Problem loading VS 2005 .SLN file
« on: April 13, 2007, 11:38:20 AM »

I regularly use Slickedit to work with Microsoft Visual Studio 2005 projects.

e.g. I have a solution called mine.sln which loads a project called mine.vcproj
Slickedit helpfully recognises this and automatically generates a mine.vpw and mine.vpj

However I have just inherited a new MS project which has one root solution file and 35 subprojects.

e.g.
\root\all.sln which contains
\root\proj1\proj1.vcproj
\root\proj2\prog2.vcproj
etc.

When I select "all.sln" using the slickedit "open workspace" command it starts to report that:
"Project file '\root\proj1\proj1.vpj' is not found
"Project file '\root\proj2\proj2.vpj' is not found

This isn't surprising because those files don't exist. My issue is that Slickedit doesn't automatically create them.

It would appear that:

If the microsoft project contains a single project of the same name as the solution, Slickedit will automatically create an equivalent VPW and VPJ file.
However if the Microsoft Solution contains multiple projects Slickedit will create an "all.vpw" but it doesn't try to create the necessary .VPJ files for each of the subprojects.

I do have a rather awkward workaround as follows:
1. Using VS2005, create a \root\proj1\proj1.sln \root\proj2\proj2.sln etc. workspace file for each (35) project.
2. Then using slickedit open each individual .sln file so that the corresponding .vpj file is created.
3. Then when I open all.sln using Slickedit it works ok.

Unfortunately this workaround has a number of problems.
1. It is a ROYAL PAIN IN THE BUTT, and a VERY long time to implement for my 35 sub projects.
2. I can't check in these new .sln files because I don't have control of the tree so I have to repeat this process each time I get a fresh tree (About once per week).

I would be quite happy with a solution which allows me to script this process.
To this end I have been reading some of the slickedit scripts to see if I could find a way to do this.
Unfortunately nothing was readily apparent.

I would like to be able to create a script that looks like this:

CreateEquivalentVpjFileForVcProjFile("\root\proj1\proj1.vcproj");
CreateEquivalentVpjFileForVcProjFile("\root\proj2\proj2.vcproj");
etc.

Does anyone know of a way to do this?

Note: I am using Visual Slickedit version 9.0.1 but I have tried this using the trial of VS 2007 and the behaviour appears to be the same.

Any ideas would be greatly appreciated.

Thanks,
         Dave


Phil Barila

  • Senior Community Member
  • Posts: 745
  • Hero Points: 61
Re: Problem loading VS 2005 .SLN file
« Reply #1 on: April 13, 2007, 05:55:43 PM »
Did you try creating a single all.vcproj first?  I've never had to create the .sln for subprojects.

Matthew

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 990
  • Hero Points: 44
Re: Problem loading VS 2005 .SLN file
« Reply #2 on: April 13, 2007, 06:31:57 PM »
Double-check the permissions on the directory. Sometimes SlickEdit will report a "not found" error when the real problem is that it cannot gain access to a file or directory. You may also want to recursively delete any .vpj/.vpw/.vtg files so that SlickEdit will try to build them all anew.

I routinely open up VS2005 solutions that contain multiple .csproj and .vcproj files. I only run into trouble when the projects have been organized into "Virtual" solution folders. But that manifests itself as showing every project as belonging in each virtual folder. (A "too many", as opposed to a "too few" problem).

Can you post the .sln file? I'm wondering if there is a parent/child/virtual folder construct that is confusing it.


dnicholls

  • Junior Community Member
  • Posts: 2
  • Hero Points: 0
Re: Problem loading VS 2005 .SLN file
« Reply #3 on: April 16, 2007, 02:08:53 PM »

Hi Mathew, Phil,

Thank you both for taking the time to reply.

Based on your suggestions I took another look at my solution file.
As you guessed, the problem was related to Visual Studio's use of virtual subfolders.

The fix:
1. Copy my main.sln to main_no_virtFolders.sln
2. Open main_no_virtFolders.sln using Visual Studio
3. drag all projects that were in virtual folders down to the root folder
4. Delete all virtual Folders. (Otherwise Slickedit attempts to make find projects with the same name as the virtual folder.
5. Save the new solution file
6. Open the new solution using Slickedit and all was well.

Thanks again for the valuable help.
I realise now that I should never have doubted Slickedit.
My faith in this fantastic editor is restored :-)

   Dave.

abushnell

  • Guest
Re: Problem loading VS 2005 .SLN file
« Reply #4 on: June 14, 2007, 02:27:29 PM »
I routinely open up VS2005 solutions that contain multiple .csproj and .vcproj files. I only run into trouble when the projects have been organized into "Virtual" solution folders. But that manifests itself as showing every project as belonging in each virtual folder. (A "too many", as opposed to a "too few" problem).

Matthew,

Is there any resolution to the virtual solutions problem? I am currently using/evaluating the Trial version of VS 2007 and am running into this issue. We have a biggish Visual Studio 2005 sln file that is a mixture of C# and C++ projects that all reside in Virtual folders that are nested in other virtual folders etc.. I am struggling to work with this solution in Visual Slickedit and was hoping a fix or something existed so I could work using the existing sln and projects...

Thanks,

Andrew