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

Support solution filters (*.slnf) #1952

Closed
wants to merge 4 commits into from
Closed

Conversation

sharwell
Copy link
Contributor

Addresses dotnet/roslyn#47531 (review)

I'm not sure how to test this.

@filipw
Copy link
Member

filipw commented Sep 21, 2020

you can add a new test-asset representing slnf and add a similar test to this

public async Task TestProjectAndSolution()
{
using (var testProject = await TestAssets.Instance.GetTestProjectAsync("ProjectAndSolution"))
using (var host = CreateMSBuildTestHost(testProject.Directory))
{
var workspaceInfo = await host.RequestMSBuildWorkspaceInfoAsync();
Assert.Equal("ProjectAndSolution.sln", Path.GetFileName(workspaceInfo.SolutionPath));
Assert.NotNull(workspaceInfo.Projects);
var project = Assert.Single(workspaceInfo.Projects);
Assert.Equal("ProjectAndSolution", project.AssemblyName);
Assert.Equal("bin/Debug/netcoreapp2.1/", project.OutputPath.EnsureForwardSlashes());
Assert.Equal("obj/Debug/netcoreapp2.1/", project.IntermediateOutputPath.EnsureForwardSlashes());
var expectedTargetPath = $"{testProject.Directory}/{project.OutputPath}ProjectAndSolution.dll".EnsureForwardSlashes();
Assert.Equal(expectedTargetPath, project.TargetPath.EnsureForwardSlashes());
Assert.Equal("Debug", project.Configuration);
Assert.Equal("AnyCPU", project.Platform);
Assert.True(project.IsExe);
Assert.False(project.IsUnityProject);
Assert.Equal(".NETCoreApp,Version=v2.1", project.TargetFramework);
var targetFramework = Assert.Single(project.TargetFrameworks);
Assert.Equal("netcoreapp2.1", targetFramework.ShortName);
}
}
to ensure OmniSharp loads it correctly

@333fred
Copy link
Contributor

333fred commented Oct 24, 2020

Hmm @sharwell that new test failure is the same one that I observed locally, that went away on re-run :/

@filipw
Copy link
Member

filipw commented Mar 26, 2021

superseded by #2121

@filipw filipw closed this Mar 26, 2021
@sharwell sharwell deleted the slnf branch March 26, 2021 21:18
@sharwell
Copy link
Contributor Author

@filipw works for me thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants