Open davkean opened 7 years ago
Metadata As Source now follows the Code Style settings for using framework types or predefined types, this is actually an enhancement.
But changing the Code Style settings needs a restart to take effect, because the generated source is cached.
Can you dig in - there seems to be something up with the use framework types/use predefined types option serialization.
I believe it's caused by cache. I tried:
Now Visual Studio will notify you the file is changed and the new generated file will use the new Code Style settings.
This also affects LightBulb - for example "Generate local" now generates Object and String. Is it by design? If so - how to turn it off? I don't really like it.
@olegtk It affects everything, more or less. Option should be changed here:
So this is by design and we should just update our tests, right?
@olegtk: no, this is a bug. (That's why this bug is open on me. :smile:)
metadata as source respects the option, but any already generated files are not re-generated when you change options. I'll use this bug to track fixing the metadata as source service to delete old generated files once the option is changed.
@jmarolf This was tracking that default changed.
That was fixed by https://github.com/dotnet/roslyn/pull/16373. Keeping this to track refreshing when options change.
Metadata as source has started using "framework types" instead of "predefined types":
The former is current preview builds, the later is VS 2015.
I cannot figure out how to flip this setting back to what it was (predefined type preferences, which I thought would control this, does not).