Bugfix: Creating a C# Mercury project followed by a new VB Mercury project throws exception
Bugfix: Creating a C# Mercury project followed by a new VB Mercury project throws exception

If an open file is a linked file and that document or its project is unloaded, then we determine the new active context document for that linked file and switch the context. Following the same process during solution close may fail because the host document for the new active context document may have already been removed. There is no need to set the updated document context during solution close so we now skip this step in that case. (changeset 1251204)

mattwar/roslyn,lorcanmooney/roslyn,srivatsn/roslyn,VitalyTVA/roslyn,xasx/roslyn,zooba/roslyn,khyperia/roslyn,HellBrick/roslyn,diryboy/roslyn,pjmagee/roslyn,Inverness/roslyn,VShangxiao/roslyn,xoofx/roslyn,dotnet/roslyn,leppie/roslyn,MavenRain/roslyn,doconnell565/roslyn,jramsay/roslyn,nemec/roslyn,GuilhermeSa/roslyn,dpoeschl/roslyn,JakeGinnivan/roslyn,akrisiun/roslyn,DavidKarlas/roslyn,stephentoub/roslyn,Pvlerick/roslyn,jasonmalinowski/roslyn,managed-commons/roslyn,enginekit/roslyn,wschae/roslyn,RipCurrent/roslyn,AlekseyTs/roslyn,jaredpar/roslyn,mono/roslyn,basoundr/roslyn,v-codeel/roslyn,dpen2000/roslyn,nagyistoce/roslyn,MavenRain/roslyn,KashishArora/Roslyn,BugraC/roslyn,sharadagrawal/TestProject2,Felorati/roslyn,RipCurrent/roslyn,nagyistoce/roslyn,DanielRosenwasser/roslyn,SeriaWei/roslyn,rgani/roslyn,bbarry/roslyn,brettfo/roslyn,ManishJayaswal/roslyn,JohnHamby/roslyn,managed-commons/roslyn,YOTOV-LIMITED/roslyn,CyrusNajmabadi/roslyn,Pvlerick/roslyn,krishnarajbb/roslyn,orthoxerox/roslyn,yeaicc/roslyn,BugraC/roslyn,OmniSharp/roslyn,3F/roslyn,kuhlenh/roslyn,managed-commons/roslyn,weltkante/roslyn,ErikSchierboom/roslyn,3F/roslyn,heejaechang/roslyn,akrisiun/roslyn,zmaruo/roslyn,KevinH-MS/roslyn,akoeplinger/roslyn,KirillOsenkov/roslyn,chenxizhang/roslyn,pjmagee/roslyn,balajikris/roslyn,marksantos/roslyn,DustinCampbell/roslyn,tannergooding/roslyn,dotnet/roslyn,hanu412/roslyn,AlekseyTs/roslyn,devharis/roslyn,devharis/roslyn,tvand7093/roslyn,zooba/roslyn,akoeplinger/roslyn,cybernet14/roslyn,lisong521/roslyn,sharadagrawal/TestProject2,mgoertz-msft/roslyn,aanshibudhiraja/Roslyn,OmarTawfik/roslyn,lorcanmooney/roslyn,jeremymeng/roslyn,EricArndt/roslyn,pdelvo/roslyn,REALTOBIZ/roslyn,Inverness/roslyn,danielcweber/roslyn,kienct89/roslyn,tang7526/roslyn,nagyistoce/roslyn,mattwar/roslyn,jgglg/roslyn,ljw1004/roslyn,cston/roslyn,bbarry/roslyn,tmeschter/roslyn,davkean/roslyn,paulvanbrenk/roslyn,physhi/roslyn,robinsedlaczek/roslyn,tmat/roslyn,antonssonj/roslyn,genlu/roslyn,ManishJayaswal/roslyn,CaptainHayashi/roslyn,ilyes14/roslyn,VitalyTVA/roslyn,panopticoncentral/roslyn,dovzhikova/roslyn,enginekit/roslyn,JakeGinnivan/roslyn,SeriaWei/roslyn,leppie/roslyn,jeremymeng/roslyn,nemec/roslyn,KevinRansom/roslyn,vcsjones/roslyn,gafter/roslyn,taylorjonl/roslyn,MatthieuMEZIL/roslyn,AdamSpeight2008/roslyn-AdamSpeight2008,kelltrick/roslyn,wschae/roslyn,dpen2000/roslyn,rgani/roslyn,natidea/roslyn,furesoft/roslyn,DanielRosenwasser/roslyn,droyad/roslyn,taylorjonl/roslyn,pdelvo/roslyn,danielcweber/roslyn,agocke/roslyn,moozzyk/roslyn,huoxudong125/roslyn,jamesqo/roslyn,grianggrai/roslyn,mattscheffer/roslyn,AnthonyDGreen/roslyn,KiloBravoLima/roslyn,leppie/roslyn,EricArndt/roslyn,KevinRansom/roslyn,Shiney/roslyn,agocke/roslyn,stjeong/roslyn,srivatsn/roslyn,AArnott/roslyn,wvdd007/roslyn,davkean/roslyn,KamalRathnayake/roslyn,EricArndt/roslyn,supriyantomaftuh/roslyn,physhi/roslyn,basoundr/roslyn,natgla/roslyn,lisong521/roslyn,genlu/roslyn,KashishArora/Roslyn,MattWindsor91/roslyn,tang7526/roslyn,oocx/roslyn,MatthieuMEZIL/roslyn,magicbing/roslyn,MavenRain/roslyn,AlekseyTs/roslyn,natidea/roslyn,dsplaisted/roslyn,xasx/roslyn,paulvanbrenk/roslyn,robinsedlaczek/roslyn,jrharmon/roslyn,VSadov/roslyn,bartdesmet/roslyn,natgla/roslyn,bbarry/roslyn,FICTURE7/roslyn,Giten2004/roslyn,VSadov/roslyn,jkotas/roslyn,jramsay/roslyn,MichalStrehovsky/roslyn,sharwell/roslyn,MichalStrehovsky/roslyn,kuhlenh/roslyn,GuilhermeSa/roslyn,paulvanbrenk/roslyn,jonatassaraiva/roslyn,CaptainHayashi/roslyn,oocx/roslyn,DavidKarlas/roslyn,ericfe-ms/roslyn,stjeong/roslyn,eriawan/roslyn,genlu/roslyn,evilc0des/roslyn,lisong521/roslyn,TyOverby/roslyn,drognanar/roslyn,OmniSharp/roslyn,DinoV/roslyn,Giftednewt/roslyn,dovzhikova/roslyn,thomaslevesque/roslyn,ManishJayaswal/roslyn,JohnHamby/roslyn,tsdl2013/roslyn,aanshibudhiraja/Roslyn,jhendrixMSFT/roslyn,michalhosala/roslyn,grianggrai/roslyn,furesoft/roslyn,Maxwe11/roslyn,tmat/roslyn,tsdl2013/roslyn,davkean/roslyn,AArnott/roslyn,zmaruo/roslyn,jmarolf/roslyn,ValentinRueda/roslyn,jrharmon/roslyn,KevinRansom/roslyn,mono/roslyn,tannergooding/roslyn,oocx/roslyn,agocke/roslyn,tmat/roslyn,gafter/roslyn,jhendrixMSFT/roslyn,krishnarajbb/roslyn,mirhagk/roslyn,Felorati/roslyn,jamesqo/roslyn,jamesqo/roslyn,rchande/roslyn,paladique/roslyn,CyrusNajmabadi/roslyn,dpoeschl/roslyn,Hosch250/roslyn,sharwell/roslyn,Felorati/roslyn,heejaechang/roslyn,weltkante/roslyn,AArnott/roslyn,KamalRathnayake/roslyn,AmadeusW/roslyn,aelij/roslyn,DustinCampbell/roslyn,HellBrick/roslyn,VShangxiao/roslyn,evilc0des/roslyn,jhendrixMSFT/roslyn,devharis/roslyn,khyperia/roslyn,jaredpar/roslyn,panopticoncentral/roslyn,russpowers/roslyn,yeaicc/roslyn,budcribar/roslyn,swaroop-sridhar/roslyn,Giten2004/roslyn,eriawan/roslyn,amcasey/roslyn,poizan42/roslyn,weltkante/roslyn,JohnHamby/roslyn,HellBrick/roslyn,xasx/roslyn,AlexisArce/roslyn,jcouv/roslyn,yjfxfjch/roslyn,thomaslevesque/roslyn,supriyantomaftuh/roslyn,VPashkov/roslyn,danielcweber/roslyn,orthoxerox/roslyn,budcribar/roslyn,jasonmalinowski/roslyn,paladique/roslyn,Inverness/roslyn,jasonmalinowski/roslyn,pjmagee/roslyn,mgoertz-msft/roslyn,jkotas/roslyn,kelltrick/roslyn,Maxwe11/roslyn,supriyantomaftuh/roslyn,jbhensley/roslyn,mono/roslyn,OmarTawfik/roslyn,VitalyTVA/roslyn,garryforreg/roslyn,DanielRosenwasser/roslyn,jroggeman/roslyn,jbhensley/roslyn,mmitche/roslyn,mirhagk/roslyn,oberxon/roslyn,VPashkov/roslyn,bkoelman/roslyn,Shiney/roslyn,droyad/roslyn,poizan42/roslyn,pdelvo/roslyn,chenxizhang/roslyn,AmadeusW/roslyn,enginekit/roslyn,aelij/roslyn,dsplaisted/roslyn,nguerrera/roslyn,yetangye/roslyn,natidea/roslyn,reaction1989/roslyn,MattWindsor91/roslyn,swaroop-sridhar/roslyn,jramsay/roslyn,CaptainHayashi/roslyn,TyOverby/roslyn,jeremymeng/roslyn,natgla/roslyn,vcsjones/roslyn,bkoelman/roslyn,mattscheffer/roslyn,mseamari/Stuff,mirhagk/roslyn,oberxon/roslyn,drognanar/roslyn,jroggeman/roslyn,yetangye/roslyn,a-ctor/roslyn,1234-/roslyn,tannergooding/roslyn,ManishJayaswal/roslyn,VShangxiao/roslyn,orthoxerox/roslyn,MihaMarkic/roslyn-prank,stephentoub/roslyn,khellang/roslyn,tsdl2013/roslyn,JohnHamby/roslyn,drognanar/roslyn,russpowers/roslyn,AdamSpeight2008/roslyn-AdamSpeight2008,brettfo/roslyn,nguerrera/roslyn,heejaechang/roslyn,SeriaWei/roslyn,dpen2000/roslyn,jgglg/roslyn,MichalStrehovsky/roslyn,evilc0des/roslyn,huoxudong125/roslyn,Giftednewt/roslyn,xoofx/roslyn,ErikSchierboom/roslyn,dsplaisted/roslyn,vslsnap/roslyn,v-codeel/roslyn,jkotas/roslyn,michalhosala/roslyn,tvand7093/roslyn,krishnarajbb/roslyn,ericfe-ms/roslyn,AmadeusW/roslyn,michalhosala/roslyn,jeffanders/roslyn,ericfe-ms/roslyn,stephentoub/roslyn,ahmedshuhel/roslyn,jmarolf/roslyn,eriawan/roslyn,magicbing/roslyn,OmniSharp/roslyn,MattWindsor91/roslyn,jgglg/roslyn,Maxwe11/roslyn,REALTOBIZ/roslyn,russpowers/roslyn,BugraC/roslyn,thomaslevesque/roslyn,FICTURE7/roslyn,jeffanders/roslyn,dpoeschl/roslyn,hanu412/roslyn,YOTOV-LIMITED/roslyn,swaroop-sridhar/roslyn,Hosch250/roslyn,GuilhermeSa/roslyn,REALTOBIZ/roslyn,nemec/roslyn,stebet/roslyn,diryboy/roslyn,Giten2004/roslyn,balajikris/roslyn,a-ctor/roslyn,vcsjones/roslyn,MatthieuMEZIL/roslyn,1234-/roslyn,tvand7093/roslyn,ahmedshuhel/roslyn,mavasani/roslyn,wvdd007/roslyn,OmarTawfik/roslyn,ahmedshuhel/roslyn,yjfxfjch/roslyn,khellang/roslyn,jaredpar/roslyn,rchande/roslyn,jrharmon/roslyn,mmitche/roslyn,stjeong/roslyn,akrisiun/roslyn,diryboy/roslyn,bkoelman/roslyn,Shiney/roslyn,garryforreg/roslyn,DinoV/roslyn,antiufo/roslyn,jbhensley/roslyn,mavasani/roslyn,KiloBravoLima/roslyn,rchande/roslyn,abock/roslyn,jeffanders/roslyn,TyOverby/roslyn,Giftednewt/roslyn,mgoertz-msft/roslyn,amcasey/roslyn,antonssonj/roslyn,Pvlerick/roslyn,Hosch250/roslyn,akoeplinger/roslyn,cston/roslyn,budcribar/roslyn,v-codeel/roslyn,panopticoncentral/roslyn,KevinH-MS/roslyn,physhi/roslyn,khyperia/roslyn,kuhlenh/roslyn,3F/roslyn,YOTOV-LIMITED/roslyn,rgani/roslyn,ljw1004/roslyn,ValentinRueda/roslyn,cston/roslyn,sharadagrawal/Roslyn,mavasani/roslyn,DavidKarlas/roslyn,yetangye/roslyn,CyrusNajmabadi/roslyn,furesoft/roslyn,reaction1989/roslyn,basoundr/roslyn,mmitche/roslyn,ljw1004/roslyn,jcouv/roslyn,AdamSpeight2008/roslyn-AdamSpeight2008,jonatassaraiva/roslyn,FICTURE7/roslyn,zmaruo/roslyn,garryforreg/roslyn,KamalRathnayake/roslyn,marksantos/roslyn,tmeschter/roslyn,cybernet14/roslyn,abock/roslyn,AlexisArce/roslyn,mattscheffer/roslyn,jroggeman/roslyn,marksantos/roslyn,sharadagrawal/Roslyn,AlexisArce/roslyn,DinoV/roslyn,chenxizhang/roslyn,srivatsn/roslyn,AnthonyDGreen/roslyn,moozzyk/roslyn,yetangye/roslyn,dovzhikova/roslyn,lorcanmooney/roslyn,huoxudong125/roslyn,nguerrera/roslyn,aelij/roslyn,vslsnap/roslyn,doconnell565/roslyn,sharadagrawal/Roslyn,tang7526/roslyn,yeaicc/roslyn,antiufo/roslyn,bartdesmet/roslyn,mseamari/Stuff,doconnell565/roslyn,grianggrai/roslyn,xoofx/roslyn,jmarolf/roslyn,droyad/roslyn,amcasey/roslyn,MihaMarkic/roslyn-prank,1234-/roslyn,abock/roslyn,bartdesmet/roslyn,a-ctor/roslyn,cybernet14/roslyn,balajikris/roslyn,shyamnamboodiripad/roslyn,KashishArora/Roslyn,paladique/roslyn,antonssonj/roslyn,shyamnamboodiripad/roslyn,aanshibudhiraja/Roslyn,kienct89/roslyn,DustinCampbell/roslyn,gafter/roslyn,MihaMarkic/roslyn-prank,hanu412/roslyn,KirillOsenkov/roslyn,ilyes14/roslyn,wvdd007/roslyn,ilyes14/roslyn,brettfo/roslyn,mattwar/roslyn,stebet/roslyn,ValentinRueda/roslyn,taylorjonl/roslyn,MattWindsor91/roslyn,oberxon/roslyn,tmeschter/roslyn,DavidKarlas/roslyn,RipCurrent/roslyn,AnthonyDGreen/roslyn,stebet/roslyn,mseamari/Stuff,jonatassaraiva/roslyn,jcouv/roslyn,ErikSchierboom/roslyn,KiloBravoLima/roslyn,khellang/roslyn,zooba/roslyn,VPashkov/roslyn,yjfxfjch/roslyn,kelltrick/roslyn,reaction1989/roslyn,VSadov/roslyn,KevinH-MS/roslyn,robinsedlaczek/roslyn,sharwell/roslyn,magicbing/roslyn,dotnet/roslyn,poizan42/roslyn,JakeGinnivan/roslyn,KirillOsenkov/roslyn,vslsnap/roslyn,wschae/roslyn,kienct89/roslyn,moozzyk/roslyn,antiufo/roslyn,shyamnamboodiripad/roslyn,sharadagrawal/TestProject2