问题
I have a web site on Framework 4.5.1. When I compile I have a missing assembly reference error for System.Data.DataExtensions.
So I go to add a reference tick the box close the dialog , recompile. Same assembly is missing again. Go back to references and the assembly is no longer ticked. It does add it the the web.config but the reference always disappears.
I came across this link similar issue but the solution was only having using System.Data instead of using System.Data.DataExtensions. But my using statement are already only System.Data.
Can anyone assist ?
回答1:
Ok it seems that when the project was migrated to 4.5.1 framework the web config file wasn't update and still contains a reference to the 3.0 framework. That is what was is preventing the assembly reference being added.
Upgrading the framework seems not to update the web config with the changes.
来源:https://stackoverflow.com/questions/36490695/cant-add-assemble-reference-to-project