assemblies

AssemblyInfo.cs for WebSite in Visual Studio 2005

荒凉一梦 提交于 2019-12-25 04:54:17
问题 I am using WebSite project in Visual Studio 2005. I don't see any AssemblyInfo.cs created for a WebSite project. Can I manually create AssemblyInfo.cs in a Properties folder there or is there any better way? Its an existing project so I can't change it now. I am maintaining this WebSite project and want to add log4Net using PostSharp. 回答1: The AssemblyInfo.cs is required to holds information for versioning the assembly. Normally you will provide your public key generated by the sn.exe utility

Sharepoint 2010 Project package: Cannot add a new project output assembly to the package

≯℡__Kan透↙ 提交于 2019-12-25 04:42:56
问题 When creating a Sharepoint 2010 project in VB.NET and wanting to deploy an additional referenced assembly you cannot add a new project output assembly to the package. To replicate the issue: Open Sharepoint 2010 project in Visual Studio 2010 Open "package\package.Package" Select "Advanced" In the Additional Assemblies area select "Add | Add assembly from Project Output..." This error is then presented: Cannot add a new project output assembly to the package. The path is not of a legal form.

Ensuring an assembly is called via a specified assembly

末鹿安然 提交于 2019-12-25 03:15:22
问题 Is there any built in functionality to determine if an assembly is being called from a particular assembly? I have assembly A which references assembly B . Assembly A exposes PowerShell cmdlets and outputs types that are found within B . Certain methods and properties with in types of exposed by B are of interest to types in assembly A but not of interest to consumers of PowerShell or anyone attempting to load types in B directly and call methods within it. I have looked into

Referencing both System.Web and System.Windows.Forms

偶尔善良 提交于 2019-12-25 02:59:01
问题 What exactly is wrong with referencing both System.Web and System.Windows.Forms in my class library? For example, library could contain some code which needs to reference Web or WinForms-specific classes. 回答1: Well, if you do this, you will have overhead if you use that library and the danger, that Web code uses the Forms lib and vice versa. I would split it in 3 Parts - a common one and one Web and one Forms part, so you only have to use the common and the part you need. By that, you

Namespace, assembly, and inheritance hierarchy when including

China☆狼群 提交于 2019-12-25 02:29:27
问题 Often when including namespaces or assemblies into my code, I often run into strange cases where a namespace is inherited from another, yet classes from the parent namespace are not available. For example, when using List<> or Dictionary<> , I use the System.Collections.Generic namespace. However, if I also want to use an IEnumerator , I also have to include the System.Collections namespace. Shouldn't System.Collections already be referenced by any member of System.Collections.Generic , as it

Copy Local = false ignored when I Publish my ASP.NET Web Application

早过忘川 提交于 2019-12-25 02:26:57
问题 I have an ASP.NET Web Application that has several references set. I have Copy Local set to False for several of them, but when I Publish my application it copies the .dlls anyway. How can I turn that off for good? The dlls are registered in the GAC on the web server and I want to make sure that those are references instead of local copies. Thanks! 回答1: Do you have the assemblies registered in the GAC on your local developer machine? If not, register them in the GAC there and it should honor

Deserialize matching types from different assemblies

谁说我不能喝 提交于 2019-12-25 00:46:19
问题 If I have a class/interface pair defined in AssemblyA under namespace AssemblyA.Entities : public IEntity { string Name { get; set; } } [Serializable] public Entity : IEntity { public string Name { get; set; } } And I serialize it to XML using XmlSerializer : var myEntities = new List<IEntity>(); // myEntities is populated somehow var data = XmlSerializationManager.Serialize(myEntities); // 'data' gets saved to disk somewhere as a file Then , if I duplicate the code/namespaces into AssemblyB

MSVCR100D.DLL and dependency walker

泪湿孤枕 提交于 2019-12-24 16:56:08
问题 I put MSVCR100D.DLL into the c:\windows\system32 folder but dependency walker is still complaining about it being missing. Any ideas? 回答1: Dependency walker hasn't been updated in a very long time. I think the author just gave up trying to keep up with Windows development. Particularly resolving side-by-side manifest lookup rules is a very hard problem to solve. SetDllDirectory() is impossible to resolve statically. It isn't very smart about delay-loaded DLLs and it doesn't know anything

crawledPage.HttpWebResponse is null in Abot

人盡茶涼 提交于 2019-12-24 12:34:48
问题 I'm trying to make a C# web crawler using Abot I followed the QuickStart Tutorial but I cannot seem to make it work. It has an unhandled exception in the method crawler_ProcessPageCrawlCompleted , in exactly this line : if (crawledPage.WebException != null || crawledPage.HttpWebResponse.StatusCode != HttpStatusCode.OK) { Console.WriteLine("Crawl of page failed {0}", crawledPage.Uri.AbsoluteUri); } Because crawledPage.HttpWebResponse is null. I'm probably missing something but what ? Notes and

old dlls in GAC are still being used

时光总嘲笑我的痴心妄想 提交于 2019-12-24 10:36:29
问题 I have a set up where the assembly is published to the GAC after each build. But My application uses the old dll all the time. After build the new dlls are created in a new folder. The folder names are 7.1.7573.0_ d516cb311 and 7.1.5000.8888 _d516cb311. The second folder being the latest. It seems(from the folder name) my current code is publishing old dll. Is it the reason my application is using old dll? If yes What will I have to do so that currect assembly is published? Edit: In the web