Solved

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

Posted on 2010-08-27
11
4,504 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
  • 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 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