c# - How to reference csproj from kproj -
i playing around vs2015
, asp.net vnext
, , got stuck on trying add reference vnext class library (kproj) regular class library (csproj) in same solution. visual studio 2015 shows following error message:
"the following projects not supported references".
is possible @ add references csproj vnext class libraries?
note: kpm command has been replaced dnu.
visual studio 2015 preview (as of writing this) comes asp.net 5 stable release beta1. in version there no way reference csproj project asp.net 5 project.
however, on development feed of asp.net 5 command kpm wrap
introduced support referencing csproj-projects asp.net 5 projects. see github issue #827 in aspnet/kruntime repository , pull request #875 closes issue.
here example how use kpm wrap
:
make sure newest version of kruntime installed (check kvm list
command) (i tested version 1.0.0-beta2-10709
).
create asp.net 5 class library project, used name classlibrary1.
create "normal" csproj class library, named classlibrary2 (make sure put in src folder).
from commandline, solutiondirectory run command
kpm wrap .\src\classlibrary2
this gives output:
wrapping project 'classlibrary2' '.netframework,version=v4.5' source c:\users\andersns\source\classlibrary1\src\classlibrary2\classlibrary2.csproj target c:\users\andersns\source\classlibrary1\wrap\classlibrary2\project.json adding bin paths '.netframework,version=v4.5' assembly: ../../src/classlibrary2/obj/debug/classlibrary2.dll pdb: ../../src/classlibrary2/obj/debug/classlibrary2.pdb
now in project.json of classlibrary1 (which asp.net 5) can add reference classlibrary2 this:
... "dependencies": { "classlibrary2": "" }, ...
note: kpm wrap
did not run me cmd, needed launch powershell make run.
Comments
Post a Comment