If I open a saved project with pinned tabs restored from my last session, when I next run my solution the pinned tabs become unpinned. Is there a way to turn this behavior off?
I had the same problem and found the answer here
Go to Tools -> Options -> Environment -> Tabs and Windows
and make sure "Maintain pin status if document is removed from well" is checked.
Accepted answer solved it for me in previous versions, but in VS2017, also ensure you don't have "lightweight solution load" enabled.
To disable, right-click the solution in Solution explorer, then choose "Disable Lightweight Solution Load" if it's available (probably right down the bottom of the menu).
My guess is when the pin tabs attempt to be restored during VS startup, if the project hasn't been loaded yet, it can't pin them.