Why is Visual Studio not able to open .csproj files?

旧巷老猫 提交于 2019-12-09 07:58:53

问题


I have the odd problem that I am not able to open the properties of my .NET projects in Visual Studio. If I try to open it by clicking on the Properties tree node in the Solution Explorer I get the following message:

There is no editor available for '....csproj'. Make sure the application for the file type (.csproj) is installed.

If I try to open the project properties by the main menu nothing happens at all.

I already tried to reset the Visual Studio settings by command line and a repair installation but nothing helped so far.

I use the Visual Studio 2008 in version 9.0.30729.1 SP including the XNA Game Studio 3.0, ReSharper 4.1 and Visual SVN 1.5.1.

It is occurring on all my projects and seems to be a local issue because my co-workers do not have this kind of problem.

Help is much appreciated!

Thanks, Michael


回答1:


Repair installation doesn't worked as I mentioned in my question. The problem was solved by using the command line with

devenv /ResetSkipPkgs

BUT after that I had to reset some of my Resharper settings.




回答2:


I had the same issue. tried running "devenv /ResetSkipPkgs", repairing the installation ... with no luck.

I opened the .csproj file (in a text editor), and looked for all References in the csproj file. Apparantly, i found the line where it references MVC 1.0 (which i havent installed assuming MVC 2.0 would be backward compatible!?)

i installed MVC 1.0, and boom ... it works!

just check for all references in the .csproj file, and install them as needed.




回答3:


Do you have SQL Server installed? If so are you accidentally opening the project with the VS2005 shell that's installed as part of SQL Server?




回答4:


Sounds to me like you need to do a full uninstall and reinstall from scratch. You've likely lost some setting or corrupted some registry key. You can either fish around until you find your errant setting, or you can spend the time to just reinstall.

Don't do a repair install. Remove VS (and the other programs/utilities you mentioned) from your machine and do a clean install.




回答5:


Open up the .csproj in notepad and check the <ProjectTypeGuids> tag, if it exists then you may not have one of the project types installed.




回答6:


If none of the above answers work, you can also launch again the installer, choose “remove or add functionalities”, and add all “additional language tools” available for “Visual C#“ in the functionalities list. For instance in my case I was missing "Visual studio tools for office" that was needed to allow the .csproj to be opened.




回答7:


I had the same issue when i un-installed an extension from the extensions and updates. I tried all the options mentioned above but no luck. It showed me xamarin shell package did not load correctly every time i tried to load the app.

Then the issue was resolved by Repairing the Xamarin.VisualStudio using the Xamarin.VisualStudio_<version>.msi.. By this .csproj issue will be resolved.



来源:https://stackoverflow.com/questions/340138/why-is-visual-studio-not-able-to-open-csproj-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!