0

I experienced the same problem as this popular question where I would receive the following error when my ASP.NET MVC project's Output Path was set to anything but \bin:

Could not load type 'MvcApplication'

My question is, why does changing the Output Path fix this error? I have build configurations for each environment I deploy to and I would like to keep the builds segregated (DEV builds to \bin\Debug, QA builds to \bin\QA, etc). Is there any way to fix this so I can keep separate build Output Paths but not get this error?

This issue has been happening since at least 2009 (based on when that question was asked), which leads me to believe it might be an intentional design decision rather than a bug...

Lews Therin
  • 3,707
  • 2
  • 27
  • 53

1 Answers1

0

in VS the bin directory's sub folders (i.e., Build, Debug..QA whatever) are defined by VS itself. You shouldn't need to manually edit the config file.

If you're using VS2017 you can go to Build->Configuration Manager and then add a new "Active Solution Configuration" (click on the drop down and select new)

Adam Hess
  • 1,396
  • 1
  • 13
  • 28
  • I'm not talking about manually editing the config. I'm talking about the Output Path in the Build section of the project properties. How does telling me how to add a new build configuration answer this question? I know that the bin subfolders are generated by VS using the name of the build configuration... – Lews Therin Aug 24 '18 at 17:38