继承旧的c#项目,无法打开它

时间:2016-09-23 17:34:59

标签: c# visual-studio

我从以前的同事那里继承了一个C#项目。这个项目显然还没有运行或多年来的任何事情。我甚至无法弄清楚它的VS版本是哪个版本(查看同类版本的旧版VM看起来像vs2008,但是当我下载版本的vs2008 express时它会告诉我"项目文件foo.csproj无法打开,此安装不支持项目类型"。此版本的visual studio不支持解决方案文件夹。我试过在vs2008,vs2010,vs2013,vs2015中打开它,但没有一个能奏。我在这里不知道如何将这个项目加载到视觉工作室。

编辑:根据要求,sln和csproj文件的前20-30行:

SLN:

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BinLabel", "BinLabel\BinLabel.csproj", "{D5B787C0-B61A-48AC-81BB-E848D86F3A18}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{148F7AB7-001A-4C9A-8912-A585F2ED84BF}"
EndProject
Project("{B900F1C2-3D47-4FEC-85B3-04AAF18C3634}") = "BinLabelCab", "BinLabelCab\BinLabelCab.vddproj", "{B89E7F61-18AB-4BB9-8616-30E1E1AB9022}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {D5B787C0-B61A-48AC-81BB-E848D86F3A18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {D5B787C0-B61A-48AC-81BB-E848D86F3A18}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {D5B787C0-B61A-48AC-81BB-E848D86F3A18}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
        {D5B787C0-B61A-48AC-81BB-E848D86F3A18}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {D5B787C0-B61A-48AC-81BB-E848D86F3A18}.Release|Any CPU.Build.0 = Release|Any CPU
        {D5B787C0-B61A-48AC-81BB-E848D86F3A18}.Release|Any CPU.Deploy.0 = Release|Any CPU
        {B89E7F61-18AB-4BB9-8616-30E1E1AB9022}.Debug|Any CPU.ActiveCfg = Debug
        {B89E7F61-18AB-4BB9-8616-30E1E1AB9022}.Release|Any CPU.ActiveCfg = Release
    EndGlobalSection
    GlobalSection(SolutionProperties) = preSolution
        HideSolutionNode = FALSE
    EndGlobalSection
EndGlobal

和csproj:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.21022</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{D5B787C0-B61A-48AC-81BB-E848D86F3A18}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>BinLabel</RootNamespace>
    <AssemblyName>BinLabel</AssemblyName>
    <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <PlatformFamilyName>PocketPC</PlatformFamilyName>
    <PlatformID>b2c48bd2-963d-4549-9169-1fa021dce484</PlatformID>
    <OSVersion>5.2</OSVersion>
    <DeployDirSuffix>BinLabel</DeployDirSuffix>
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
    <NativePlatformName>Windows Mobile 6 Professional SDK</NativePlatformName>
    <FormFactorID>
    </FormFactorID>

当我尝试在VS2015中加载它时,我得到: attempting to open project in vs2015

单击该弹出窗口上的确定将使sln加载,但将其他项目标记为&#34;不可用&#34;。

2 个答案:

答案 0 :(得分:1)

正如Kolichikov在评论中所说:

它看起来像是针对pocketpcs,Express版本see here不支持

答案 1 :(得分:0)

如上所述,打开解决方案并右键单击任何未加载的项目,然后单击编辑'projectName'.proj

XML的顶部应该有“ProjectTypeGuids”部分 通过谷歌搜索它们或查看我在此处找到的列表:http://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs

id应该告诉你项目的类型/版本,你可以弄清楚你需要打开它。