visual-studio C# 2008 Express:此版本的应用程序不支持项目类型 (.csproj)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/792351/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:24:29  来源:igfitidea点击:

C# 2008 Express: Project type (.csproj) is not supported by this version of the application

visual-studio

提问by AgentConundrum

I've been trying to look through some projects on CodePlexto try to get a feel for how others design their applications. I've run into some trouble trying to open these projects in C# 2008 Express. When I open either the solution or csproj files, I'm confronted with this error message:

我一直在尝试浏览CodePlex上的一些项目,以尝试了解其他人如何设计他们的应用程序。我在尝试在 C# 2008 Express 中打开这些项目时遇到了一些麻烦。当我打开解决方案或 csproj 文件时,我遇到了以下错误消息:

'Foo.csproj' cannot be opened because its project type (.csproj) is not supported by this version of the application.

To open it, please use a version that supports this type of project.

无法打开“Foo.csproj”,因为此版本的应用程序不支持其项目类型 (.csproj)。

要打开它,请使用支持此类项目的版本。

This doesn't happen when I open projects I created myself. The external projects are even auto-converted from 2005 when they're in that format, but choke when it tries to open the converted file.

当我打开自己创建的项目时不会发生这种情况。外部项目甚至从 2005 年开始自动转换为该格式,但在尝试打开转换后的文件时会卡住。

Is this a limitation on the Express editions, or is there something I can do to fix this?

这是 Express 版本的限制,还是我可以做些什么来解决这个问题?

I tried searching with Google, but the results I found were less than helpful.

我尝试用 Google 搜索,但我发现的结果并没有什么帮助。

Thanks!

谢谢!

UPDATES:
@JaredPar asked for the specific project which I'm having difficulties opening.
The proverbial 'straw that broke the camels back' is called Continuum, but I've also encountered difficulties with other projects on CodePlex, and also with the Paint.NET source.

更新:
@JaredPar 询问我在打开时遇到困难的特定项目。
众所周知的“压倒骆驼的稻草”被称为Continuum,但我在 CodePlex 上的其他项目以及 Paint.NET 源代码中也遇到了困难。

I've tried uninstalling and reinstalling, but the problem persists.

我已经尝试卸载并重新安装,但问题仍然存在。

@brianpeiris requested the specs for my install:

@brianpeiris 要求我的安装规格:

Visual Studio
Microsoft Visual Studio 2008
Version 9.0.30729.1 SP
Microsoft .NET Framework
Version 3.5 SP1

Visual Studio
Microsoft Visual Studio 2008
版本 9.0.30729.1 SP
Microsoft .NET Framework
版本 3.5 SP1

Installed Edition: C# Express

安装版本:C# Express

Microsoft Visual C# 2008 91910-152-0000061-60196
Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB945282) KB945282
Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB946040) KB946040
Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB946308) KB946308
Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB947540) KB947540
Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB947789) KB947789

Microsoft Visual C# 2008 91910-152-0000061-60196
带有 SP1
的 Microsoft Visual C# 2008 Express Edition 的
修补程序- ENU (KB945282) KB945282 带有 SP1 的 Microsoft Visual C# 2008 Express Edition 的修补程序- ENU (KB9462040)带有 SP1 的版本 - ENU (KB946308)
用于 Microsoft Visual C# 2008 快速版 SP1 的 KB946308
修补程序- ENU (KB947540) 带有 SP1 的 Microsoft Visual C# 2008 快速版的 KB947540修补程序 - ENU (KB947789) KB947789

System
System:
Microsoft Windows XP
Professional
Version 2002
Service Pack 2

系统
系统:
Microsoft Windows XP
Professional
Version 2002
Service Pack 2

Computer
AMD Turion(tm) 64 X2 Mobile
Technology TL-50
1.60 GHz, 1.75 GB of RAM
Physical Address Extension

计算机
AMD Turion(tm) 64 X2 移动
技术 TL-50
1.60 GHz,1.75 GB RAM
物理地址扩展

Also, I should note that I have tried reinstalling VS, which didn't work. I've also installed the Web Developer Express as well, and while I can open and run the project from there, C# continues to frustrate.

另外,我应该注意到我已经尝试重新安装 VS,但没有成功。我还安装了 Web Developer Express,虽然我可以从那里打开和运行项目,但 C# 仍然令人沮丧。

回答by brianpeiris

The Continuum project's codebase is not too large. Try creating a new project in Visual C# Express and import the code manually. You'll probably have to add some references as well before you can build sucessfully.

Continuum 项目的代码库并不太大。尝试在 Visual C# Express 中创建一个新项目并手动导入代码。在成功构建之前,您可能还必须添加一些引用。

Edit:

编辑:

I just did this with the Continuum project.

我只是在 Continuum 项目中做到了这一点。

Here's my process:

这是我的过程:

  • Download and extract Continuum-1.1.1-Source.zip
  • Delete Continuum.sln and Continuum.csproj
  • Create a new Windows Forms project in Visual C# Express called Continuum
  • Delete the default Form1.cs and Program.cs files and all the files under the "Properties" folder
  • Save the new project and solution inside the previously extracted "Continuum" folder
  • Enable "Show All Files" in the Solution Explorer
  • Include all files and folders except the "bin", "obj" and "CompliedBinary" folders
    • Don't forget to include all the files under the "Properties" folder
  • Add a reference to ZedGraph.dll (found under the "zedgraph_dll_v5.1.5" folder)
  • Build and enjoy
  • 下载并解压 Continuum-1.1.1-Source.zip
  • 删除 Continuum.sln 和 Continuum.csproj
  • 在 Visual C# Express 中创建一个名为 Continuum 的新 Windows 窗体项目
  • 删除默认的Form1.cs和Program.cs文件以及“Properties”文件夹下的所有文件
  • 将新项目和解决方案保存在先前提取的“Continuum”文件夹中
  • 在解决方案资源管理器中启用“显示所有文件”
  • 包括除“bin”、“obj”和“CompliedBinary”文件夹之外的所有文件和文件夹
    • 不要忘记包含“属性”文件夹下的所有文件
  • 添加对 ZedGraph.dll 的引用(在“zedgraph_dll_v5.1.5”文件夹下找到)
  • 建造和享受

Further Edit:

进一步编辑:

Here's a Unix diff of the unedited Continuum sln and csproj files compared to the ones I create using the process mentioned above. (I've merged the file manually to pick out the real differences.) (Ignore the syntax highlighting.)

这是未经编辑的 Continuum sln 和 csproj 文件与我使用上述过程创建的文件的 Unix 差异。(我已手动合并文件以找出真正的差异。)(忽略语法突出显示。)

Continuum_original.csproj vs Continuum_new.csproj

Continuum_original.csproj 与 Continuum_new.csproj

6c6
    <ProductVersion>9.0.21022</ProductVersion>
---
    <ProductVersion>9.0.30729</ProductVersion>
8c8
    <ProjectGuid>{FD0F9C26-38BF-473F-8FD4-FDB1C7BEA600}</ProjectGuid>
---
    <ProjectGuid>{E3E4FFA5-0EC3-4F94-B842-33C7A49B7FF5}</ProjectGuid>
13c13
    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
---
    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
37a38,46
    <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>
225c234
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
---
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

Continuum_original.sln vs Continuum_new.sln

Continuum_original.sln 与 Continuum_new.sln

3,4c3,4
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Continuum", "Continuum.csproj", "{FD0F9C26-38BF-473F-8FD4-FDB1C7BEA600}"
---
# Visual C# Express 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Continuum", "Continuum.csproj", "{E3E4FFA5-0EC3-4F94-B842-33C7A49B7FF5}"
12,15c12,15
        {FD0F9C26-38BF-473F-8FD4-FDB1C7BEA600}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {FD0F9C26-38BF-473F-8FD4-FDB1C7BEA600}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {FD0F9C26-38BF-473F-8FD4-FDB1C7BEA600}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {FD0F9C26-38BF-473F-8FD4-FDB1C7BEA600}.Release|Any CPU.Build.0 = Release|Any CPU
---
        {E3E4FFA5-0EC3-4F94-B842-33C7A49B7FF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {E3E4FFA5-0EC3-4F94-B842-33C7A49B7FF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {E3E4FFA5-0EC3-4F94-B842-33C7A49B7FF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {E3E4FFA5-0EC3-4F94-B842-33C7A49B7FF5}.Release|Any CPU.Build.0 = Release|Any CPU

You'll notice that the files aren't significantly differentand, as noted in the comments for this answer, I canactually open, compile and run the unedited Continuum 1.1.1 project! It appears the problem might be with the questioner's particular setup.

您会注意到这些文件并没有显着不同,并且正如本答案的评论中所述,我实际上可以打开、编译和运行未经编辑的 Continuum 1.1.1 项目!看来问题可能出在提问者的特定设置上。

Here are my software and operating system version information:

以下是我的软件和操作系统版本信息:

Microsoft Visual Studio 2008 Version 9.0.30729.1 SP Microsoft .NET Framework Version 3.5 SP1

Installed Edition: C# Express

Microsoft Visual C# 2008
91910-152-0000061-60588 Microsoft Visual C# 2008

Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB945282) KB945282 For more information, visit http://support.microsoft.com/kb/945282.

Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB946040) KB946040 For more information, visit http://support.microsoft.com/kb/946040.

Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB946308) KB946308 For more information, visit http://support.microsoft.com/kb/946308.

Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB947540) KB947540 For more information, visit http://support.microsoft.com/kb/947540.

Hotfix for Microsoft Visual C# 2008 Express Edition with SP1 - ENU (KB947789) KB947789 For more information, visit http://support.microsoft.com/kb/947789.

OS Name Microsoft Windows Vista Version 6.0.6001 Service Pack 1 Build 6001

Microsoft Visual Studio 2008 版本 9.0.30729.1 SP Microsoft .NET Framework 版本 3.5 SP1

安装版本:C# Express

Microsoft Visual C# 2008
91910-152-0000061-60588 Microsoft Visual C# 2008

Microsoft Visual C# 2008 Express Edition SP1 修补程序 - ENU (KB945282) KB945282 有关详细信息,请访问 http://support.microsoft.com/kb/945282

Microsoft Visual C# 2008 Express Edition SP1 修补程序 - ENU (KB946040) KB946040 有关详细信息,请访问 http://support.microsoft.com/kb/946040

Microsoft Visual C# 2008 Express Edition SP1 修补程序 - ENU (KB946308) KB946308 有关详细信息,请访问 http://support.microsoft.com/kb/946308

Microsoft Visual C# 2008 Express Edition SP1 修补程序 - ENU (KB947540) KB947540 有关详细信息,请访问 http://support.microsoft.com/kb/947540

Microsoft Visual C# 2008 Express Edition SP1 修补程序 - ENU (KB947789) KB947789 有关详细信息,请访问 http://support.microsoft.com/kb/947789

操作系统名称 Microsoft Windows Vista 版本 6.0.6001 Service Pack 1 Build 6001

回答by Espo

Try opening your .csproj -file with a text-editor and remove the ProjectType element that has a GUID - its usually the first entry under the first PropertyGroup.

尝试使用文本编辑器打开 .csproj 文件并删除具有 GUID 的 ProjectType 元素 - 它通常是第一个 PropertyGroup 下的第一个条目。

Source

来源

回答by JaredPar

Are you trying to load a VSTS Unit Test project? VSTS Unit Tests projects are not supported in the Express versions of Visual Studio and will lead to this type of warning. You can edit the project file a little bit and get the project to load if you just want to view the source but you will be unable to load the tests.

您是否正在尝试加载 VSTS 单元测试项目?VSTS 单元测试项目在 Visual Studio 的 Express 版本中不受支持,并且会导致此类警告。如果您只想查看源代码但无法加载测试,则可以稍微编辑项目文件并加载项目。

EDIT

编辑

Clarified that I was speaking about VSTS test unit tests projects versus other types of unit tests projects.

澄清我说的是 VSTS 测试单元测试项目与其他类型的单元测试项目。

回答by Aethex

Seems like your version of VS doesn't like the version of VS that created the .csproj.

似乎您的 VS 版本不喜欢创建 .csproj 的 VS 版本。

You can try copying the header from a .csproj you created yourself into the file that isn't working. Extra points if you write a program in C# that does that for you.

您可以尝试将自己创建的 .csproj 中的标头复制到不起作用的文件中。如果你用 C# 编写一个程序来为你做这件事,那就加分。

One problem: if the file was created with VS 2005, you might want to modify the header to make it look as if it was still made by VS 2005, so that your VS will convert it safely. I suggest scouring the web for a .csproj made with VS 2005, and using the header from that.

一个问题:如果文件是用 VS 2005 创建的,您可能需要修改标题以使其看起来好像仍然是由 VS 2005 创建的,以便您的 VS 能够安全地转换它。我建议在网上搜索使用 VS 2005 制作的 .csproj,并使用其中的标头。

Try downloading and re-installing Visual C# Express 2008. You might have installed a bad copy. Download it from the official site, with a simple google.

尝试下载并重新安装 Visual C# Express 2008。您可能安装了错误的副本。从官方网站下载它,用一个简单的谷歌。

Do you have the correct .NET framework? The newest version is 3.5. If you have a lower version, it might cause VS to reject loading it. Even if you change the header to something like 2.0 or lower, the application will probably not even build because it was built with a higher version of .NET.

你有正确的 .NET 框架吗?最新版本是 3.5。如果您的版本较低,可能会导致 VS 拒绝加载它。即使您将标头更改为 2.0 或更低版本,该应用程序也可能无法构建,因为它是使用更高版本的 .NET 构建的。

If all else fails, try installing Visual C# 2005.

如果所有其他方法都失败,请尝试安装 Visual C# 2005。

回答by Aaron Fischer

Depending on the project there are many updates that you may need to install such as silverlight, mvc.. visual studio c# express 2008 sp1.(there are cases where third party frameworks create these custom project templates.) There may be test projects that only a professional version of visual studio understands. What I find works best is to use sharp develop to open and work with these projects. SharpDevelop will not complain about the project file and in most cases if you have the correct dlls you can build the project as well.

根据项目的不同,您可能需要安装许多更新,例如 silverlight、mvc ..visual studio c# express 2008 sp1。(在某些情况下,第三方框架会创建这些自定义项目模板。)可能有测试项目仅专业版的visual studio 理解。我发现最有效的是使用sharp develop来打开和处理这些项目。SharpDevelop 不会抱怨项目文件,并且在大多数情况下,如果您有正确的 dll,您也可以构建项目。

回答by Anzurio

Try opening your project using a text editor and replace the contents of <ProductVersion > to the version your own project files create.

尝试使用文本编辑器打开您的项目并将 <ProductVersion > 的内容替换为您自己的项目文件创建的版本。

回答by Olivier Dagenais

@brianpeiris almosthad it:

@brianpeiris几乎拥有它:

Visual Studio/C# Express 2008 RTM is version 9.0.21022.8while Visual Studio/C# Express 2008 SP1 is version 9.0.30729.1.

Visual Studio/C# Express 2008 RTM 是版本 9.0.21022.8而 Visual Studio/C# Express 2008 SP1 是版本 9.0.30729.1

Try upgrading to Microsoft Visual Studio 2008 Express Editions with SP1. You might also want to read the Visual Studio Express with SP1 FAQ.

尝试升级到带有 SP1 的 Microsoft Visual Studio 2008 Express Edition。您可能还想阅读带有 SP1Visual Studio Express 常见问题解答

回答by ojrac

Warning: this is totally a hack, but: You might be able to edit the .csproj file and comment out the <ProjectTypeGuids>, like this:

警告:这完全是一个 hack,但是:您可以编辑 .csproj 文件并注释掉 <ProjectTypeGuids>,如下所示:

<-- <ProjectTypeGuids>{6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> -->

That said, just commenting those out might replace your trouble opening the project with trouble compiling it, instead. A better approach would be to google the guids on that line. For example, if you google the above project type guids, you'll be able to figure out that the project uses XNA, which you could then download for C# 2008 Express.

也就是说,仅仅将这些注释掉可能会代替您打开项目的麻烦,而不是编译它的麻烦。更好的方法是在该行上搜索 guid。例如,如果您在 google 上搜索上述项目类型 guid,您将能够确定该项目使用XNA,然后您可以为 C# 2008 Express 下载它。

回答by houssam11350

I faced this problem after installing the DB2 add-in for visual studio, (cannot be opened because its project type (.csproj) is not supported by this version of the application.), and I solved it by Following the steps. Click Start> All Programs > Visual Studio 2008 > Visual Studio Tools > Click Visual Studio 2008 Command Prompt. Type the below command and press enter.

我在安装 Visual Studio 的 DB2 插件后遇到了这个问题(无法打开,因为此版本的应用程序不支持它的项目类型 (.csproj)。),我按照步骤解决了它。单击开始 > 所有程序 > Visual Studio 2008 > Visual Studio 工具 > 单击 Visual Studio 2008 命令提示符。输入以下命令并按回车键。

devenv.exe /resetskippkgs

devenv.exe /resetskippkgs

Executing this command should solve your problem.

执行此命令应该可以解决您的问题。

回答by djSmart

May be this would help...

可能这会有所帮助...

  1. Goto Visual Studios Command Prompt.
  2. Type devenv.exe /resetskipkgs
  1. 转到 Visual Studios 命令提示符。
  2. 输入 devenv.exe /resetskipkgs

It should now run the old projects.

它现在应该运行旧项目。

The presence of a SkipLoading tag disables the loading of a VSPackage; clearing the tag re-enables the loading of the VSPackage.

SkipLoading 标记的存在会禁用 VSPackage 的加载;清除标记会重新启用 VSPackage 的加载。

The above command clears all SkipLoading Tags.

上述命令清除所有 SkipLoading 标签。