Add AssemblyName to ProjectContext
This commit is contained in:
parent
8be3b16756
commit
329b65fc69
|
|
@ -22,6 +22,7 @@ namespace Microsoft.Extensions.ProjectModel
|
|||
string PackageLockFile { get; }
|
||||
string PackagesDirectory { get; }
|
||||
string TargetDirectory { get; }
|
||||
string AssemblyName { get; }
|
||||
string AssemblyFullPath { get; }
|
||||
IEnumerable<string> CompilationItems { get; }
|
||||
IEnumerable<string> EmbededItems { get; }
|
||||
|
|
|
|||
|
|
@ -66,7 +66,9 @@ namespace Microsoft.Extensions.ProjectModel
|
|||
public string RuntimeConfigJson => _paths.RuntimeFiles.RuntimeConfigJson;
|
||||
public string PackagesDirectory => _projectContext.PackagesDirectory;
|
||||
public string PackageLockFile => Path.Combine(Path.GetDirectoryName(ProjectFullPath), "project.lock.json");
|
||||
|
||||
public string AssemblyName => string.IsNullOrEmpty(AssemblyFullPath)
|
||||
? ProjectName
|
||||
: Path.GetFileNameWithoutExtension(AssemblyFullPath);
|
||||
public string AssemblyFullPath =>
|
||||
!IsClassLibrary && (_projectContext.IsPortable || TargetFramework.IsDesktop())
|
||||
? _paths.RuntimeFiles.Executable
|
||||
|
|
|
|||
|
|
@ -73,6 +73,9 @@ namespace Microsoft.Extensions.ProjectModel
|
|||
return Path.Combine(restoreOutputPath, "project.assets.json");
|
||||
}
|
||||
}
|
||||
public string AssemblyName => string.IsNullOrEmpty(AssemblyFullPath)
|
||||
? ProjectName
|
||||
: Path.GetFileNameWithoutExtension(AssemblyFullPath);
|
||||
public string AssemblyFullPath => FindProperty("TargetPath");
|
||||
public string Platform => FindProperty("Platform");
|
||||
public string ProjectFullPath => Project.FullPath;
|
||||
|
|
|
|||
Loading…
Reference in New Issue