VS2010: Use namespace from another project within the solution?

后端 未结 2 1488
情深已故
情深已故 2021-02-01 14:56

I have two projects within a single solution in Visual Studio 2010. These projects are called Project1 and Project2. Within these projects, two namespaces are defined, Namespa

相关标签:
2条回答
  • 2021-02-01 15:22

    Yes, add a reference to Project1 from Project2. Right-click the project, choose "Add References" then from the "Projects" tab, choose Project1.

    0 讨论(0)
  • 2021-02-01 15:32

    In some cases you have to actually add the DLL of the other project to compile against, not just a reference to the project. Make sure copy to local is enabled in that advent.

    I had this happen trying to link a console app to an MVC project.

    0 讨论(0)
提交回复
热议问题