Fixed the bad csprojects so both can build just fine, and cleaned up unused usings

This commit is contained in:
Chris Bell 2025-01-02 23:21:09 -06:00
parent 99ba6e1710
commit f1a4ea0a65
6 changed files with 17 additions and 6 deletions

View File

@ -7,12 +7,12 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute> <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="src\CogwheelLib.csproj" /> <Content Include="src\CogwheelLib.csproj" />
<Compile Remove="obj\Release\net9.0\CogwheelLib.GlobalUsings.g.cs" /> <Compile Remove="obj\**\*.AssemblyAttributes.cs" />
<Compile Remove="obj\Release\net9.0\CogwheelLib.AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,9 +1,12 @@
// Program.cs // Program.cs
using System.Reflection;
using Cogwheel; using Cogwheel;
ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole(); ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole();
CommandsManager commandsManager = new CommandsManager(); CommandsManager commandsManager = new CommandsManager();
commandsManager.AddAssembly(Assembly.GetExecutingAssembly());
COGWHEEL.Initialize(commandsManager, cogwheelConsole); COGWHEEL.Initialize(commandsManager, cogwheelConsole);

View File

@ -1,3 +1,6 @@
using System;
using System.Linq;
namespace Cogwheel; namespace Cogwheel;
/// <summary> /// <summary>
@ -7,6 +10,8 @@ public static class COGWHEEL
{ {
private static CommandsManager _commandsManager; private static CommandsManager _commandsManager;
private static ICogwheelConsole _console; private static ICogwheelConsole _console;
public static bool UseBuiltInCommands { get; set; } = true;
/// <summary> /// <summary>
/// Initializes the Cogwheel system /// Initializes the Cogwheel system

View File

@ -6,9 +6,8 @@
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<Version>1.2.0</Version> <Version>1.2.0</Version>
<Authors>Chris Bell</Authors> <Authors>Chris Bell</Authors>
@ -23,8 +22,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="obj\Release\net9.0\CogwheelLib.GlobalUsings.g.cs" /> <Compile Remove="obj\**\*.AssemblyAttributes.cs" />
<Compile Remove="obj\Release\net9.0\CogwheelLib.AssemblyInfo.cs" />
<None Include="changelog.md" Pack="true" PackagePath="" /> <None Include="changelog.md" Pack="true" PackagePath="" />
</ItemGroup> </ItemGroup>

View File

@ -1,3 +1,5 @@
using System;
namespace Cogwheel; namespace Cogwheel;
/// <summary> /// <summary>

View File

@ -1,3 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;