Solved

Unable to read the project file '[project name].vbproj'

Posted on 2010-08-27
11
4,707 Views
Last Modified: 2013-11-27
Here's the deal. I had a computer with Visual Studio 2003, 2005, and 2008 all installed with .Net 1.1, .NET 2.0, and .NET 3.5. I was able to open projects in all three versions of Visual Studio. I just got a new computer (same OS, same model laptop, same everything) and installed all of those versions of VS, with the addition of Visual Studio 2010 and the .NET 4 framework. When I attempt to open one of my previously working applications in VS2005 I receive the following error:

Unable to read the project file '[project name].vbproj'...The imported project [project location] was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Does this have anything to do with where / how I installed Visual Studio 2005?
0
Comment
Question by:CitySec
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
11 Comments
 
LVL 9

Expert Comment

by:puru1981
ID: 33542954
have you ever opened the same project in higher version of VS?

if yes then the project file has a stamp of the higher version and can't be opened in lower version. So you are getting this error.
0
 
LVL 2

Author Comment

by:CitySec
ID: 33542992
I do not believe so. And if I had, is there a way to modify this stamp to point back to VS2005 and .NET 2.0?
0
 
LVL 9

Assisted Solution

by:puru1981
puru1981 earned 500 total points
ID: 33543081
take a backup of the project file and open it in notepad and change the productversion to 8.0

like below is for VS2008.

 <ProductVersion>9.0.21022</ProductVersion>
0
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

 
LVL 2

Author Comment

by:CitySec
ID: 33543312
I cannot find any tag like that in the .vbproj file. The only thing that comes close is this line:

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" Condition="" />

Should I change the folder in that string to v8.0? Or should I add in a tag called

<ProductVersion>8.0</ProductVersion>

And if I do add that, where exactly do I put it in the .vbproj file?

Thanks for your help on this.
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33549658
Hi,

Is it necessary to open the modified file in VS 2005? Please don't mind may I know what is the reason behind that.

Is your application is Web Application or Windows Application?

However please refer to link:
http://blogs.msdn.com/b/djpark/archive/2007/11/07/how-to-use-solutions-and-projects-between-visual-studio-2005-and-2008.aspx

for getting details about How to use solutions and projects between Visual  Studio 2005 and 2008.

Regards,
VSS
0
 
LVL 2

Author Comment

by:CitySec
ID: 33557833
I opened it in Visual Studio 2010 and converted the application, but I did not convert the .NET version from 2.0 to 4.0, and this seemed to work. I'm still confused as to why it would work in 2010 and not 2005?
0
 
LVL 9

Expert Comment

by:puru1981
ID: 33558103
now you will be not able to open the solution in VS2008. because the project is saved as VS2010 project and no lower version can open the project.
0
 
LVL 2

Author Comment

by:CitySec
ID: 33558118
Yeah, I understand that, which is why I made a backup copy first. Is there a difference between opening in 2008 and 2010 (for the purposes of this question & solution)?
0
 
LVL 9

Accepted Solution

by:
puru1981 earned 500 total points
ID: 33558138
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{2468D5C1-9374-430C-80CD-87C75C58D691}</ProjectGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>ClassLibrary1</RootNamespace>
    <AssemblyName>ClassLibrary1</AssemblyName>
    <FileAlignment>512</FileAlignment>
    <MyType>Windows</MyType>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <OptionExplicit>On</OptionExplicit>
    <OptionCompare>Binary</OptionCompare>
    <OptionStrict>Off</OptionStrict>
    <OptionInfer>On</OptionInfer>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>bin\Debug\</OutputPath>
    <DocumentationFile>ClassLibrary1.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DocumentationFile>ClassLibrary1.xml</DocumentationFile>
    <NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Xml.Linq">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
    <Reference Include="System.Data.DataSetExtensions">
      <RequiredTargetFramework>3.5</RequiredTargetFramework>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Diagnostics" />
    <Import Include="System.Linq" />
    <Import Include="System.Xml.Linq" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Class1.vb" />
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="My Project\Application.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Application.myapp</DependentUpon>
    </Compile>
    <Compile Include="My Project\Resources.Designer.vb">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <Compile Include="My Project\Settings.Designer.vb">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="My Project\Resources.resx">
      <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.vb</LastGenOutput>
      <CustomToolNamespace>My.Resources</CustomToolNamespace>
      <SubType>Designer</SubType>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="My Project\Application.myapp">
      <Generator>MyApplicationCodeGenerator</Generator>
      <LastGenOutput>Application.Designer.vb</LastGenOutput>
    </None>
    <None Include="My Project\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <CustomToolNamespace>My</CustomToolNamespace>
      <LastGenOutput>Settings.Designer.vb</LastGenOutput>
    </None>
  </ItemGroup>
  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>
projectfile.png
0
 
LVL 9

Expert Comment

by:puru1981
ID: 33558171
yes, if you open a project in higher version it will not open in previous version.

to open in previous version you need to make changes in project file.

to know the changes you can use any comparing tool to find the differences between two project files.
0
 
LVL 2

Author Comment

by:CitySec
ID: 33558373
Thanks, for some reason I didn't see that ProductVersion tag the first time I opened the .proj file. I searched for it in notepad. Maybe my search had a typo. Anyway, that's what I needed, thanks.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question