Open yodantauber opened 10 years ago
configurations {
Something {
choices : { X1, X2 };
//description = "statically dynamically";
description = "abc11943073q98475983rtkjgxdfkjlghk";
X1.description = "zzz";
X2.description = "yy";
}
}
nuget {
nuspec {
id = PropertySheetBug;
version : 1.1.2;
title: Property Sheet Bug;
tags: { native };
projectUrl: "http://www.example.com";
iconUrl: "http://www.example.com";
licenseUrl: "http://www.example.com";
releaseNotes: "";
description: "Property Sheet Bug";
};
files {
[X1] {
lib: 1.lib;
}
[X2] {
lib: 2.lib;
}
};
}
Oh, you've uncovered my dark little secret hack...
In order to provide some support for ensuring that the consumer is using the correct runtime library (since the four RTs in MSVC aren't link-time compatible ... $%($%^()%!! ) I check to see if the word 'static' or 'ltcg' is in the propertysheet, and if it is, I insert another sheet that looks like this:
// Implicity loaded template script for Autopackage
nuget := {
targets {
[Debug,static] {
ExpectedRuntimeLibrary = MultiThreadedDebug;
}
[Release,static] {
ExpectedRuntimeLibrary = MultiThreaded;
}
}
}
which ... triggers the pivot used for static
, fooling the part of the code that builds the XAML that handles the UI for the properties window.
I was hoping that I could get away with this until I could go back and figure a cleaner workaround.
I'm so very ashamed. :(
This is given me some problems when trying to link Boost statically but with a Dynamic runtime, is it possible to avoid this behavior?
Steps to reproduce:
Expected: there is exactly one setting - "Something", which is indeed used by the package. Actual: there is one more setting besides "Something", which is "Linkage". It is not used by the package and seems to come out of nowhere.
Weird note: repeat this experiment with the commented line entirely removed. Alternatively, change the description (within the commented line) from "statically dynamically" to something else. Either way, the "Linkage" setting will no longer be generated!