Skip to content
Open
Show file tree
Hide file tree
Changes from all 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 ScipDotnet.Tests/ScipDotnet.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net10.0;net9.0;net8.0;net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
5 changes: 3 additions & 2 deletions ScipDotnet/IndexCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,14 @@ private static async Task ScipIndex(IHost host, IndexCommandOptions options)
}

private static string FixThisProblem(string examplePath) =>
"To fix this problem, pass the path of a solution (.sln) or project (.csproj/.vbrpoj) file to the `scip-dotnet index` command. " +
"To fix this problem, pass the path of a solution (.sln/.slnx) or project (.csproj/.vbrpoj) file to the `scip-dotnet index` command. " +
$"For example, run: scip-dotnet index {examplePath}";

private static List<FileInfo> FindSolutionOrProjectFile(FileInfo workingDirectory, ILogger logger)
{
var paths = Directory.GetFiles(workingDirectory.FullName).Where(file =>
string.Equals(Path.GetExtension(file), ".sln", StringComparison.OrdinalIgnoreCase) ||
string.Equals(Path.GetExtension(file), ".slnx", StringComparison.OrdinalIgnoreCase) ||
string.Equals(Path.GetExtension(file), ".csproj", StringComparison.OrdinalIgnoreCase) ||
string.Equals(Path.GetExtension(file), ".vbproj", StringComparison.OrdinalIgnoreCase)
).ToList();
Expand All @@ -133,7 +134,7 @@ private static List<FileInfo> FindSolutionOrProjectFile(FileInfo workingDirector
}

logger.LogError(
"No solution (.sln) or .csproj/.vbproj file detected in the working directory '{WorkingDirectory}'. {FixThis}",
"No solution (.sln/.slnx) or .csproj/.vbproj file detected in the working directory '{WorkingDirectory}'. {FixThis}",
workingDirectory.FullName, FixThisProblem("SOLUTION_FILE"));
return new List<FileInfo>();
}
Expand Down
2 changes: 1 addition & 1 deletion ScipDotnet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static async Task<int> Main(string[] args)
{
var indexCommand = new Command("index", "Index a solution file")
{
new Argument<FileInfo>("projects", "Path to the .sln (solution) or .csproj/.vbproj file")
new Argument<FileInfo>("projects", "Path to the .sln/.slnx (solution) or .csproj/.vbproj file")
{ Arity = ArgumentArity.ZeroOrMore },
new Option<string>("--output", () => "index.scip",
"Path to the output SCIP index file"),
Expand Down
14 changes: 7 additions & 7 deletions ScipDotnet/ScipDotnet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageType>DotnetTool</PackageType>
<TargetFrameworks>net10.0;net9.0;net8.0;net7.0;net6.0</TargetFrameworks>
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
<PackAsTool>true</PackAsTool>
<AssemblyName>scip-dotnet</AssemblyName>
<RepositoryUrl>https://github.com/sourcegraph/scip-dotnet</RepositoryUrl>
Expand All @@ -19,14 +19,14 @@
<None Include="../readme.md" Pack="true" PackagePath="" />
<PackageReference Include="Google.Protobuf" Version="3.30.0" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.7.8" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Features" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Features" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.CommandLine.Hosting" Version="0.4.0-alpha.22272.1" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="7.0.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="10.0.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion ScipDotnet/ScipProjectIndexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ScipProjectIndexer(ILogger<ScipProjectIndexer> logger) =>

private void Restore(IndexCommandOptions options, FileInfo project)
{
var arguments = project.Extension.Equals(".sln") ? $"restore {project.FullName} /p:EnableWindowsTargeting=true" : "restore /p:EnableWindowsTargeting=true";
var arguments = project.Extension.Equals(".sln") || project.Extension.Equals(".slnx") ? $"restore {project.FullName} /p:EnableWindowsTargeting=true" : "restore /p:EnableWindowsTargeting=true";
if (options.NugetConfigPath != null)
{
arguments += $" --configfile \"{options.NugetConfigPath.FullName}\"";
Expand Down