简体   繁体   English

Visual Studio 2012 1个项目(共4个)未加载

[英]Visual Studio 2012 1 of 4 projects not loading

  • Visual Studio 2012, TFS, Windows 7 Visual Studio 2012,TFS,Windows 7

We have a C# solution that has 4 projects. 我们有一个包含4个项目的C#解决方案。 One of the projects fails to load. 其中一个项目无法加载。 When loading the solution I recieve and error stating "One or more projects in the solution were not loaded correctly. Please see the Output Window for details." 加载解决方案时,我收到错误消息,指出“解决方案中的一个或多个项目未正确加载。有关详细信息,请参见输出窗口。” The output window shows "$devpath\\Remits\\Business\\Admin.Portal\\Remits\\Business\\Admin.Portal\\Remits.Business.Admin.Portal.csproj" where $devpath stands in for local src path for brevity. 输出窗口显示“ $ devpath \\ Remits \\ Business \\ Admin.Portal \\ Remits \\ Business \\ Admin.Portal \\ Remits.Business.Admin.Portal.csproj”,其中$ devpath表示简短的本地src路径。

If I attempt to reload the project I get an error stating "The project file '$devpath\\Remits\\Business\\Admin.Portal\\Remits\\Business\\Admin.Portal\\Remits.Business.Admin.Portal.csproj' has been moved, renamed or is not on your computer." 如果我尝试重新加载项目,则会收到一条错误消息,指出“项目文件'$ devpath \\ Remits \\ Business \\ Admin.Portal \\ Remits \\ Business \\ Admin.Portal \\ Remits.Business.Admin.Portal.csproj'已移动,重命名或不在您的计算机上。”

The path to the project is $devpath\\Remits\\Business\\Admin.Portal\\Remits.Business.Admin.Portal.csproj. 项目的路径为$ devpath \\ Remits \\ Business \\ Admin.Portal \\ Remits.Business.Admin.Portal.csproj。 You will notice that there is a section in the path that is being repeated unnecessarily. 您会注意到路径中的某个部分正在不必要地重复。 I have used notepad++ to look at the .sln and .csproj but I don't know enough about the fields to have fixed the issue. 我已经使用notepad ++来查看.sln和.csproj,但我对这些字段的了解不足以解决此问题。

I have look for possible solutions but haven't found a fix yet. 我正在寻找可能的解决方案,但尚未找到解决方法。 Some of the sites I have looked at suggest deleting the .suo file but that didn't resolve the problem. 我浏览过的某些网站建议删除.suo文件,但这不能解决问题。 If it is needed to see some of the fields in the .sln and .csproj I will be happy to provide them. 如果需要查看.sln和.csproj中的某些字段,我将很乐意提供它们。 Thanks for any help you can provide. 感谢您的任何帮助,您可以提供。

http://tzuhsun.wordpress.com/2012/07/20/the-project-file-0-has-been-moved-renamed-or-is-not-on-your-computer/ http://tzuhsun.wordpress.com/2012/07/20/the-project-file-0-has-been-moved-renamed-or-is-not-on-your-computer/

http://codingcramp.blogspot.com/2011/03/project-file-has-been-moved-renamed-or.html http://codingcramp.blogspot.com/2011/03/project-file-has-been-moved-renamed-or.html

older: http://social.msdn.microsoft.com/Forums/en-HK/tfsgeneral/thread/a4c3f944-f36b-4a8d-9cb5-a1133f717ce5 旧版: http//social.msdn.microsoft.com/Forums/en-HK/tfsgeneral/thread/a4c3f944-f36b-4a8d-9cb5-a1133f717ce5

Solution file info: 解决方案文件信息:

    Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Remits.Business.Admin.Portal", "Remits.Business.Admin.Portal.csproj", "{2D08EC70-FAC0-4360-910C-0435FD4BE6E6}"
    Global
        GlobalSection(TeamFoundationVersionControl) = preSolution
            SccNumberOfProjects = 4
            SccProjectUniqueName0 = Remits.Business.Admin.Portal.csproj
            SccProjectName0 = .
            SccAuxPath0 = http://someTFSserver:8080/tfs/defaultcollection
            SccLocalPath0 = .
            SccProvider0 = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
                   ..snip..
        GlobalSection(TeamFoundationVersionControl) = preSolution
            SccNumberOfProjects = 4
            SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
            SccTeamFoundationServer = http://someTFSserver:8080/tfs/defaultcollection       
            SccProjectUniqueName0 = Remits.Business.Admin.Portal.csproj
            SccProjectName0 = Remits/Business/Admin.Portal
            SccLocalPath0 = Admin.Portal

If you are not familiar with the solution file structure, I suggest you: 如果您不熟悉解决方案的文件结构,建议您:

  1. make an extra copy of the unloading project 制作卸载项目的额外副本
  2. remove the unloading project form your solution and make sure it's gone from the file system except the extra copy you made 从您的解决方案中删除正在卸载的项目,并确保它已从文件系统中删除,除了您制作的多余副本之外
  3. add a new project to recreate the unloading project to your solution 添加一个新项目以重新创建要卸载的项目到您的解决方案
  4. once your solution loads fine, you can remove your extra backup 解决方案加载正常后,您可以删除多余的备份

I had this problem with a web project and it turned out to be related to corrupt IIS Express configuration. 我在Web项目中遇到了这个问题,事实证明它与损坏的IIS Express配置有关。

I manually removed the project bindings in the IIS Express config and tool out the line; 我在IIS Express配置中手动删除了项目绑定,并画出了一条线。

in my .csproj file. 在我的.csproj文件中。 Hope this helps somebody else who finds their way here. 希望这对在这里找到路的人有所帮助。

The same problems had occurred with me! 我也遇到了同样的问题! No need to do those above things! 不需要做这些事情! Check: If you have changed any folder name or folder structure while saving last time. 检查:如果在上次保存时更改了任何文件夹名称或文件夹结构。 Check whether all files are at their correct place and correctly named? 检查所有文件是否都在正确的位置并正确命名?

That's it! 而已! You will get your solution ready, cause i get it! 您将准备好解决方案,因为我明白了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM