-7

I have 2 separation solutions. One is done using MVC (Solutions 1) and the other is done using Web Forms (Solution 2). I have a class in one of the solutions (MVC one) that I like to use in the Web Forms solution. How would I reference the class in Solution 1 through Solution 2?

NathanOliver
  • 171,901
  • 28
  • 288
  • 402
Nate Pet
  • 44,246
  • 124
  • 269
  • 414
  • 3
    What information did you find when you researched how to access a class from multiple solutions? How did the information you found fail to resolve your problem for you? – Servy Dec 20 '16 at 16:11
  • @hello Just look at the profile. All this person does is ask questions trivially googled. They've done so hundreds of times. They clearly learned to ask questions on SO instead of bothering to even do a simple web search first, and they've been rewarded for doing so because people love to upvote said questions. – Servy Dec 20 '16 at 16:17
  • And with this one sentence you just made this tip over to "too broad": `I was wondering if creating Web Services, etc. would be a better approach` – Jamiec Dec 20 '16 at 16:23
  • @Jamiec I edited that out since it should only be one question per question. – NathanOliver Dec 20 '16 at 16:24
  • 1
    Possible duplicate of [How to use a Class from one C# project with another C# project](http://stackoverflow.com/questions/3554658/how-to-use-a-class-from-one-c-sharp-project-with-another-c-sharp-project) – gunr2171 Dec 20 '16 at 16:26

1 Answers1

0

It depends on where the class is located. Ideally you would move your class out into its own project so that you can add the project to the other solution. You could also add an existing item from your MVC solution but this can lead to all kinds of dependency problems and shouldn't be done.

Matthew Peterson
  • 1,055
  • 12
  • 21