Referencing DBML project in Console App (.net)

2019-07-29 12:57发布

问题:

I inherited a software engineering job with a .DBML project in it. It was being referenced by an ASP.Net website as it's data access layer, but I'm tasked with creating a Console app that could utilize the extensive data access classes in the project.

However, when I reference the project I get intellisense and all but on building it, get errors as if I don't have reference to it.

I am not that familiar with this kind of project and am kind of at a lost how to proceed. I have been trying out different stuffs for past few hours, but nothing seems to work.

Can anyone guide me to how to solve this, or perhaps an article that could point me to the right direction? Thanks!

回答1:

Right click on your console application and then click on properties. Change the target framework from .Net Framework Client Profile to .NET Framework.

This "feature" of Visual Studio has bitten a lot of people... I wasted almost a full day on it recently.