Implement .NET 7 runtime support and bindings generation
This commit is contained in:
@@ -375,7 +375,9 @@ namespace FlaxEditor.Modules
|
||||
Thread.Sleep(0);
|
||||
|
||||
_workerThread.Join(1000);
|
||||
_workerThread.Abort();
|
||||
#if !USE_NETCORE
|
||||
_workerThread.Abort(); // Deprecated in .NET 7
|
||||
#endif
|
||||
_workerThread = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
{
|
||||
Profiler.BeginEvent("GetXmlDocs");
|
||||
|
||||
var uri = new UriBuilder(assembly.CodeBase);
|
||||
var uri = new UriBuilder(Utils.GetAssemblyLocation(assembly));
|
||||
var path = Uri.UnescapeDataString(uri.Path);
|
||||
var name = assembly.GetName().Name;
|
||||
var xmlFilePath = Path.Combine(Path.GetDirectoryName(path), name + ".xml");
|
||||
|
||||
@@ -391,9 +391,27 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
|
||||
private static bool HasAssemblyValidAnyTypes(Assembly assembly)
|
||||
{
|
||||
var codeBase = Utils.GetAssemblyLocation(assembly);
|
||||
#if USE_NETCORE
|
||||
if (assembly.ManifestModule.FullyQualifiedName == "<In Memory Module>")
|
||||
return false;
|
||||
|
||||
if (string.IsNullOrEmpty(codeBase))
|
||||
return true;
|
||||
|
||||
// Skip runtime related assemblies
|
||||
string repositoryUrl = assembly.GetCustomAttributes<AssemblyMetadataAttribute>().FirstOrDefault(x => x.Key == "RepositoryUrl")?.Value ?? "";
|
||||
if (repositoryUrl != "https://github.com/dotnet/runtime")
|
||||
return true;
|
||||
#else
|
||||
if (string.IsNullOrEmpty(codeBase))
|
||||
return true;
|
||||
|
||||
// Skip assemblies from in-build Mono directory
|
||||
var codeBase = assembly.CodeBase;
|
||||
return string.IsNullOrEmpty(codeBase) || !codeBase.Contains("/Mono/lib/mono/");
|
||||
if (!codeBase.Contains("/Mono/lib/mono/"))
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool HasAssemblyValidScriptingTypes(Assembly a)
|
||||
|
||||
Reference in New Issue
Block a user