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

5 Aug 2010

Unable to copy from obj\debug to bin\debug

Arrrrgghgghgh this problem reared its ugly head again today.  Occurs whenever I try to build a solution (winforms) on Visual Studio 2010.

Previously adding this to the build events (My project, compile tab, click build events):
If exist "$(TargetPath).locked" del "$(TargetPath).locked"

But after working for ages I started getting the error again.  Found this online though, and added it and looks like we are good again:

If exist "$(TargetPath).locked" del "$(TargetPath).locked"
if not exist "$(TargetPath).locked" if exist "$(TargetPath)" move "$(TargetPath)" "$(TargetPath).locked"

Microsoft really want to sort this out, as developers typically build a solution more than once, can’t quite get the hang of perfect coding 1st time round yet.

23 Mar 2010

.NET FlowLayoutPanel Large Vertical Gaps (unwanted)

Ran into this issue and found a post to fix it thanks to LewisG (as this was doing my head in).


http://www.windows-tech.info/3/c9cb6b44b9529869.php


When two controls that would fit width-wise are added to a Flowlayoutpanel, and the first one has FlowBreak = true, the FlowLayoutPanel inserts a significant amount of unwanted vertical blank space between the controls.
Even in design time it can be reproduced. Steps are:
- Create a new form
- Add a flow layout panel
- Add a label
- Add a button
- Set flowbreak=true on the label
- Resize the button width-wise. It jumps up and down, the unwanted blank space appears and dissappears, depending on whether it is large enough to fit alongside the label or not.
I'm really surprised noone has made a reference to this bug in msdn forums, or any of the usual search engines.
We have an application that creates controls dynamically, and the client is hammering us with this bug. Help is appreciated.


Re: Windows Forms General Flowlayoutpanel flowbreak bug. It creates unwanted empty space

LewisG 

I realize this issue is pretty old, but I ran into this bug myself and I figured out a workaround I thought might be useful to someone else.
The vertical size of the gap seems to be the same as the height of the control that follows after the flow break. So, I just add a panel of Size(0,0) with no margins after the flow break. That gets rid of the gap.

22 Sept 2009

Visual Studio Dataset Designer Problem

Just wasted about 5 hours on a really annoying problem.
I have a data access layer project in my solution.

It stopped compiling properly and was giving mutliple defintion errors.
The was one dataset.xsd
but mutliple dataset.designer.vb (e.g. dataset.designer1.vb, dataset.designer2.vb).
Somewhere along the line the .vbproj file must have added another entry.

To solve I copied the XSD file to desktop.
Deleted it from project (through IDE).
Deleted all the .designer files (through explorer).
Readded the XSD to the project and it compiles fine.

Actually thats what I should have done, initially I wasted hours and hours trying other solutions.