|
Found it.
I have 23 projects so to economize, I unload the ones I'm not working on. Guess what? Loading them, cleaning, rebuilding got things working again
|
|
|
|
|
So, other projects were referencing the same assembly? this means VS was loading older version of the assembly via other projects. When you rebuild them, they all synchronized.
As my former colleague would say, when you get a problem, first thing do "Clean and rebuild ALL projects"
Yusuf
|
|
|
|
|
Hi all,
I need help with control events. In this specific case I have a panel with another control inside in a Dock.Fill mode.
Now i need to catch the mouse_click event of the panel... Maybe this is a stupid question but I don't know how can I resolve it
Please help me.
Thanks in advance
Cliffer
|
|
|
|
|
You cannot catch mouse click event because you cannot click on the panel. In Dock.Fill mode, your control covers the entire panel. You may catch the click event in the control and pass it to the panel.
Calin
|
|
|
|
|
How do I actually do that?
I tried to call one control's event (forgot which one but that shouldn't matter) and call it inside another control's click event.
Yet the only thing I know how to do is to add a new EventHandler to a control's events and then add some code for it, but not how to call a event without the user explicitly triggering it.
modified on Friday, March 6, 2009 6:01 AM
|
|
|
|
|
Hi All,
I posted this over on the VS forum yesterday but I've not had any reply so I thought I'd try here today.
I'm having real troubles tracking down a referencing problem.
I have been incorporating a new version of one of our DLLs into a client application. When running the application it blows up complaining about not being able to find the old version of one of our DLLs.
The DLL throwing the error has been updated/rebuilt to reference the new DLL as have all the DLLs this DLL references. I've checked the .csproj file and the reference in there is correct.
Running the whole application through NDepend displays a warning on this DLL and Reflector shows this DLL as referencing both versions (which I didn't think was possible!) ...
None of the DLLs have been GAC'd either so its not getting a reference this way.
I've never seen anything like this, I'm totally at a loss as to how this DLL is getting a reference to the old version.
Does anyone have some tips on how to track this rogue reference down?
Cheers,
|
|
|
|
|
Did you try using Fuslogvw[^] ?
To fix the problem try adding a Probing private path See here[^]
Hope this helps.
|
|
|
|
|
Hi Chap,
Indeed I've been using Fuslogvw today with no luck ...
I'll have a look at this Probing path jobby ... thanks!
Cheers,
|
|
|
|
|
Jammer wrote: The DLL throwing the error has been updated/rebuilt to reference the new DLL as have all the DLLs this DLL references. I've checked the .csproj file and the reference in there is correct.
Referencing is what Visual Studio does to build your project, at runtime it's all in the manifest.
|
|
|
|
|
Indeed. The problem has now been fixed. It was a rogue dll in the referencing folder.
The app I'm building is a CAL WPF app so its all decoupled and spread over many solutions meaning that there is more leg work in terms of ensuring that all the references are as they should be.
|
|
|
|
|
Hi there,
I have created an .xsd schema which I want to include in my project (Windows Service). First question is: what is the best way to include it? as a resource? or just by doing "Add existing item"? what is the difference(if any)?
So far, I have added it as a resource (jobs.xsd). Ok, so now I want to validate an xml file, thus I am trying to do as follows:
1. XmlSchemaSet xss = new XmlSchemaSet();
2.
3. xss.Add("http://www.w3.org/2001/XMLSchema",ClassLibrary1.Properties.Resources.jobs);
4. XmlReaderSettings settings = new XmlReaderSettings();
5. settings.ValidationType = ValidationType.Schema;
6. settings.Schemas = xss;
7. settings.ValidationEventHandler += new ValidationEventHandler(ValidationCallBack);
8.
9. XmlReader reader = XmlReader.Create(xmlPath, settings);
10.
11. while (reader.Read()){};
This code breaks on line 3, with a System.ArgumentException: Illegal characters in path.
at System.IO.Path.CheckInvalidPathChars(String path)
at System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
at System.IO.Path.GetFullPathInternal(String path)
at System.IO.Path.GetFullPath(String path)
at System.Xml.XmlResolver.ResolveUri(Uri baseUri, String relativeUri)
at System.Xml.XmlUrlResolver.ResolveUri(Uri baseUri, String relativeUri)
at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, String schemaUri)
at ClassLibrary1.ReadXml.ValidateXMLAgainstXSD(String xmlPath) in c:\myproj\ClassLibrary1\GetXml.cs:line 95}
How could I get around this problem?
Cheers
modified on Tuesday, March 3, 2009 6:57 AM
|
|
|
|
|
If you still have not figured it out, the .Add overload you're using expects the URi of your .xsd file, and not the file's contents as a string.
It compiles, because there is not type mismatch, obviously.
All you can do is stream the contents of your .xsd, then feed it to an XmlReader and then pass that XmlReader as your second parameter of .Add's next overload.
That should help, hopefully.
var question = (_2b || !(_2b));
|
|
|
|
|
Hi Greg,
I think I should have been more precise. I knew I was passing the wrong data type to the .Add method. My problem was converting my string into a valid data type that the .Add will take.
At the end I am doing as follows:
StringReader sr = new StringReader(ClassLibrary1.Properties.Resources.jobs);
XmlSchema schema = XmlSchema.Read(sr,null);
sr.Close();
xss.Add(schema);
Anyway, thanks for your post!
|
|
|
|
|
i have problem for resizing of selected image.
|
|
|
|
|
|
Please elaborate on your requirement. If you mean to resize or edit icon or Bitmap, Then you can open it in Visual studi editor itself and do it.
|
|
|
|
|
I have to find the code blocks from the given code using Regex in C#.
e.g. I have to find the For loop block from the following code
For A in 1..10 Loop stmt1; For C in cur_op Loop stmt2; end loop; end loop; For T in 4..8 loop stmt3; end loop;
I want to retrieve the code blocks as
For A in 1..10 Loop stmt1; For C in cur_op Loop stmt2; end loop; end loop;
and
For T in 4..8 loop stmt3; end loop;
Can anyone suggest me any Regex for this?
Thanks.
|
|
|
|
|
what about -
"For + in + Loop +;"
im not 100% thou
If only MySelf.Visible was more than just a getter...
A person can produce over 5 times there own body weight in excrement each year... please re-read your questions before posting
|
|
|
|
|
|
If you realy think so, why dont u do it and tell me the answer?
|
|
|
|
|
hi dear friends
i wnat details in sqlconnect to C# ............ how can i connect sql2005
|
|
|
|
|
can you please reformulate?
|
|
|
|
|
First try a sensible subject, then go to here[^]
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
In c# code similar to the windows task manager functionality and when i'm trying to reach some processes
like sqlserver a runtime error appears(access is denied)
how i can reach this problem?
|
|
|
|
|
Hi,
if you are trying to change a process that is not yours (SQL Server owns to a service account by default) Windows will block your activities.
For example: try to change the priority of SQL Server via Taskman, and you'll see.
AFAIK there's no work arround. It's not a problem in C# but in Windows.
Bye,
monsta
|
|
|
|