1

I am trying to create a website with the last version of MVC. My MVC project is running fine. I have a class library created with yeoman, it's running fine too. I added my library in the MVC project.son

"dependencies": {
[...]
"ServicesAndDbContext": ""
},

If I run with the cmd dmx run it's ok BUT when I try to use my class library I have an error : "The type or namespace name 'ServicesAndDbContext' could not be found (are you missing a using directive or an assembly reference?) [dnx451] " This line appear when I write my : using ServicesAndDbContext;

Could you please tell me what am I doing wrong?

Thank you very much!

2
  • What do you have under "frameworks" on both project.json files? Commented Mar 20, 2016 at 21:47
  • Thank you for your reply. So in the project.son file for the class library I have: "frameworks": { "dnxcore50": { "dependencies": { } } } And under theMVC project file I have : "frameworks": { "dnx451": { }, "dnxcore50": { } } Thank you for your help. Commented Mar 21, 2016 at 19:05

1 Answer 1

1

Ok, Thank you Bruno Garcia you found my problem.

dnx451 was missing under the framework section.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.