Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Runtime.CompilerServices.IsExternalInit is not defined or imported #4

Open
lucasmontec-fortis opened this issue Jan 19, 2024 · 1 comment

Comments

@lucasmontec-fortis
Copy link

Hey! Thanks for the project!
I'm getting this error as soon as I import it:

Library\PackageCache\com.sator-imaging.alt-source-generator@4fcd4088cd\Runtime\USGContext.cs(8,40): error CS0518: Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported

@lucasmontec-fortis
Copy link
Author

I was able to fix this by importing your package as a custom package and adding the following class to it:

#if NETSTANDARD2_0 || NETSTANDARD2_1 || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NETCOREAPP3_0 || NETCOREAPP3_1 || NET45 || NET451 || NET452 || NET6 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48

using System.ComponentModel;

namespace System.Runtime.CompilerServices
{
    [EditorBrowsable(EditorBrowsableState.Never)]
    internal static class IsExternalInit { }
}

#endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant