Open yodantauber opened 10 years ago
And now the promised autopkg script:
configurations {
//Something {
// choices : { X1, X2};
//};
}
nuget {
nuspec {
id = PropertySheetBug;
version : 1.0.1;
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;
//}
};
}
I'm pretty sure this is Visual Studio's fault. It tries to cache so much, that it breaks a ton when doing stuff like this.
Working around it's cache-ignorance is why the generated PropertyPageSchema xml files are names with GUIDs (which when you move from version to version, would at least force it to reload).
I think VS doesn't notice if you stop referencing a PropertyPageSchema xml ... I dunno what I could do about that.
What if a new GUID was generated whenever a package is created, even if nothing changes?
Well, I think the exact problem here, is that VS (or parts of VS) doesn't realize that the <Import>
ed .targets file has even changed (and hence won't go and re-evaluate the PPS xml files)
and since --reinstall doesn't physically change the <Import>
I don't even know if there is any way to kick it to check. I never found one when I was experimenting. (The VC++ folks were pretty sheepish when I mentioned this :D )
I've created NuGet packages in the past, btw, that create Import packages, and I've had this exact problem. Very frustrating. Didn't figure out a way to fix it. :-)
Steps to reproduce:
Update-Package PropertySheetBug -reinstall
. Examine output to make sure the package was successfully uninstalled and then installed again.Expected: there is now a "Referenced Packages" section with the "Something" property from the package. Actual: there is still no such section.
Note that this only seems to happen when keeping the same version number and using the
-reinstall
switch (which is common while developing a package).