Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't parse ASP.NET websites #1066

Merged
merged 7 commits into from
Jan 11, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/OmniSharp.MSBuild/ProjectSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private IEnumerable<string> GetProjectPathsFromSolution(string solutionFilePath)

foreach (var project in solutionFile.Projects)
{
if (project.IsSolutionFolder)
if (project.IsSolutionFolder || project.IsAspWebsite())
{
continue;
}
Expand Down
5 changes: 5 additions & 0 deletions src/OmniSharp.MSBuild/SolutionParsing/ProjectBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ private ProjectBlock(string projectTypeGuid, string projectName, string relative
Sections = sections;
}

public bool IsAspWebsite()
{
return RelativePath.StartsWith("http://");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should probably be case insensitive. can this be https:// too?
btw, do you have a sample project like this? I don't think it's possible to create these types of projects in VS for quite a while now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My project was made in Visual Studio 2013 for my work.

Steps to make one:

  • Right click solution item in solution explorer
  • Add
    • New website

The option is still there in Visual Studio 2017 Community Edition. Don't know if it works the same.

}

public static ProjectBlock Parse(string headerLine, Scanner scanner)
{
var match = s_lazyProjectHeader.Value.Match(headerLine);
Expand Down