I have a Winform App that uses a 3rd Party Library of Controls, DevExpress. I also created a bunch of Controls myself, extending those controls. Everything has been working fine when all of a sudden I opened VS today and on the Design Page all my extended controls were missing. I then tried rebuilding to no avail. Then I tried Cleaning and Rebuilding and made it even worse. Now I have tons(520) of erros stating things like -->
Error 179 The name 'datBirthDate' does not exist in the current context D:\Documents\Visual Studio 2008\Projects\MatrixReloaded\MatrixReloaded\Controls\Member\ucGeneral.cs 339 17 MatrixReloaded
also if I try to open a form or user control in Design Mode I first get this -->
could not find type, "MyType" please make sure that the assembly that contains this type is referenced
and then, if I click Ignore and Continue I get this for all Forms and Contros when I try and look at them in Design Mode -->
Exception of type System.OutOfMemoryException was thrown
Help!?!?
When I googled I came across mostly references to VS 2003...I am on 2008 sp1.
Here is an example of my Extended Controls. Nothing fancy. I do this for almost every control. All are in there own class but in this same file, MyExtendedControls.cs, that resides in the same project as the WinForm App.
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraEditors;
public class MyTextBox : TextEdit
{
private bool _isRequired;
/// <summary>
/// Used to determine if this is a required field
/// </summary>
[Description("Is this a required control")]
public bool isRequired
{
get
{
return _isRequired;
}
set
{
开发者_JAVA百科 _isRequired = value;
}
}
private bool _isChanged;
/// <summary>
/// Used to determine if this field's data has changed
/// </summary>
[Description("RUNTIME: This fields data has changed")]
public bool isChanged
{
get
{
return _isChanged;
}
set
{
_isChanged = value;
}
}
Things to check...
1) Hopefully you didn't add the third party DLLs to your bin directory... cleaning your solution empties the bin directory!
2) Check the references for the project - are there any exclamation marks? If so, you'll need to re-reference them.
Many of the other errors you are getting could be because your other assemblies (like the one containing "MyType" aren't building. If you can work out the logical order and fix the lowest dependency first, most of your other problems will go away.
For example...
Project A references Project B, which contains "MyType" Project B references Third Party Project A Third Party Project A is missing for some reason...
Project A will spit out errors all over the place because no DLL can be created for Project B because it doesn't build. By simply fixing the reference issue in Project B all errors will go away.
Hope this helps.
精彩评论