Log.LogWarning ("Reference '{0}' not resolved", item.ItemSpec);
assembly_resolver.LogSearchLoggerMessages (MessageImportance.Normal);
} else {
- if (Environment.GetEnvironmentVariable ("XBUILD_LOG_REFERENCE_RESOLVER") != null)
- assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
-
Log.LogMessage (MessageImportance.Low,
"\tReference {0} resolved to {1}. CopyLocal = {2}",
item.ItemSpec, resolved_ref.TaskItem,
"\tReference found at search path {0}",
resolved_ref.FoundInSearchPathAsString);
+ assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
+
if (TryAddNewReference (tempResolvedFiles, resolved_ref) &&
!IsFromGacOrTargetFramework (resolved_ref) &&
resolved_ref.FoundInSearchPath != SearchPath.PkgConfig) {
continue;
}
- if (Environment.GetEnvironmentVariable ("XBUILD_LOG_REFERENCE_RESOLVER") != null)
- assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
+ assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
ResolvedReference rr = assembly_resolver.GetResolvedReference (item, item.ItemSpec, aname, true,
SearchPath.RawFileName);
continue;
ResolvedReference resolved_ref = ResolveDependencyByAssemblyName (
- aname, asm.FullName, parent_copy_local);
+ aname, asm.FullName, parent_copy_local);
- if (resolved_ref != null && !IsFromGacOrTargetFramework (resolved_ref)
- && resolved_ref.FoundInSearchPath != SearchPath.PkgConfig) {
+ if (IncludeDependencies (resolved_ref, aname.FullName)) {
tempResolvedDepFiles[resolved_ref.AssemblyName.FullName] = resolved_ref.TaskItem;
dependencies.Enqueue (resolved_ref.TaskItem.ItemSpec);
}
resolved_ref = ResolveReference (item, dependency_search_paths, false);
if (resolved_ref != null) {
- if (Environment.GetEnvironmentVariable ("XBUILD_LOG_REFERENCE_RESOLVER") != null)
- assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
-
Log.LogMessage (MessageImportance.Low, "\tReference {0} resolved to {1}.",
aname, resolved_ref.TaskItem.ItemSpec);
"\tReference found at search path {0}",
resolved_ref.FoundInSearchPathAsString);
+ assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
+
if (resolved_ref.FoundInSearchPath == SearchPath.Directory) {
// override CopyLocal with parent's val
SetCopyLocal (resolved_ref.TaskItem, parent_copy_local);
} else {
//gac or tgtfmwk
Log.LogMessage (MessageImportance.Low,
- "\tThis is CopyLocal false as it is in the gac," +
+ "\tThis is CopyLocal false as it is in the GAC," +
"target framework directory or provided by a package.");
TryAddNewReference (tempResolvedFiles, resolved_ref);
}
} else {
- Log.LogWarning ("Reference '{0}' not resolved", aname);
- assembly_resolver.LogSearchLoggerMessages (MessageImportance.Normal);
+ Log.LogMessage (MessageImportance.Low, "Could not resolve the assembly \"{0}\".", aname);
+ assembly_resolver.LogSearchLoggerMessages (MessageImportance.Low);
}
return resolved_ref;
return;
foreach (string ext in allowedRelatedFileExtensions) {
- string rfile = filename + ext;
+ string rfile = Path.ChangeExtension (filename, ext);
if (File.Exists (rfile)) {
ITaskItem item = new TaskItem (rfile);
SetCopyLocal (item, parent_copy_local);
rr.FoundInSearchPath == SearchPath.TargetFrameworkDirectory;
}
+ bool IncludeDependencies (ResolvedReference rr, string aname)
+ {
+ if (rr == null)
+ return false;
+ if (aname.Equals ("System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"))
+ return true;
+ return !IsFromGacOrTargetFramework (rr) && rr.FoundInSearchPath != SearchPath.PkgConfig;
+ }
+
void LogTaskParameters ()
{
Log.LogMessage (MessageImportance.Low, "TargetFrameworkDirectories:");