I have to agree with Alex. I've been doing exactly the thing he recommends, and I never see locking issues. I've got several dll's that are much larger than 64k, some up to 3 times larger, and still no problems.
All you need to do is start by creating a blank solution, then adding projects to it. The IDE does the rest. I would recommend that immediately after creating a new project, go into the project properties and change the namespace from the default. You will also have to correct it on the initial class or form that the project built, but every class/form you add after that will be correct. If you don't do this, you will end up with ambiguous references and weird debugger behavior. William Alexander Software Developer ----------------------------------------------- DATATRAK International, Inc. 6150 Parkland Blvd. Suite 100 Mayfield Heights, OH 44124 P - (440) 443-0082 F - (440) 442-3482 -----Original Message----- From: Alex Kipman [mailto:akipman@;MICROSOFT.COM] Sent: Wednesday, November 06, 2002 11:26 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Tearing my hair out - I am thoroughly disgusted with VS.NET I want to outline the exact states that will cause this problem to occur. I will also outline how to fix it once that happens. State 1 where this problem occurs: * ProjectA references projectB and projectA has CopyLocal=False on the reference to projectB * Assemblies being generated/referenced are >= 64 kbytes State 2 where this problem occurs: * Projects within a solution build to a common output directory. * Assemblies being generated/referenced are >= 64 kbytes The 64kb bullet is the chief cause for users thinking this is a random behavior, or an error that only happens once projects become "complicated". When you start a project and set CopyLocal=False or build to a common output directory you don't see the locking behavior. As you continue to work with the project and your assembly grows you will eventually see this occur. The CLR locks loaded assemblies that are >= 64kb. It does so because after an assembly becomes larger than 64kb it pages the assembly in memory for perf. How do you fix this problem? * Make sure CopyLocal is set to TRUE on all project to project references (VS does this by default) * Ensure that all projects in the solution build to a different output directory. Each project should have its own output directory that is not written to by any other project (in the same solution or in a different solution). (VS does this by default) If you encounter this problem without meeting the above states please e- mail me. Thanks, Alex Kipman ([EMAIL PROTECTED]) Program Manager Visual Studio Core Team This posting is provided "AS IS" with no warranties, and confers no rights. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
