Create a new project (e.g. C# console project)
Using the project's properties change the target framework to .NET 4.0
Create an empty ADO.NET Entity Data Model
Add 1 Entity with 1 property
Save everything (you will have a V2 EDMX because targeting .NET 4.0)
_Keeping the EDMX file open in the designer_ change the target framework to .NET 4.5
You will receive the info message that the namespaces have been updated _but_ the designer for the EDMX will be in "safe mode" - showing that it is unable to display the file. If you open this file in the XML Editor you will see that the namespaces have not in fact been changed.
Comments: After we retarget all the edmx files in the project we save contents of ones that are not open and we replace the contents of the buffers of the files that are open in VS. The replacement does not seem to be effective - even though I see the new content set in the debugger it does not show up in the VS. Also we set the file to dirty but it is not actually marked as dirty after the operation Note that the method is being used in a couple more places so there might be other code paths that are affected by this issue. Notes for investigation - I could not repro this on my box - I suspect Re# could be the reason - re-setting the buffer happens in VsUtils.WriteCheckoutFilesInProject
Using the project's properties change the target framework to .NET 4.0
Create an empty ADO.NET Entity Data Model
Add 1 Entity with 1 property
Save everything (you will have a V2 EDMX because targeting .NET 4.0)
_Keeping the EDMX file open in the designer_ change the target framework to .NET 4.5
You will receive the info message that the namespaces have been updated _but_ the designer for the EDMX will be in "safe mode" - showing that it is unable to display the file. If you open this file in the XML Editor you will see that the namespaces have not in fact been changed.
Comments: After we retarget all the edmx files in the project we save contents of ones that are not open and we replace the contents of the buffers of the files that are open in VS. The replacement does not seem to be effective - even though I see the new content set in the debugger it does not show up in the VS. Also we set the file to dirty but it is not actually marked as dirty after the operation Note that the method is being used in a couple more places so there might be other code paths that are affected by this issue. Notes for investigation - I could not repro this on my box - I suspect Re# could be the reason - re-setting the buffer happens in VsUtils.WriteCheckoutFilesInProject