diff --git a/formatters/format-csharp.sh b/formatters/format-csharp.sh index 9cd06c508..8eb429ab8 100755 --- a/formatters/format-csharp.sh +++ b/formatters/format-csharp.sh @@ -6,20 +6,35 @@ echo "Formatting C# files..." dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" -if command -v dotnet-format &> /dev/null; then +if command -v dotnet &> /dev/null; then # Copy .editorconfig to C# directories cp .editorconfig ../spine-csharp/ 2>/dev/null || true cp .editorconfig ../spine-monogame/ 2>/dev/null || true cp .editorconfig ../spine-unity/ 2>/dev/null || true - dotnet-format ../spine-csharp/spine-csharp.sln || true - dotnet-format -f ../spine-monogame || true - dotnet-format -f ../spine-unity || true + # Format spine-csharp + cd ../spine-csharp && dotnet format spine-csharp.csproj || echo "Warning: Some issues with spine-csharp formatting" + cd ../formatters + + # Format spine-monogame + cd ../spine-monogame && dotnet format --no-restore || echo "Warning: Some issues with spine-monogame formatting" + cd ../formatters + + # Format spine-unity - look for .cs files directly + if [ -d ../spine-unity ]; then + echo "Formatting spine-unity C# files directly..." + cd ../spine-unity + # Find all .cs files and format them using dotnet format whitespace + find . -name "*.cs" -type f -not -path "./Library/*" -not -path "./Temp/*" -not -path "./obj/*" -not -path "./bin/*" | while read -r file; do + dotnet format whitespace --include "$file" --no-restore 2>/dev/null || true + done + cd ../formatters + fi # Clean up .editorconfig files rm -f ../spine-csharp/.editorconfig rm -f ../spine-monogame/.editorconfig rm -f ../spine-unity/.editorconfig else - echo "Warning: dotnet-format not found. Skipping C# formatting." + echo "Warning: dotnet not found. Skipping C# formatting." fi \ No newline at end of file diff --git a/spine-csharp/spine-csharp.csproj b/spine-csharp/spine-csharp.csproj index 546174f58..3522bef16 100644 --- a/spine-csharp/spine-csharp.csproj +++ b/spine-csharp/spine-csharp.csproj @@ -1,113 +1,20 @@ - - + + - {94144E22-2431-4A8F-AC04-DEC22F7EDD8F} - 9.0.21022 - 2.0 - Debug - x86 - Library - Properties + netstandard2.0 Spine spine-csharp - v4.8 - - - v4.0 - Windows - HiDef - 99dfd52d-8beb-4e5c-a68b-365be39e8064 - Library - - - 3.5 - - - - true - bin\Debug\ - DEBUG;TRACE;WINDOWS - true - full - AnyCPU - false - prompt - - - bin\Release\ - TRACE;WINDOWS - true - true - pdbonly - AnyCPU - false - prompt + false + false + - - - - 4.0 - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + \ No newline at end of file