Prep for a csproj/sln file fixer for Visual Studio Code. Needs to write out the csproj/sln files in a manner that works. For reference, Xamarin created solutions/projects work fine.
using UnityEngine;
using UnityEditor;
using System.IO;
public class FixGeneratedSolutionSettings : AssetPostprocessor
{
// Undocumented callback, courtesy of Matt Rix astute decompilation of Unity DLLs.
private static void OnGeneratedCSProjectFiles()
{
var currentDir = Directory.GetCurrentDirectory();
foreach( var filePath in Directory.GetFiles( currentDir, "*.sln" ) )
fixSolution( filePath );
foreach( var filePath in Directory.GetFiles( currentDir, "*.csproj" ) )
fixProject( filePath );
}
static void fixProject( string filePath )
{
// FIX PROJECT FILES HERE
}
static void fixSolution( string filePath )
{
// FIX SOLUTION FILES HERE
}
}