.net - VS 2015 Modeling Project MSB3268 warnings when using Unity IoC Container -
i using visual studio enterprise 2015 , tried create layer diagram in order generate , validate dependencies. fails because vs throwing warnings while building modeling project:
currentversion.targets(1819,5): warning msb3268: primary reference "...\classlibrary4\bin\debug\classlibrary4.dll" not resolved because has indirect dependency on framework assembly "system.runtime, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a" not resolved in targeted framework. ".netframework,version=v4.0". resolve problem, either remove reference "...\classlibrary4\bin\debug\classlibrary4.dll" or retarget application framework version contains "system.runtime, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a".
i figured out if remove unity warnings gone , dependencies shown expected.
what reason behavior , there workaround?
i tried unity prerelease package , targeting frameworks. no effect @ all. issue reproducable new project after adding modelling project , using unity in 1 referenced projects.
i found solution after setting build output detailed. problem vs2015 compiling modelling project using wrong target framework (4.0):
task parameter:targetframeworkdirectories=c:\program files (x86)\reference assemblies\microsoft\framework.netframework\v4.0
there no targetframeworkversion in project file of modelling project (*.modelproj). after adding first property group compiling , validading expected. without warnings.
solution:
- unload modelling project
- right click -> open *.modelproj
- add following line first property (replace target framework)
(replace v4.5 target framework)
<targetframeworkversion>v4.5</targetframeworkversion>
get happy using architecture tools.
Comments
Post a Comment