|
Switching between builds seems to remove some temporary build files which flags the projects as having changed, or even the very act of switching builds flags the projects as having changed. If you use project references in your projects (which is always a good idea to keep these in sync), building one project with references to other projects that have changed will make sure those are compiled, too. It also helps if you simply right-click on a single project and select build, as opposed to using the Build menu in the main menu, which builds the entire solution.
Also, are you using AssemblyVersionAttribute with an asterisk (*) in it? If you are and these projects aren't rebuilt properly, the assembly that is dependent on them won't link against the right versions of assemblies, which is important in .NET (since Type and Assembly names are hingent on the Version). In large applications - especially those with lots of dependencies - it is better to manage the version numbers yourself otherwise you can easily fall into this problem. Without control on the version numbers, you're at the mercy of the compiler and updating test directories gets to be a REAL pain.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I'm using * in AssemblyVersion. That might be my problem. I will definately try this, thanks!
Carl
|
|
|
|
|
Trust me, maintaining your own versions can be a real blessing! I'm both the software architect and the build master so it's one thing I have to worry about. It didn't take me long to make policy that we do it ourselves. Besides, look at all your commercial .NET libraries and find a good one that uses automated versioning!
With our app, it was even more crucial. For testing, we all drop assemblies in a repository for varoius reasons (like only some people have licenses to third-party libraries, though we use very few). We do use assembly binding redirection in our .config file because our app is deployed as a touchless-deployment smart client that we can easily update, but it got to be a complete hastle to keep synced when many different people are dropped locally-tested assemblies in a testing repository!
If it would give you any ideas, here's how we do ours: the major and minor versions are still incremented as most applications are. The build number is the same as what it is in .NET when you use an asterisk in that position: the number of days since Jan. 1, 2000 (ex, 1475 for today). .NET uses the number of seconds since midnight of the current day modulo 2 for the revision number, but we simply increment that for bugfixes to an existing, already-deployed assembly. Feature enhancements is what usually constitutes a minor or major version number increment. The build number we typically use to just track the date since the aforementioned epoch when the assembly was build. That's what .NET's automatic versioning seems to do anway.
Now, what I'm still wondering about is how Microsoft manages there. Take a look at .NET 1.0 assemblies: 1.0.3300.0 (1.0.3300.228 for a file version - not assembly version - for SP2). For .NET 1.1 assemblies, they use 1.0.5000.0. Why that's not 1.1.5000.0 and what that build number represents I don't know. Also note that they don't change their assembly versions for service packs. You could also consider that, using the AssemblyFileVersionAttribute instead for bug fixes instead of the AssemblyVersionAttribute .
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks for all the info. I'll keep you tuned whether or not it worked.
Very appreciated!
Carl
|
|
|
|
|
Removing the * definately did the trick! Thanks a lot!
Carl
|
|
|
|
|
Sorry, I see now. Heath's reply makes since for this then.
|
|
|
|
|
hello;
how can u scale a bitmap that has a pixel format of 1bppindexed!!
i tried to use poiners to extract each pixel(that is 1bit) and then scale them, it didn't work with me!!
can anyone provide me with a sample code?
thnx
|
|
|
|
|
I get some strange behavior from a comboBox.
It selects it's value, when the tab page where it's on is Entered.
I do not want that to happen!
When creating or layouting the selection is NULL.
(I'm using the tabpages from the magiclibrary by the way, the designer f***s the visualAppearance enum up but it work ok)
The comboBox uses a dataView for it's selectedValue
and an other one for it's dataSource.
Tried setting the SelectedText in the SelectedValueChanged event but it's already NULL.
Solved it by setting the selectedtext in the tappage enter function.
Unfortunatly this means that i have to litter my code all over the place with functions that fix this.
Is there a more generic sollution to this?
Could I inherit and catch some hidden event that get's fired just before it get's shown? (but after it's layouted)
Or does sombody know what setting might be wrong?
Still puzzling..
(PS 4 people have been trying to find it for a few days now and no luck, so probably only the true wizards can solve this riddle.)
|
|
|
|
|
I'm also having some problems with a ComboBox.
The documentation defines the SelectedText property:
A string that represents the currently selected text in the combo box. If DropDownStyle is set to ComboBoxStyle.DropDownList, the return is an empty string ("").
The default value for DropDownStyle is DropDown, not DropDownList.
For my application the ComboBox has a DataView as its DataSource. After selecting an item from the drop-down list, the SelectedIndex and SelectedValue properties contain the expected values. The SelectedText property contains an empty string even though the correct value is clearly displayed in the edit window.
I haven't tried this yet, but I think setting the SelectedIndex to "-1" will cause the edit window to remain empty until a value is selected.
>>>-----> MikeO
|
|
|
|
|
I'm working on a windows app that uses a PropertyGrid control. The grid displays certain properties of some objects that I use in my app. I want to make the PropertyGrid display a dialog for a string property. This functionality is typically available for properties of array type. I want the user to be able to click next to the string property and make a dialog popup so that he/she can construct the value of the string property from some possible options. Is this possible?
|
|
|
|
|
See the UITypeEditor class. You need to derive the class and create your own UITypeEditor that uses GetService to request the IWindowsFormsEditorService so that you can call ShowDialog and pass an instance of your form. Finally, use the EditorAttribute on your property that specifies the Type (or the type string if in another assembly for design-time only that you don't want to ship, which should be installed into the Global Assembly Cache (GAC)). There should be examples of this in the documentation for these classes in the .NET Framework SDK.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
10x a lot! This worked perfectly!
|
|
|
|
|
Hi friends:
i had such question: i wrote my code in vs.net then i press f5 to view the result of my program,but theres only a flash of the commandline window which disapeared within 0.5 second... Is there any method to view the result while coding with vs.net? I have known the method that write such code as Console.ReadLine() at the end of the code . Is there any other method ?
thanks for your help
|
|
|
|
|
You can either Debug the code, manually run it from the command line, or put in a Thread.Sleep(x) where X is the number of Milisecoinds you want the program (current thread) to pause for. If you use the Thread.Sleep option, you will need to reference the System.Threading library.
|
|
|
|
|
I do the same. I use
#if DEBUG
Console.ReadLine()
#endif
So that it only does it in debug builds, and release builds work normally.
--Colin Mackay--
EuroCPian Spring 2004 Get Together[^]
|
|
|
|
|
This is because your main method is finished.
At the ned of your program put
while(true);
But you will have to close the project manually
|
|
|
|
|
I create a console application project for Multicast of IP. I get a problem when I run this application.
The console outputs an error message: Invalid Parametres. I implement multicast with an UDPClient object like this:
ip=IPAddress.Parse("234.5.6.7");
UdpClient s = new UdpClient();
s.JoinMulticastGroup(ip); //The exception happens here
//Environment: Windows Server 2003 Standard Edition, VC#.NET
Thanks
|
|
|
|
|
Make sure you set the AddressFamily of the UdpClient in the constructor before calling JoinMulticastGroup , otherwise an ArgumentException will be thrown. This constructor overload is only supported in .NET 1.1 and higher. More information about the exception that is thrown and the version of the .NET Framework in which you're developing might help if this doesn't solve your problem / is not possible to implement (i.e., using .NET 1.0).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi.
Is there any way to center-align columnheaders in a datagrid while the text in the rows of the column is still rigth-aligned?
I found out using datagridTextBox.Alignment, but this aligns both header AND text in the rows...
any help?
|
|
|
|
|
You could create your own DataGridColumnStyle derivatives and ignore the Alignment property. Just derive from the existing ones like DataGridTextBoxColumn and DataGridBoolColumn to avoid having to implement the rest of the behavior.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
but the columnstyke also aligns both the text and the headers, right?
So unless i override the paint event, I can't do what i want....
|
|
|
|
|
In the override for DataGridColumnStyle.Alignment , try returning HorizontalAlignment.Left . The default painting procedure should use that to paint the text; otherwise, yes, you will have to do the text painting yourself (but that is pretty easy to do). See Graphics.MeasureString and Graphics.DrawString for more information.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
hi!
i try to connect three tables by two datarelations. the first two are no problems but the third one doesnt work. i tried to connect table a with table b and table b with table c. connection b to c is the connection that does not work
Andreas Fähndrich
|
|
|
|
|
You are talking very general. What do you mean by does not work and what is your code that does not work?
Mazy
No sig. available now.
|
|
|
|
|
sorry for that. here the problem more detailed:
I have three datatables in one dataset. this construct shall save datastrings for many kinds of databases. i want to connect thee three tables in that way:
Tablenames: Databases, Connectionstrings, Parameter
one database can have several connectionstrings, one connectionstring can have several parameters.
i connected the tables that way:
//CODE:-------------------------------------------------------
System.Data.DataColumn dc2 = ds.Tables["Datenbanken"].Columns["id"];
System.Data.DataColumn dc4 = ds.Tables["ConnectionStrings"].Columns["db"];
DataRelation dbcs = new DataRelation("dbcs", dc2, dc4); //dbcs = Database --> Connectionstring
ds.Relations.Add(dbcs);
System.Data.DataColumn dc3 = ds.Tables["ConnectionStrings"].Columns["id"];
System.Data.DataColumn dc1 = ds.Tables["Parameter"].Columns["cs"];
DataRelation cspm = new DataRelation("cspm", dc3, dc1); //cspm = ConnectionString --> Parameter
ds.Relations.Add(cspm);
dataGrid1.DataSource = ds;
dataGrid1.DataMember = "Datenbanken";
dataGrid2.DataSource = ds;
dataGrid2.DataMember = "Datenbanken.dbcs";
dataGrid3.DataSource = ds;
dataGrid3.DataMember = "ConnectionStrings.cspm";
//END OF CODE----------------------------------------
"id" is always the primary key
the relation "cspm" does not work
better?
mfg
|
|
|
|