You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// this should get us something like /usr/local/share/dotnet/shared/Microsoft.NETCore.App/5.0.0
var runtimeDir = Path.GetDirectoryName (typeof (object).Assembly.Location);
Path.GetDirectoryName (typeof (object).Assembly.Location) don't give the the path to the .net installation. It's pointing into my App bin folder. So we need a way to set the path to the dotnet installation folder or we should have the option to override static RuntimeInfo GetDotNetCoreSdk (). I am happy if one of you can tell me how I come around this execption:Mono.TextTemplating.TemplatingEngineException: Not a valid .NET Core host
at Mono.TextTemplating.TemplatingEngine.GetOrCreateCompiler() in /_/Mono.TextTemplating/Mono.TextTemplating/TemplatingEngine.cs:line 67
The text was updated successfully, but these errors were encountered:
OK, if I build the stuff under Windows for Linux then this problem is gone. Looks like that's a problem with the none standard .net6 installation on my Linux machine.
Now the only problem is that PublishSingleFile is not working. Here the Assemblyname is null. Need to adapt the detection of assenbly refs in SIngleFile context.
OK, the problem with GetDotNetCoreSdk () still exists. To solve this please add:
static RuntimeInfo GetDotNetCoreSdk ()
{
static bool DotnetRootIsValid (string root) => !string.IsNullOrEmpty (root) && (File.Exists (Path.Combine (root, "dotnet")) || File.Exists (Path.Combine (root, "dotnet.exe")));
// this should get us something like /usr/local/share/dotnet/shared/Microsoft.NETCore.App/5.0.0
var runtimeDir = Path.GetDirectoryName (typeof (object).Assembly.Location);
if (!runtimeDir.Contains ("Microsoft.NETCore.App") && Environment.GetEnvironmentVariable ("DOTNET_HOST_PATH") != null) {
runtimeDir = Environment.GetEnvironmentVariable ("DOTNET_HOST_PATH");
}
var dotnetRoot = Path.GetDirectoryName (Path.GetDirectoryName (Path.GetDirectoryName (runtimeDir)));
With that solution we have a workaround via "DOTNET_HOST_PATH".
inside
static RuntimeInfo GetDotNetCoreSdk ()
{
static bool DotnetRootIsValid (string root) => !string.IsNullOrEmpty (root) && (File.Exists (Path.Combine (root, "dotnet")) || File.Exists (Path.Combine (root, "dotnet.exe")));
Path.GetDirectoryName (typeof (object).Assembly.Location) don't give the the path to the .net installation. It's pointing into my App bin folder. So we need a way to set the path to the dotnet installation folder or we should have the option to override static RuntimeInfo GetDotNetCoreSdk (). I am happy if one of you can tell me how I come around this execption:Mono.TextTemplating.TemplatingEngineException: Not a valid .NET Core host
at Mono.TextTemplating.TemplatingEngine.GetOrCreateCompiler() in /_/Mono.TextTemplating/Mono.TextTemplating/TemplatingEngine.cs:line 67
The text was updated successfully, but these errors were encountered: