Comments (3)
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.
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.
@kleve-ops would DOTNET_ROOT
be acceptable? It seems like the more appropriate environment variable for our use.
from t4.
Related Issues (20)
- Is `dotnet-t4-project-tool` deprecated? HOT 2
- Packages on NuGet are too old HOT 3
- Version 2.3.0 does not respect output extension HOT 1
- Broken files generation in version 2.3.0 - Could not load file or assembly System.Text.Json HOT 1
- The type name 'SqlClientFactory' could not be found in the namespace 'System.Data.SqlClient' - Nuget references? HOT 2
- #line annotations no longer generated with relative paths with dotnet-t4 HOT 3
- MsBuild package release ? HOT 6
- ERROR: Metadata file 'Microsoft.EntityFrameworkCore.dll' could not be found HOT 1
- Specifying RuntimeIdentifier causes the CodeCompiler to fail
- Copyright notice missing from Nuget package
- Runtime Template Class Not Working HOT 1
- Support for C# 11
- Restore option to load assembly into the current AppDomain
- Preview 3.0.0-preview-0027-g2711105671 generates warning when building against .NET 8
- T4/BuildTools is missing build target files
- T4.BuildTools OutputDirectory/OutputFileName HOT 1
- T4.BuildTools fails to generate preprocessed files in obj dir.
- T4.BuildTools No way to override default namespace for preprocessed templates.
- Optimise inclusion of System.CodeDom
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from t4.