Browse Source

Add VS Solution file fix

2019.3.12 introduced an issue for cross asmdef references within visual studio. The added AssetPostprocessor corrects the issue.
master
shalliwell 5 years ago
parent
commit
7e24d157f8
  1. 17
      Assets/Fungus/Scripts/Editor/SolutionFileFixer.cs
  2. 11
      Assets/Fungus/Scripts/Editor/SolutionFileFixer.cs.meta

17
Assets/Fungus/Scripts/Editor/SolutionFileFixer.cs

@ -0,0 +1,17 @@
using UnityEditor;
#if UNITY_2019_3_12
namespace Fungus.EditorUtils
{
//fix for a bug introduced in unity 2019.3.12 that prevents cross asmdef references from showing
// doco and code hinting correctly in vs2019
// https://forum.unity.com/threads/2019-3-12f1-build-errors.880312/
public class SolutionFileFixer : AssetPostprocessor
{
private static string OnGeneratedCSProject(string path, string content)
{
return content.Replace("<ReferenceOutputAssembly>false</ReferenceOutputAssembly>", "<ReferenceOutputAssembly>true</ReferenceOutputAssembly>");
}
}
}
#endif

11
Assets/Fungus/Scripts/Editor/SolutionFileFixer.cs.meta

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 016e0ddcf2101ba4a8d50bf1f440f5c5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save