Handle per configuration package references when genning projects.
This commit is contained in:
parent
77b1c3fe3b
commit
d3ca896dd0
|
|
@ -185,6 +185,8 @@ functions
|
||||||
|
|
||||||
foreach (var pair in configs)
|
foreach (var pair in configs)
|
||||||
{
|
{
|
||||||
|
var allPackageReferences = new Dictionary<string, string>(packageReferences);
|
||||||
|
|
||||||
var targetFramework = pair.Key;
|
var targetFramework = pair.Key;
|
||||||
var props = (IDictionary<string, object>)pair.Value;
|
var props = (IDictionary<string, object>)pair.Value;
|
||||||
|
|
||||||
|
|
@ -197,10 +199,16 @@ functions
|
||||||
{
|
{
|
||||||
if (!projectMapping.ContainsKey(dep.Key))
|
if (!projectMapping.ContainsKey(dep.Key))
|
||||||
{
|
{
|
||||||
if(String.IsNullOrEmpty((string)dep.Value))
|
var version = (string)dep.Value;
|
||||||
|
|
||||||
|
if(String.IsNullOrEmpty(version))
|
||||||
{
|
{
|
||||||
gacReferences.Add(dep.Key);
|
gacReferences.Add(dep.Key);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
allPackageReferences[dep.Key] = version;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -215,7 +223,7 @@ functions
|
||||||
.Replace("{ExtraProperties}", extraProperties)
|
.Replace("{ExtraProperties}", extraProperties)
|
||||||
.Replace("{Files}", filesString)
|
.Replace("{Files}", filesString)
|
||||||
.Replace("{ProjectReferences}", BuildProjectReferences(projectReferences, targetFramework, projectMapping))
|
.Replace("{ProjectReferences}", BuildProjectReferences(projectReferences, targetFramework, projectMapping))
|
||||||
.Replace("{References}", BuildReferences(packageReferences, gacReferences, packagesDir, targetFramework, GetCandidates(targetFramework)));
|
.Replace("{References}", BuildReferences(allPackageReferences, gacReferences, packagesDir, targetFramework, GetCandidates(targetFramework)));
|
||||||
|
|
||||||
if (targetFramework.StartsWith("k"))
|
if (targetFramework.StartsWith("k"))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue