Link to home
Create AccountLog in
Avatar of TimAttaway
TimAttawayFlag for United States of America

asked on

Error Upgrading Project From VS2005 to VS2008

Yesterday I finally upgraded my development environment from Visual Studio 2005 to Visual Studio 2008.  Then I went to convert my first solution.  I have a solution that consists of one VB project, containing all of my webforms, one C# project containing all of my database access routines, utility routines, etc., one C# project containing installation code, and two different setup and deployment projects (one for the test environment and one for the production environment).  When I opened the solution with VS2008, it successfully converted all of the projects EXCEPT the Visual Basic project with all of the webforms (and associated code-behind.)

When it tries to convert the VB project, I get an alert box saying "The operationcould not be completed.  Unspecified error"  Then the conversion wizard tells me "Conversion failed.  Please see the conversion log for complete information."  I look in the conversion log and see the following error:

Error converting project file. The value "*Undefined*\Microsoft.WebApplication.targets" of the "Project" attribute in element <Import> is invalid. Illegal characters in path. C:\inetpub\wwwroot\CCS\CCS.vbproj

If I look in the project file referenced "C:\inetpub\wwwroot\CCS\CCS.vbproj," the only reference to Microsoft.WebApplication.targets is the following line.

  <Import Project="$(SolutionDir)\Microsoft.WebApplication.targets" />

The Microsoft.WebApplication.targets file DOES exist in the same directory as the solution.

Does anyone have any idea what is wrong?
ASKER CERTIFIED SOLUTION
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
My guess would be that SolutionDir in 2008 is pointing either one folder above or below where it thought it should be pointing in 2005.
Avatar of TimAttaway

ASKER

Hard coding the path worked like a champ.  I am still curious as to how the variable got corrupted (or how it gets set in the first place, for that matter).  I'm back in business, however.  Thanks.
Yes. I would have expected that variable to be the same in both versions. There are always little issues with MS upgrades though. Sometimes it goes smoothly, sometimes not. It bugs me that they force you to update the projects to edit them on different versions of VS. My laptop and lab computer at the university don't have the same versions of VS. I usually end up creating two separate solution files and just syncing the code files.