assemblies

How to unload the default .NET AppDomain from an unmanaged application

烂漫一生 提交于 2019-12-11 06:00:08
问题 Is there a way to unload the default .NET AppDomain from an unmanaged application? I'm using a third party tool called .NET Extender for using .NET assemblies from within Visual FoxPro which allows me to host .NET controls and also make use of .NET classes and methods from within a FoxPro environment. The problem I'm having is that when debugging an application from within Visual FoxPro it runs the everything under the main vfp9.exe application file for the IDE and it appears that handles to

Where can I find Microsoft assemblies that are not already in Visual Studio?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 05:55:51
问题 I figured someone can answer the question generally but if anyone wants to get specific I am trying to use: using System.Web.Security.SingleSignOn; using System.Web.Security.SingleSignOn.Authorization; I've googled my brains out and this is the closest answer I found: "We discussed this offline, but it looks like the ADFS assembly is GACed, but not installed on the file system or registered with VS.NET so that it shows up in the .NET tab. I'm guessing MS may need to beef up the installer for

ASP.NET unloading assemblies in the bin

末鹿安然 提交于 2019-12-11 05:55:40
问题 My ASP.NET application utilises a "Modules" system by using Type.GetType() on a fully-qualified string reference, and instantiating an object of that type, as you do. However, recently it has been throwing exceptions at not being able to find the types - but only occasionally. I haven't been able to replicate at will, but it usually happens after a simple change to something non-bin-related like a Master Page or ASCX markup. It doesn't sort itself until I rebuild the site or restart IIS.

Microsoft.Office.Interop.Excel.WorkbookClass' in Assembly 'Microsoft.Office.Interop.Excel, is not marked as serializable

廉价感情. 提交于 2019-12-11 03:55:32
问题 serialization exception:Type 'Microsoft.Office.Interop.Excel.WorkbookClass' in Assembly 'Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' is not marked as serializable. i am getting the above exception..here is the code unsafe public void Save(IStream stream, bool clearDirty, Excel.Workbook xlbook) { try { //if (stream == null) //{ // return; //} //object data = xlbook; if (xlbook == null) { return; } // convert data to byteArray MemoryStream

how do I subscribe to an event in raised in another assembly

懵懂的女人 提交于 2019-12-11 03:19:06
问题 I have a solution which contains 3 project. One project handles asynchronous communinications. When it has completed it's callback, it raises an event SomethingCompleted. How do I subscribe to this event from another project in the same solution? I have the event handlers built in the receiving project but it does not see the event in the sending project. 回答1: You need to have a reference to the class raising the event to register an event handler. Once you have that, it's done like

Can the .NET MethodInfo cache be cleared or disabled?

强颜欢笑 提交于 2019-12-11 03:04:16
问题 Per MSDN, calling Type.GetMethods() stores reflected method information in a MemberInfo cache so the expensive operation doesn't have to be performed again. I have an application that scans assemblies/types, looking for methods that match a given specification. The problem is that memory consumption increases significantly (especially with large numbers of referenced assemblies) since .NET hangs onto the method metadata. Is there any way to clear or disable this MemberInfo cache? 回答1: I don't

How do I determine what assembly a namespace is in?

五迷三道 提交于 2019-12-11 02:46:36
问题 The MSDN documentation doesn't generally specify the assembly a namespace is in, so there's no easy way to add the necessary assembly reference. NOTE: I am using MonoDevelop, so right-click, resolve is not an option. 回答1: Take a look at this example: http://msdn.microsoft.com/en-us/library/dd321424(VS.100).aspx Task(Of TResult) Class Represents an asynchronous operation that can return a value. Namespace: System.Threading.Tasks Assembly: mscorlib (in mscorlib.dll) Namespaces can cross

Modify the version information of a built .NET assembly

血红的双手。 提交于 2019-12-11 02:46:21
问题 Is there a better way to modify the version information of a .NET assembly of the one I am currently using. My current approach is the following. I do disassemble the assembly with ildasm : ildasm /nobar Riolo.WebUI.dll /out=Riolo.WebUI.il This will generated also a Riolo.WebUI.res compiled resource file, that I then open and modify with the user interface of Visual Studio, then I do reassemble the assembly back with ilasm : ilasm Riolo.WebUI.il /OUTPUT=Riolo.WebUI.dll /RESOURCE=Riolo.WebUI

Glimpse MVC3 DLL being 'forgotten' as part of Application Pool recycle

南笙酒味 提交于 2019-12-11 02:26:25
问题 We're trying to get Glimpse up and running in our environment but coming across a strange problem. We've installed Glimpse.Core, Glimpse.AspNet, and Glimpse.Mvc3.dll and when we configure web.config to enable Glimpse everything works fine until the Application Pool recycles . Once the AppPool recycles, it's as if the site 'forgets' about Glimpse.Mvc3.dll and the Mvc3 tabs (Execution, Model, Metadata) disappear. Here are the steps (for us) to reproduce: Modify web.config to include Glimpse

Changing Assembly Name gives errors

本秂侑毒 提交于 2019-12-11 02:09:41
问题 When I change the assembly name of my project, i.e from "Gui" to "Gui2", I get many errors during build. Most of these errors contain "xxxx could not be found (Are you missing a using directive or an assembly reference?) What am I doing wrong? 回答1: You'll need to fix up all of the references to that assembly to use the new name. Depending on how you made the change, you may also need to fix up namespace references. 回答2: If you are referencing this Assembly in any of the other projects in your