asp.net core - dnx451 actually means .net 4.5 -
i created 2 projects using visual studio 2015 rc
- a class library
mylibtarget framework.net framework 4.5.1 an asp.net 5 project
mywebappreferencesmylibinproject.json:"frameworks": { "dnx451": { "dependencies": { "lib01": "1.0.0-*" } }, }
when trying build mywebapp, warning occurs:
msb3274: primary reference "c:\mywebapp\src\mylib\bin\debug\mylib.dll" not resolved because built against ".netframework,version=v4.5.1" framework. higher version targeted framework ".netframework,version=v4.5".
the warning disappear if change target framework of mylib 4.5.
it seems mywebapp targeting .net framework 4.5 rather 4.5.1? how make mywebapp references library targeting .net 4.5.1?
this warning doesn't seem mean much. it still visible if .net version of web project set greater library's e.g.
"net46": { "dependencies": { "lib01": "1.0.0-*" } } another interesting thing it's possible have library build against .net framework 4.6 (latest) , still build/run , use classes within dnx451 project (i've passed readonly queue available in 4.6 ireadonlycollection lib web application).
besides far know .net 4.5.1 has not introduced changes api , it's not easy test difference between 4.5 , 4.5.1
and if want rid of warning can create vnext type class library (package) , refer asp.net 5 application, class library use dnx451 same web app.
Comments
Post a Comment