importing 'asset swap tool' (asset store originals asset) from unity asset store gives errors on build (build failed). any fixes?

I imported the tool and tried to build right away on versions 2019.1.11f1 and 2019.2.11f1 and both gave same results.
Errors i get are,

  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapShader.cs(6,19): error CS0234: The type or namespace name ‘PackageManager’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapShader.cs(7,19): error CS0234: The type or namespace name ‘PackageManager’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapShader.cs(8,19): error CS0234: The type or namespace name ‘Compilation’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapTool.cs(7,19): error CS0234: The type or namespace name ‘PackageManager’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapTool.cs(8,19): error CS0234: The type or namespace name ‘PackageManager’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapTool.cs(9,19): error CS0234: The type or namespace name ‘Compilation’ does not exist in the namespace ‘UnityEditor’ (are you missing an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\UnpackNestedPrefab.cs(11,39): error CS0246: The type or namespace name ‘EditorWindow’ could not be found (are you missing a using directive or an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapTool.cs(15,29): error CS0246: The type or namespace name ‘EditorWindow’ could not be found (are you missing a using directive or an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapTool.cs(550,10): error CS0246: The type or namespace name ‘MenuItemAttribute’ could not be found (are you missing a using directive or an assembly reference?)
  • Assets\AssetStoreOriginals_SNAPS_Tools\AssetSwapTool\Scripts\SwapTool.cs(550,10): error CS0246: The type or namespace name ‘MenuItem’ could not be found (are you missing a using directive or an assembly reference?)
  • Error building Player because scripts had compiler errors
  • Build completed with a result of ‘Failed’
  • UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    UnityEditor.BuildPlayerWindow+BuildMethodException: 11 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
    UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This is really frustrating. any fixes? :confused:

I have the exact same error!
Unity version 2019.2.13

Edit

The problem was in the package “Asset Swap Tool” and the publisher solved the issue for me. Thank you

Here are the steps that can help you resolve the issue:

  1. Make folder named “Editor” at “Assets/AssetStoreOriginals/_SNAPS_Tools/AssetSwapTool/Scripts”
  2. Move all script files to that newly created “Editor” folder

@theprince41227 Replace Where you see “OnlyUserModifiable” with “Editable” on SwapTool.cs script. save it and it should start working.