VS2012 ProjectTypeGuids丢失安装ASP.NET和Web工具2013.1开盘后, [英] VS2012 ProjectTypeGuids Lost when opening after installing ASP.NET and Web Tools 2013.1

查看:641
本文介绍了VS2012 ProjectTypeGuids丢失安装ASP.NET和Web工具2013.1开盘后,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Visual Studio 2012安装了ASP.NET和Web工具2013.1。

I've installed the "ASP.NET and Web Tools 2013.1" in my Visual Studio 2012.

我有有一个ASP.NET MVC 4项目具有以下项目类型的GUID的解决方案:

I have a solution which has an ASP.NET MVC 4 project with the following project type guids:

<ProjectTypeGuids>
  {E3E379DF-F4C6-4180-9B81-6769533ABE47};
  {349c5851-65df-11da-9384-00065b846f21};
  {fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>

这些GUID是:
   ASP.NET MVC 4.0
   Web应用程序
   视窗(C#)

These Guids are for: ASP.NET MVC 4.0 Web Application Windows (C#)

这是通常的配置,当你创建一个新的ASP.NET 4.0项目。它工作正常。

This is the usual configuration when you create a new ASP.NET 4.0 project. And it works fine.

问题是,一些奇怪的原因,每当我打开我的解决方案,第一个GUID(ASP.NET MVC 4.0)从.csproj的文件删除,所以我失去了所有相关的工具。

The problem is that, for some strange reason, whenever I open my solution the first GUID (ASP.NET MVC 4.0) is deleted from the .csproj file, so I lose all the related tooling.

不管我如何努力对其进行编辑:

No matter how I try to edit it:


  • 如果我关闭的解决方案,并手动编辑这个文件,添加缺少的GUID,当我再次打开它时,GUID被删除

  • 如果我卸载项目,编辑的.csproj和重新加载它的GUID也将被删除。

  • 我的版本控制(SVN)根据这个项目,所以我自己也尝试关闭VS,(使用龟),并重新打开解决方案更新文件中的SVN。你知道吗?打开解决方案时的GUID被删除!

如果我创建一个ASP.NET MVC 4.0项目的新的解决方案,它工作正常,和的GUID被保留。

If I create a new solution with an ASP.NET MVC 4.0 project, it works fine, and the GUIDs are kept.

任何想法,为什么这是可以发生的事情,我怎么能解决呢?

Any idea why this can be happening and how I can solve it?

更新

如果我在安全模式下打开VS这种情况不会发生。所以我怀疑它必须是一个扩展,但我不知道怎么去发现这是offendign扩展。有没有办法知道哪些分机可以为此事负责(除了卸载/次尝试...)

If I open VS in safe mode this doesn't happen. SO I suspect it must be an extension, but I don't know how to discover which is the offendign extension. Is there a way to know which extension can be responsible for this (apart from uninstall/try cycles...)

推荐答案

我找到了一个暂时的解决办法破解这个问题:

I found a temporary workaround hack for this problem:


  1. 右键单击在Visual Studio中的MVC项目,然后选择卸载项目

  2. 右键单击项目,然后选择编辑YourProjectName.csproj

  3. 用以下替换ProjectTypeGuids标记的内容并保存文件的变化:

  1. Right click on the MVC project in Visual Studio and select "Unload Project"
  2. Right click on the project and select "Edit YourProjectName.csproj"
  3. Replace the contents of the ProjectTypeGuids tag with the following and save the file changes:

{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}

{E3E379DF-F4C6-4180-9B81-6769533ABE47};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}

打开资源管理器窗口,找到的csproj文件。它打开属性,并将其标记为只读。

Open up Window Explorer and find the csproj file. Open up properties on it and mark it as Read Only.

只要有你有这样的项目在Visual Studio中打开,它会认为这是一个MVC项目,你将有选择添加视图和控制器。一旦您切换项目或重新启动Visual Studio,你必须再次做到这一点。

As long has you have this project open in Visual Studio, it will think it's an MVC project, and you will have options to Add Views and Controllers. Once you switch projects or restart Visual Studio, you'll have to do this again.

这篇关于VS2012 ProjectTypeGuids丢失安装ASP.NET和Web工具2013.1开盘后,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆