SLN文件默认应用程序问题 - 无法在IDE外部打开。任何修复? [英] SLN Files Default Application Issues - Can't Open Outside of IDE. Any fixes?

查看:109
本文介绍了SLN文件默认应用程序问题 - 无法在IDE外部打开。任何修复?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前无法从文件资源管理器
最近的项目菜单中打开SLN文件。


<如果我尝试通过资源管理器打开一个,Windows会提示我"你想如何打开这个.sln文件?"它默认选择了最新的Visual Studio devenv(在我的情况下为2017),但是当我点击"确定"时,它会再次提示
- 这将无限发生。如果我将选择更改为"Microsoft Visual Studio版本选择器",则会打开一个名为"devenv.sln"的文件。代替;至少在这种情况下,它打开Visual Studio 2017。


我的设置将我的帐户的文件路径(文档,照片等)设置为外部驱动器,我有视觉工作室部分安装在外部(因为它不支持完全外部安装)。我不怀疑这可能是
错误的来源,但理想情况下不应该这样。我的主要驱动器是一个小型SSD,我希望只保留操作系统的启动速度,但作为开发人员已经为此创造了几个障碍。


有没有人知道这种移动安装到主驱动器的任何解决方案?

解决方案

Hi AirAKose,


欢迎来到MSDN论坛。


你的默认应用是什么?


该项目是否由VS 2017创建?


请确保您当前版本的IDE支持解决方案文件的项目。


据我所知,SLN文件是用于在Microsoft Visual Studio中组织项目的结构文件。它包含有关项目
环境和项目状态的基于文本的信息。请尝试检查文件编码是否正确,只需打开记事本的".sln"并查看其内容。


以下是我用记事本打开的Console App(.NET Framework)项目的示例:

 Microsoft Visual Studio解决方案文件,格式版本12.00 
#Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 10.0.40219.1
项目(&{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" ;)=" ConsoleApp1"," ConsoleApp1 \ConsoleApp1.csproj"," {B29D4132-9CF8-40ED-8741-EF2A0F35D0A3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms )= preSolution
调试|任何CPU =调试|任何CPU
发布|任何CPU =发布|任何CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms)= postSolution
{B29D4132 -9CF8-40ED-8741-EF2A0F35D0A3} .Debug | Any CPU.ActiveCfg = Debug | Any CPU
{B29D4132-9CF8-40ED-8741-EF2A0F35D0A3} .Debug | Any CPU.Build.0 = Debug | Any CPU
{B29D4132-9CF8-40ED-8741-EF2A0F35D0A3}。发布|任意C PU.ActiveCfg = Release | Any CPU
{B29D4132-9CF8-40ED-8741-EF2A0F35D0A3} .Release | Any CPU.Build.0 = Release | Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals)= postSolution
SolutionGuid = {D736E064-9DAE-4D4F-86FD-CD3C92B63687}
EndGlobalSection
EndGlobal

另外,请在你的机器上创建一个新项目,尝试打开.sln文件。如果它打开正常,可能是由解决方案引起的,你可以创建
a新的空白解决方案将现有项目添加到这个平淡无奇的解决方案中。如果无法打开,请尝试重新安装Visual Studio。


同时,有一个反馈描述"解决方案
未在VS 2017中打开
"可能对您有所帮助,请看一下。


问候,


Judyzh


I am currently unable to open SLN files from the File Explorer or Recent Items menu.

If I try to to open one through explorer, Windows prompts me with "How do you want to open this .sln file?" It defaults to having the latest Visual Studio devenv selected (2017 in my case), but when I click "OK", it brings the prompt up again- and this will occur infinitely. If I change the selection to "Microsoft Visual Studio Version Selector", it opens a file called "devenv.sln" instead; at least in this case it opens with Visual Studio 2017.

My setup has my account's file paths (Documents, Photos, etc..) set to an external drive, and I have visual studio partially installed externally as well (since it does not support full external installation). I do not doubt that this may be a source of the errors, but ideally it should not be. My main drive is a small SSD that I was hoping to keep to the OS-only for bootup speed, but being a developer has created several hurdles for that.

Does anyone know of any resolutions to this short of moving installations to the main drive?

解决方案

Hi AirAKose,

Welcome to the MSDN forum.

What’s your default application?

Does this project be created by VS 2017?

Please make sure your current version of the IDE is support the project of solution file.

As far as I know, an SLN file is a structure file used for organizing projects in Microsoft Visual Studio. It contains text-based information about the project environment and project state. Please try to check if the file encode is correct, just open the ".sln" by the notepad and view its content.

Following is an example of Console App (.NET Framework) project I opened with notepad:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2027
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{B29D4132-9CF8-40ED-8741-EF2A0F35D0A3}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{B29D4132-9CF8-40ED-8741-EF2A0F35D0A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{B29D4132-9CF8-40ED-8741-EF2A0F35D0A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{B29D4132-9CF8-40ED-8741-EF2A0F35D0A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{B29D4132-9CF8-40ED-8741-EF2A0F35D0A3}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
		SolutionGuid = {D736E064-9DAE-4D4F-86FD-CD3C92B63687}
	EndGlobalSection
EndGlobal

In addition, please create a new project in your machine, try to open the .sln file. If it opens normal, it might be caused by the solution, you could create a new blank solution project and add the existing projects to this bland solution. If it can’t open, please try to reinstall the Visual Studio.

Meanwhile, there’s a feedback describes "Solution doesn’t open in VS 2017" might helpful for you, please have a look at it.

Regards,

Judyzh


这篇关于SLN文件默认应用程序问题 - 无法在IDE外部打开。任何修复?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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