|
I read somewhere on the web that the version of gacutil used to register an assembly must be specific to the version of the .NET framework that the assembly was written in. Is this true? It seems like the latest version of gacutil should be able to handle backwards compatibility for that. Please let me know.
Also, I have VS2008 installed on my laptop. I did a search for gacutil and I found 2 different versions:
1. C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\gacutil.exe
2. C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe
Do I need to add the paths for both of these to my Path environment variable? If I do this then won't my machine just pick up the first gacutil that is in my Path variable?
|
|
|
|
|
I figured it out - my assumption was correct. However, now I am trying to reference an assembly in the GAC:
I'm trying to figure out how to reference assemblies in the GAC.
I have the following assembly installed in the GAC:
Dalc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f71ce40ac4e60391, processorArchitecture=MSIL
I have researched this issue on the web and the solution to this problem appears to be to add the following block to machine.config:
<system.web>
<compilation debug="false" explicit="true" defaultlanguage="c#">
<assemblies>
<add assembly="Dalc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f71ce40ac4e60391, processorArchitecture=MSIL" />
</assemblies>
</compilation>
</system.web>
(I have also tried this with Web.config).
I did this and restarted VS2008 but unfortunately when I add a using directive of "using Dalc;" the Dalc reference is not found.
Am I doing something incorrectly or is there a better way of doing it? I have read about one option of copying a version of the dll into a local directory as a reference (and supposedly the system will revert to the GAC). However, this alternative does not seem like a very elegant approach. Any suggestions?
modified on Tuesday, November 18, 2008 1:35 AM
|
|
|
|
|
If I'm understanding correctly, you installed your .dll in the GAC and you're getting DALC reference is not found.
Did you add a reference to your .dll in your project? If not, you need to add it before you can use it. Goto project properties, references, and add your .Net .dll in.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
My Dalc.dll registered in the GAC is not available from the Add Reference ".NET" tab or "Browse" tab.
I think I would have to add a registry key for my Dalc.dll in order for my Dalc.dll to display in the ".NET" tab.
I don't think GAC items are selectable from the "Browse" tab so I would need to copy down a local version of Dalc.dll to a local directory first in order to add Dalc.dll from the "Browse" tab. I'd rather not have two intances (GAC + local) of the dll if I can avoid it.
|
|
|
|
|
Re-editing my message to make it a little clearer.
Read this article.
I created a post build event that copies all my strong named .dlls into a folder "c:\Bin\Assemblies" (rather than referencing the GAC file path directly) when doing a release build.
When creating a new project, I reference the necessary .dlls in the c:\Bin\Assemblies folder (and do not have them installed in the GAC at all). You can toggle the copy local setting per .dll as needed.
During deployment you can install the .dlls in the GAC and the client will be fine (assuming they are strong named, etc).
Hopefully this helps you out.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
modified on Wednesday, November 19, 2008 8:19 AM
|
|
|
|
|
What is the difference between CLR and FCL?
|
|
|
|
|
The CLR is the common language runtime. It's the runtime written in C++ that runs managed code.
The FCL is the framework class library. It's the set of APIs written in C# that you code .NET programs against. For example Console.WriteLine is an API inside the FCL.
|
|
|
|
|
Is there a way to be notified, through an event or callback, when any control property changes? For example, I would like to have my code notified if any public property changes on my Form's System.Windows.Form.Text control.
Thanks,
Aaron Stibich
|
|
|
|
|
There's no single event that does this. You'd have to create your own version of the control, and add override every On...Changed method in the control, calling code that raises your own event.
|
|
|
|
|
Hi,
Would any body please help me. i want give a message from aspx.cs file in any wrong.
like
Show message(ex);
shoeMeggae("Data save succefully.")
so how can i create create The massegebox and use it from .aspx.cs file in asp.net c#.
I like to give thanks first
Best Regards
fatema
|
|
|
|
|
Hi there you can try to register the a client side script @ runtime
try the code below:
string tmp = "";
tmp = "";
tmp += "alert('Quantity shouldn't exceed the Order Items');";
tmp += ";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MyScript", tmp);
// and if u want to alert message for Exceptions
string tmp = "";
tmp = "
tmp += "alert('Exception :" + ex.Message + "');";
tmp += "";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "MyScript", tmp);
WaelA
Senior Software Engineer
abu_wer@hotmail.com
|
|
|
|
|
private void showMsg(string str)
{
Response.Write("alert('" + str + "');");
}
Call it like:
showMsg(ex.Message);
|
|
|
|
|
I am playing with the custom form designer example application posted here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;813808
I extended the for tool box to include a 'SplitContainer' control, but the container fails to create the control. The failure occurs when the container calls
SplitContainerDesigner.Initialize(component).
The exception is {"Object reference not set to an instance of an object."}, which doesn't make sense since both the designer and component seem to be initialized properly.
I don't seem to be the only one having this problem. I saw a similar question posted here:
http://www.developmentnow.com/g/32_2005_9_0_0_602525/VS2005b2-SplitContainerDesigner--designer-Initialize-throw-an-exception.htm
Thanks
Aaron Stibich
|
|
|
|
|
Hi everyone,
Can anyone guide me thru this?
I'm quite bit confused with the ADO.NET connected & disconnected architectures
The working method is not the prob, but i just wanted to know the real SIGNIFICANCE of both.
ie, if connected Arch is better than disconnected arch, then why do we need disconnected arch in ADO.NET
Or Vice versa.
I hope u guys got me..
Thanks in advace.
"Nothing goes unknown, unless.... "
i think u know the answer
|
|
|
|
|
Disconnected architecture means that you retrieve the data and work with it without being connected to the database. Basically, this means that you aren't holding connection resources open, which makes applications much more scalable. If you are working on a web application, then you can't really work in any other way - it is impractical and undesirable to leave connections open in scenarios like this.
|
|
|
|
|
Hi man,
Thanx for the reply. But i hv one more query.
If disconnected architecture is more reliable and scalable than the connected one, then why do we need the Connected Arch? why does ADO.NET provide both of them..?
The name is Sandeep
|
|
|
|
|
You should use connected arch. for quickly reading data in a readonly manner (meaning each record is read one time and navigation to past records is not possible). Can be used to quickly fill controls, etc.
Using data readers def has its place and is very quick when used appropriately.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
thanks buddy. i think i got it somewhat clear.
kissdznuts wrote: Using data readers def has its place and is very quick when used appropriately.
can u please give a scenario in which the above said is satisfied..?
The name is Sandeep
|
|
|
|
|
A form could have a couple combo boxes that users cannot change the values of and each contains 50 items. You could use datareaders to very rapidly fill the combos. You might have to fill a collection or list object of some kind, you could initially fill the data quickly with a data reader.
You wouldn't want to use a data reader and between each read perform a ton of checks and toggling UI properties, etc because you're keeping the connection alive. You want to use data readers in operations were the reads are very quick and then close the connection.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hey there all, I'm just throwing this out there to see if anyone might have an idea on something to try:
I have recently developed a new Web User Control. This is not my first User Control, I have built many. The control itself does not seem to have issues. I and others in my office can compile and use the control just fine. Yay. However, we have an off site developer to whom I have sent the source code for the control. I did not leave anything out, any required JavaScript, CSS, all required files were sent with the control. However, when he attempts to compile his site with the control, he is getting compiler errors that would seem to indicate that he is not running the correct Framework version. For example, it will not compile with automatic properties (that is, properties that rely on the compiler to build their implementation and add the associated fields to the class), and also rejects methods that are specific to Framework 3.5 such as the Generically typed "ToArray()" method of the Generic List class that is provided as an extension through the System.Linq namespace in .Net 3.5.
I asked the developer to check his target Framework for the site. It is 3.5
I asked him to check which version of System.Core his site was referencing. It is, indeed, referencing version 3.5.0.0.
I made doubly sure that the code behind file for the control contains a using statement for the System.Linq namespace, it does.
The developer apparently did not have SP1 for VS2008 or .Net 3.5 installed but he has since installed the Service Pack.
Has anyone else run into an issue like this or have an idea for something else to try. At this point I am prepared to redevelop the control as a Web Server Control so that I can send it to him pre-compiled, but we are being pushed for a deadline so if there is some quick fix out there I'd love to try that first.
Thanks for any and all suggestions.
"We are men of action; lies do not become us."
|
|
|
|
|
Hi all,
How can I call MFC-dialog from managed code?
I tried to do this using platform invoke service but application core dumps because of assertions deep in MFC (because in this case I have no MFC's CWinApp running and so on).
Please advice.
Thanks
|
|
|
|
|
Which technology in .Net is equivalent to EJB?
|
|
|
|
|
What the heck is EJB?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
kissdznuts wrote: What the heck is EJB?
Enterprise JavaBeans.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
EJB is Java, .NET is Microsoft. Please elaborate more clearly what you are trying to find out. What exactly do you mean by technology equivalence between the two?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|