c# - Block loading a static class in design mode in Visual Studio 2013 -
My C # solution (.Net 4.0) in VS2013 includes a project that defines a stable class. I
This constant The creator of the class tries to connect to a database and manipers with the data.
I am facing the problem that every time I am trying to build my solution or I am referring to this static class in other projects (in the same solution), then VS 2013 is trying to call the constructor After the static class constructor is called, VS 2013 becomes non-judging. Of course, as a temporary solution, I can comment on the complex part of the constructor, but eventually I still have to remove it and try to make it.
Can you please tell me how to stop this option of automatic loading of static classes in design mode in VS 2013? Google tried, but no success.
Thank you!
You can add a test in your fixed constructor and if you are not, then only your code logic carry about.
That is being said, I will not recommend you to run the code that accesses a database in a stable manufacturer. The main problem is that you do not really know when it is called
Comments
Post a Comment