mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-02-08 05:30:59 -05:00
We were only adding that prefix when publishing, so people joining servers would load both the published "package.library.x" and "package.x" assemblies.
45 lines
1.1 KiB
C#
45 lines
1.1 KiB
C#
namespace Sandbox;
|
|
|
|
public static class CompilerExtensions
|
|
{
|
|
/// <summary>
|
|
/// Add a reference to the "<c>base</c>" package.
|
|
/// </summary>
|
|
public static void AddBaseReference( this Compiler compiler )
|
|
{
|
|
compiler.AddReference( "package.base" );
|
|
}
|
|
|
|
/// <summary>
|
|
/// Add a reference to the "<c>toolbase</c>" package.
|
|
/// </summary>
|
|
public static void AddToolBaseReference( this Compiler compiler )
|
|
{
|
|
compiler.AddReference( "package.toolbase" );
|
|
}
|
|
|
|
/// <summary>
|
|
/// Add a reference to the given compiler.
|
|
/// </summary>
|
|
public static void AddReference( this Compiler compiler, Compiler reference )
|
|
{
|
|
compiler.AddReference( reference.AssemblyName );
|
|
}
|
|
|
|
/// <summary>
|
|
/// Add a reference to the given package's assembly.
|
|
/// </summary>
|
|
public static void AddReference( this Compiler compiler, Package reference )
|
|
{
|
|
compiler.AddReference( reference.AssemblyName );
|
|
}
|
|
|
|
/// <summary>
|
|
/// Add a reference to the given package's editor assembly.
|
|
/// </summary>
|
|
public static void AddEditorReference( this Compiler compiler, Package reference )
|
|
{
|
|
compiler.AddReference( reference.EditorAssemblyName );
|
|
}
|
|
}
|