skel
This commit is contained in:
commit
1abdcd2cf5
7 changed files with 93 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
**/obj/
|
||||
**/bin/
|
||||
**/nupkg/
|
34
Nyanbyte.DotnetTools.sln
Normal file
34
Nyanbyte.DotnetTools.sln
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{2AD5DA86-152B-4BDE-A9B8-69C4C55EA3D2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nyanbyte.DotnetTools.Rename", "src\Nyanbyte.DotnetTools.Rename\Nyanbyte.DotnetTools.Rename.csproj", "{7D725AF0-6E40-4D59-971C-5AEEF9BD48F0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nyanbyte.DotnetTools.Update", "src\Nyanbyte.DotnetTools.Update\Nyanbyte.DotnetTools.Update.csproj", "{D6629033-647C-4848-83D4-97E20066F55E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{7D725AF0-6E40-4D59-971C-5AEEF9BD48F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7D725AF0-6E40-4D59-971C-5AEEF9BD48F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7D725AF0-6E40-4D59-971C-5AEEF9BD48F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7D725AF0-6E40-4D59-971C-5AEEF9BD48F0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D6629033-647C-4848-83D4-97E20066F55E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D6629033-647C-4848-83D4-97E20066F55E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D6629033-647C-4848-83D4-97E20066F55E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D6629033-647C-4848-83D4-97E20066F55E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{7D725AF0-6E40-4D59-971C-5AEEF9BD48F0} = {2AD5DA86-152B-4BDE-A9B8-69C4C55EA3D2}
|
||||
{D6629033-647C-4848-83D4-97E20066F55E} = {2AD5DA86-152B-4BDE-A9B8-69C4C55EA3D2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# dotnet-tools
|
||||
|
||||
A collection of .NET utilities.
|
|
@ -0,0 +1,14 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<PackAsTool>true</PackAsTool>
|
||||
<ToolCommandName>rename</ToolCommandName>
|
||||
<PackageOutputPath>./nupkg</PackageOutputPath>
|
||||
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
27
src/Nyanbyte.DotnetTools.Rename/Program.cs
Normal file
27
src/Nyanbyte.DotnetTools.Rename/Program.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using System.Reflection.Metadata.Ecma335;
|
||||
|
||||
namespace Nyanbyte.DotnetTools.Rename;
|
||||
|
||||
public class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
DirectoryInfo dir = new(Environment.CurrentDirectory);
|
||||
|
||||
DirectoryInfo? parent = dir;
|
||||
List<FileInfo> projs;
|
||||
|
||||
do
|
||||
{
|
||||
var files = parent.GetFiles().Where(f => f.Extension == "sln" || f.Extension == "csproj");
|
||||
projs = files.ToList();
|
||||
} while ((parent = dir.Parent) != null);
|
||||
|
||||
if (projs is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
FileInfo? sln = projs.SingleOrDefault(f => f.Extension == "sln");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
2
src/Nyanbyte.DotnetTools.Update/Program.cs
Normal file
2
src/Nyanbyte.DotnetTools.Update/Program.cs
Normal file
|
@ -0,0 +1,2 @@
|
|||
// See https://aka.ms/new-console-template for more information
|
||||
Console.WriteLine("Hello, World!");
|
Loading…
Reference in a new issue