Last active
April 24, 2019 08:17
-
-
Save eocron/2035ced18767b3ebe5508dac701a0dd6 to your computer and use it in GitHub Desktop.
References assembly through type reference, so assembly will be copied on build even, if it is not used explicitly (for example, plugins not used until some point in application, but need to be copied). Works in Release mode too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AssemblyReference | |
{ | |
/// <summary> | |
/// Installs reference to assembly in which specified type resides. | |
/// It will be copied on build even in release mode. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
[MethodImpl(MethodImplOptions.NoInlining)] | |
public static void Install<T>() | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment