1

I am working on one C# console application which create List collection of class object now I want to send that object to one mvc3 application (another project) action method. But when i add reference of mvc3 application to my console application it show some warning and error that are as follows :

Warning 1 The referenced assembly "MVC_POP3" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. Console_Gmail_POP3

Error 4 The type or namespace name 'MVC_POP3' could not be found (are you missing a using directive or an assembly reference?) D:\Users\Rajendra\TASKs\Console_Gmail_POP3\Console_Gmail_POP3\Program.cs 13 7 Console_Gmail_POP3

So is it possible that i call mvc action method from my console application ?

Please guide me regarding this....

1 Answer 1

4

Change the .NET framework of your console application from client profile to full .NET 4

Steps:

  • Right click on your console project, select Properties
  • Application > Target framework
  • Select .NET Framework 4 instead of .NET Framework 4 Client Profile

enter image description here

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.