Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Saturday, 26 March 2011

Recursive references in the projects

This is the most stupid thing i have ever seen in development. Few years ago there was a project from the client. Project was live already and required some major changes for it. Customer sent me a source and once i started to work, i found about 5 recursive references like: project1 references to the project2 and project2 references to the project1. This is very big problem with development, it means something wrong with architecture. I have moved required methods to the separate project and it fixed 4 recursive references. But 1 recursive reference still exists. This issue did not allow to compile project. Fix was easy: need to set in the properties of the reference "Copy Local" = false.

Hope this helps!

Friday, 25 March 2011

No processes to attach in Visual Studio

Usually to debug projects for DotNetNuke i attach to the aspnet_wp.exe process. Its very good way on how to debug modules for DotNetNuke. But sometimes there was big confuse. Once i opened list of processes to connect i got it empty. It confused me, how it can be?

After deep debugging problem has been found.Source of problem is frozen processes IEXPLORE. Once i killed them in Task Manager and restarted IIS, everything goes back and i can attach to process for Debugging.

Hope this helps!

Tuesday, 22 March 2011

Blocked references in Visual Studio

Sometimes, when you try to compile project for DotNetNuke in Visual Studio it can not to do this. Error says: can't rebuild, because .dll of the project is locked. Sometimes it was real headache for me, because was really unexpected and unusual. First time i thought its problem with IIS, but later i found its problem with Visual Studio references. So, there are 4 steps to fix this issue:

1) Remove all references from your project (or whole solution). Try to rebuild - it shows errors, because can't find references.
2) Close Visual Studio.
3) Open solution and add all references.
4) Rebuild solution. It works now.

Hope this helps.