Read compliationOptions per config.
This commit is contained in:
parent
c89af1568e
commit
921a848cce
|
|
@ -185,7 +185,6 @@ functions
|
||||||
var d = serializer.DeserializeObject(jsonText) as IDictionary<string, object>;
|
var d = serializer.DeserializeObject(jsonText) as IDictionary<string, object>;
|
||||||
var configs = GetObject(d, "configurations") ?? new Dictionary<string, object>();
|
var configs = GetObject(d, "configurations") ?? new Dictionary<string, object>();
|
||||||
var dependencies = GetObject(d, "dependencies") ?? new Dictionary<string, object>();
|
var dependencies = GetObject(d, "dependencies") ?? new Dictionary<string, object>();
|
||||||
var compilationOptions = GetObject(d, "compilationOptions") ?? new Dictionary<string, object>();
|
|
||||||
|
|
||||||
if(configs.Count == 0)
|
if(configs.Count == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -209,12 +208,6 @@ functions
|
||||||
.Select(r => r.Key)
|
.Select(r => r.Key)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var defines = Get<IEnumerable<object>>(compilationOptions, "define") ?? new object[0];
|
|
||||||
object unsafeValue = Get<object>(compilationOptions, "allowUnsafe");
|
|
||||||
bool allowUnsafeCode = unsafeValue == null ? false : (bool)unsafeValue;
|
|
||||||
|
|
||||||
string extraProperties = allowUnsafeCode ? "\n<AllowUnsafeBlocks>true</AllowUnsafeBlocks>" : "";
|
|
||||||
|
|
||||||
// HACK: Assume the packages folder is 2 up from the projectDir
|
// HACK: Assume the packages folder is 2 up from the projectDir
|
||||||
string packagesDir = Path.GetFullPath(Path.Combine(projectDir, "..", "..", "packages"));
|
string packagesDir = Path.GetFullPath(Path.Combine(projectDir, "..", "..", "packages"));
|
||||||
|
|
||||||
|
|
@ -225,6 +218,14 @@ functions
|
||||||
var targetFramework = pair.Key;
|
var targetFramework = pair.Key;
|
||||||
var props = (IDictionary<string, object>)pair.Value;
|
var props = (IDictionary<string, object>)pair.Value;
|
||||||
|
|
||||||
|
var compilationOptions = GetObject(props, "compilationOptions") ?? new Dictionary<string, object>();
|
||||||
|
|
||||||
|
var defines = Get<IEnumerable<object>>(compilationOptions, "define") ?? new object[0];
|
||||||
|
object unsafeValue = Get<object>(compilationOptions, "allowUnsafe");
|
||||||
|
bool allowUnsafeCode = unsafeValue == null ? false : (bool)unsafeValue;
|
||||||
|
|
||||||
|
string extraProperties = allowUnsafeCode ? "\n<AllowUnsafeBlocks>true</AllowUnsafeBlocks>" : "";
|
||||||
|
|
||||||
string id = (string)GetObject(projectMapping, projectName)[targetFramework];
|
string id = (string)GetObject(projectMapping, projectName)[targetFramework];
|
||||||
|
|
||||||
var specificDependencies = GetObject(props, "dependencies") ?? new Dictionary<string, object>();
|
var specificDependencies = GetObject(props, "dependencies") ?? new Dictionary<string, object>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue