|
I have a large enterprise application. It involves 50 - 100 seperate .exes and several thousand .dlls. We want to group the .exes in their own directories with the .dlls they use. There are about 100 base .dlls that are commonly used. We would like to keep these in a single directory and let all the other apps use them.
This does not appear to be possible. We can place them in the Global Assembly cache, but they have to be strongly named. If I understand correctly, using strong names will require me to rebuild all the apps that reference them each time we change one of the base .dlls.
The ony other alternative seems to be to put a copy of each .dll used by an application in the same directory as the application. This causes us to have many locations to keep synchronized, or keep all the .dlls and .exes in the sam directory.
Is there a better way?? Am I missing something here?
Thanks for any help I receive.
|
|
|
|
|
You might be able to load all those dlls manually at start up.
Just use Assemlby.Load, or you might register event hanlder for AppDomain.AssemblyResolve and then load the assembly if it can't be found thru normal lookup.
|
|
|
|
|
You can also setup different paths for AppDomain.RelativeSearchPath or AppDomain.DynamicDirectory
|
|
|
|
|
Hey
I have a .NET remote server application I want to access from a smart device(.NET compact framework). Is there any other way, than webservices to access this remote server? I can't find the .NET remote for the compact framework.....
best regards
Rasmus
|
|
|
|
|
Hi All
I have a MFC client wich is a part of big 3-tier application. Recently, I've begun to convert some parts of it into managed code.
By that, I mean that I rewrote some components of the app using C# and imported them into my app as a COM components (including the communication with the server wich I changed from COM+ to .Net remoring).
It works fine, but when I close the application I get exception in call to corExitProcess().
Does anybody know something about that?
Do I have to shut the CLR in some way?
thanks!
|
|
|
|
|
I suspect you're violating some condition that the CLR is relying on.
I suggest running your code using CLR SPY[^] and working from there.
|
|
|
|
|
Have any ideas what can it be?
i've tried the CLR Spy and it doesnt show me any errors.
thanks
|
|
|
|
|
Anonymous wrote:
It works fine, but when I close the application I get exception in call to corExitProcess().
A shot in the dark but it sounds as if your unmanaged code hasn't detached from the managed process thread. Have you tried catching the exception?
- Nick Parker My Blog
|
|
|
|
|
I'm developing a UserControl. It would be a lot easier if the UserControl could act as a container for forms except for that "Cannot add a top level control to a control" thing...
Right now I can add 'simulated' forms on the fly that are actally panels. It works OK but they don't look and act EXACTLY like a form.
It would REALLY be nice if my UserControl would act like an MDI form so that I could add child forms to it on the fly...
I guess you'd be able to add a MainMenu too - just think if you could just drop an MDI form on top of your UserControl. Don't laugh - I'll bet some guru out there has figured this out...
Any suggestions?
JerryT
|
|
|
|
|
Dare I ask why you don't use Form or inherit Form?
|
|
|
|
|
Hello All,
I need safe functions like "FloatToInt32Bits" and "Int32BitsToFloat",
equivalent of the "BitConverter.DoubleToInt64Bits()" and
"BitConverter.Int64BitsToDouble()"
Any help?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
I'm learning ADO.NET , and trying to bind a text control to a dataset.
when program starts textbox shows 1st record OK , but as I execute
this.BindingContext[dataSet11.Orders].Position+=1;
the textbox doesnt change , although the datagrid row indicator does in the datagrid control.
<br />
<br />
private void frmChild_Load(object sender, System.EventArgs e)<br />
{<br />
sqlDataAdapter1.Fill(dataSet11.Orders);<br />
}<br />
<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
this.BindingContext[dataSet11.Orders].Position+=1;<br />
Any ideas ????
.netter
|
|
|
|
|
How about a binding manager or currency manager?
|
|
|
|
|
I am trying to control the sort of DateTime values in a DataGrid. I have loaded DateTime's into a DataGridTextBoxColumn and want to control how they are sorted when the user click's the column header with AllowSorting = true. I can't not figure out which object is controlling the compare between two row values. I know that the DataGrids DefaultView is involved, but setting the views sort just gives me the ASCII sort, not good for DateTimes.
I have searched endlessly on the Web and MSDN, but no success...can anyone help?
|
|
|
|
|
Anyone else notice that something like:
for(double a=0.0; a<=7.11; a=a+0.01)
{
for(double b=0.0; b<=7.11; b=b+0.01)
{
if( 7.11==(a+b) )
{
// Something interesting!
}
}
}
causes floating point errors? That is, the variable "a" will go from say .79 to .800000001?
Don't try using Console.WriteLine() as it will print the text as .80 but use the debugger's quick watch. And I know the internal variable is .80000001 because the "if" fails to ever catch.
I'm using a PIII and have tested for the Intel division floating pointing error and there is none. Using VS.Net 2003, but did try equivalent code in VS 6.0 and it worked fine.
|
|
|
|
|
I was going to suggest that you should use
Console.WriteLine(a.ToString("r"));
As this would get the round trip value which should display more accurately. But I see the same problem.
Thinking back to my lectures at Uni' (10 years ago now) I recall a C/C++ lecturer suggesting the best way to check for equality in floating point numbers is along these lines (in C#):
public class DoubleEquality
{
private const MAX_ERROR = 0.0001;
public static Equals(double a, double b)
{
if (Math.abs(a-b) < MAX_ERROR)
return true;
return false;
}
}
You can set MAX_ERROR to be what ever level of precision you need.
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"Get in touch with your Inner Capitalist - I wish you much success!" -- Christopher Duncan, Lounge 9-Feb-2004
|
|
|
|
|
|
That just shows how much floating point stuff I've done in .NET.
Thanks for the tip.
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"Get in touch with your Inner Capitalist - I wish you much success!" -- Christopher Duncan, Lounge 9-Feb-2004
|
|
|
|
|
|
Hey
I'm doing a project in which I'm using j# browser controls. Now I have a need to get some data from the database(SQL). But as j# browser controls runs on the client machine, how can I manage to connect to the database. The application must be on the internet.
I have some rough ideas as using "XMlHTTP" active x component, SOAP technology, using httpUrl from java.net class.....
I didnt study all these cases yet, also I'm not sure which will work efficiently, as I have to deal with very large database.
Will anyone please help me.......
Regards...
|
|
|
|
|
Is there a method in C++ .NET to emulate a real time loop while still using the managed forms editor?
while(true)
{
if(PeekMessage(msg, hWnd, 0, 0, PM_REMOVE)
{
if(msg.message == WM_QUIT)
break;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
fGameLoop();
}
James Meade
vLT(jg) vUSN
vOPSOFF VAQ-140
|
|
|
|
|
I have two textboxes on a form and have the following code in the Leave event of one of them. The problem is that once the textbox has focus, you can't leave it if the textalign property has changed. I need a way around this without setting focus to the next control manually.
I still have to see if is framework or language related with the same code in C#.
HELP!!
Private Sub TextBox1_Leave(ByVal sender As Object, _<br />
ByVal e As System.EventArgs) Handles TextBox1.Leave<br />
<br />
If TextBox1.TextAlign = HorizontalAlignment.Left Then<br />
TextBox1.TextAlign = HorizontalAlignment.Right<br />
Else<br />
TextBox1.TextAlign = HorizontalAlignment.Left<br />
End If<br />
End Sub
|
|
|
|
|
when you change the textalign property, it will again set the focus to the current control(textbox in our example). So you should not change the alignment in the leave event...
If you explain your requirement in detail, I hope I would be able to help you clearly.
|
|
|
|
|
At a guess, the alignment is set to right by default, but on editing is set to left, then back to right in the leave event (somewhat erroneously).
The problem is most likely with the order of events.
When using the keyboard, the events are fired in the following order:
Enter
GotFocus (user enters data)
Leave (user has tabbed away)
Validating
Validated
LostFocus
When you use the mouse or call the Focus method, the events are fired in the following order:
Enter
GotFocus (user enters data)
LostFocus (user clicks on other control)
Leave
Validating
Validated
So, if you handle the Enter and LostFocus events, what you want works when using the keyboard. If you use the likely pairs together (like Enter and Leave), when you change the TextAlign property the handle for the text control is recreated. If it had the focus (which for keyboard events, it still does) the focus is again set to the TextBox.
The trick is to change the alignment at the correct time based on whether or not a mouse button was clicked:
// Hook-up event handlers.
myTextBox.Enter += new EventHandler(myTextBox_Enter);
myTextBox.Leave += new EventHandler(myTextBox_Leave);
myTextBox.LostFocus += new EventHandler(myTextBox_LostFocus);
// Handle events.
private void myTextBox_Enter(object sender, EventArgs e)
{
myTextBox.TextAlign = HorizontalAlignment.Left;
}
private void myTextBox_Leave(object sender, EventArgs e)
{
if (Control.MouseButtons != MouseButtons.None)
myTextBox.TextAlign = HorizontalAlignment.Right;
}
private void myTextBox_LostFocus(object sender, EventArgs e)
{
if (Control.MouseButtons == MouseButtons.None)
myTextBox.TextAlign = HorizontalAlignment.Right;
}
Hope this helps
Steve S
(One of these days I really must start using this stuff properly...)
|
|
|
|
|
I am experiencing a very strange problem while trying to set the value of a public field in a class that is being accessed using .NET remoting. Assuming the following definitions:
public enum BuildMethod {
DropBox,
CVS,
}
public class BuildInfo : System.MarshalByRefObject {
/// <remarks>
public BuildMethod Method;
...
}
The problem occurs in my client when I am trying to set the value of the Method field of BuildInfo, i.e.:
xxxx.Method = BuildMethod.DropBox;
There does not appear to be a problem retrieving the value of the Method field, but only when I try to set it.
Exception Details:
System.Runtime.Remoting.RemotingException: The argument type 1 cannot be converted into parameter type Matrix.Definitions.Schema.BuildMethod.
Stack Trace:
[RemotingException: The argument type 1 cannot be converted into parameter type Matrix.Definitions.Schema.BuildMethod.]
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +264
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +877
System.Object.FieldSetter(String typeName, String fieldName, Object val) +0
Matrix.ProductMgmt.DeliveryMethodEditor.Save_Click(Object sender, EventArgs e) in D:\Matrix\WebApp\Application\ProductMgmt\DeliveryMethodEditor.ascx.cs:116
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +108
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1277
I am setting up the channel on the server side like this:
System.Runtime.Remoting.Channels.BinaryServerFormatterSinkProvider SinkProvider =
new BinaryServerFormatterSinkProvider();
SinkProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
IDictionary props = new Hashtable();
props["port"] = 10782;
this.ServiceChannel = new TcpChannel(props, null, SinkProvider);
ChannelServices.RegisterChannel(this.ServiceChannel);
I am making the object available on the server side using RemotingServices.Marshal().
I would appreciate any help or suggestions that anyone can provide. Thank you,
Clark Laughlin
|
|
|
|