c# - error CS0012: The type 'ConnectionStringSettings' is defined in an assembly that is not referenced after upgrading to Visual Studio 2015 -
i've upgraded visual studio 2013 pro visual studio 2015 (enterprise), , when compile solution, i'm getting following error:
error cs0012: type 'connectionstringsettings' defined in assembly not referenced. must add reference assembly 'system.configuration, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a'.
is there missed during installation process? have manually add reference projects on?
update: yes work after adding reference system.configuration projects, question more why need in visual studio 2015 (it used work without reference in visual studio 2013)
update: explain context: work in team developers work various versions of visual studio (2012 onwards). if developers work visual studio < 2015 forget manually add reference, won't compilation error, ones on vs2015 will. it's important team understand what's happening here :)
i can think of 2 reasons why have add explicit reference system.configuration.dll
in vs 2015 when did not have in earlier versions of vs:
during solution migration / update, projects' .net framework settings changed newer .net framework. in newer .net framework version,
connectionstringsettings
type moved different assembly.to honest, seems unlikely me, checked.
the build system's (msbuild)
.targets
have changed in vs 2015. previous build targets automatically added referencessystem.configuration.dll
assembly, whereas newer build targets don't anymore; why have add missing assembly references manually.(note how when create project in visual studio, build system takes care of references
mscorlib
,system
, ,system.core
. if remove these assembly references, still "there" during compilation. perhaps similar has been going onsystem.configuration
prior vs 2015.)i haven't verified this, seems likelier explanation of two.
these attempts @ explaining (aka guesses), perhaps there altogether different reason.
Comments
Post a Comment