Coder Social home page Coder Social logo

Comments (3)

kleve-ops avatar kleve-ops commented on August 16, 2024

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.

from t4.

kleve-ops avatar kleve-ops commented on August 16, 2024

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".

from t4.

mhutch avatar mhutch commented on August 16, 2024

@kleve-ops would DOTNET_ROOT be acceptable? It seems like the more appropriate environment variable for our use.

from t4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.