assemblies

Weird compatibility problem with .Net 3.5 and 4.0 assemblies (NATUPnPLib)

本小妞迷上赌 提交于 2020-01-11 08:43:19
问题 I'm having trouble getting NATUPnP 1.0 Type Library to work with Framework 3.5 in Visual Studio 2010. If I use .Net 4.0, it works just fine, but with .Net 3.5, NATUPNPLib's namespace looks excactly like NETCONLib's. For example this Port Forwarding Management Application sample from this site: http://pietschsoft.com/post/2009/02/05/NET-Framework-Communicate-through-NAT-Router-via-UPnP.aspx ..is using .Net 3.5, but I can't get it to compile in Visual Studio 2010 unless I change it to .Net 4.0.

When does the CLR try to load a referenced assembly?

人走茶凉 提交于 2020-01-11 05:38:09
问题 I want to write a small installer app that installs a web site and creates IIS virtual directories. The app should run on Windows XP/Server 2003 (IIS 6) as well as on Vista/2008 (IIS 7). The problem is: for IIS 6 we create virt dirs by calling WMI/Metabase API, for IIS 7 there is a much better API: Microsoft.Web.Administration, but its assembly is available only on IIS 7 systems. Naive approach: ... if (OperatingSystem == old) { call metabase API... } else { call Microsoft.Web.Administration.

When does the CLR try to load a referenced assembly?

怎甘沉沦 提交于 2020-01-11 05:38:09
问题 I want to write a small installer app that installs a web site and creates IIS virtual directories. The app should run on Windows XP/Server 2003 (IIS 6) as well as on Vista/2008 (IIS 7). The problem is: for IIS 6 we create virt dirs by calling WMI/Metabase API, for IIS 7 there is a much better API: Microsoft.Web.Administration, but its assembly is available only on IIS 7 systems. Naive approach: ... if (OperatingSystem == old) { call metabase API... } else { call Microsoft.Web.Administration.

ASP.NET hostingEnvironment / shadowCopyBinAssemblies

末鹿安然 提交于 2020-01-11 05:22:06
问题 Today I stumpled upon the shadowCopyBinAssemblies option in the hostingEnvironment tag. Appearently this attribute it is a web.config (system.web) configuration Boolean option indicating whether the assemblies of an application in the Bin directory are shadow copied to the application's ASP.NET Temporary Files directory. <hostingEnvironment shadowCopyBinAssemblies="false" /> A colleague had to enable this setting because (only) on his development machine he frequently got that ASP.NET error

Assemblies vs Class Libraries (.NET)

断了今生、忘了曾经 提交于 2020-01-11 02:57:06
问题 Could anyone point out the advantage of using assemblies, in the 'context' of ASP.NET. As I understand it, assemblies run as executables, have a single entry point, and can be run inside an application domain, but I've found very few suitable examples on the web. 回答1: An assembly is not just an executable... an assembly is essentially a .NET library that may have an executable entry point... Wikipedia article with description of assemblies First paragraph: In the Microsoft .NET framework, an

How to update the Value in Assemblyinfo.cs dynamically

百般思念 提交于 2020-01-10 19:38:25
问题 I have writen a program which gets the value from SVN repository . Now I want to update the AssemblyFileversion with that value. As I am not able to write any code inside Assemblyinfo.cs , how will I update the value of AssemblyFileVersion. I want to achieve something like this .......................... // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can

What is the best practice for compiling Silverlight and WPF in one project?

和自甴很熟 提交于 2020-01-10 10:24:19
问题 I've just completed a Silverlight project and it's time to have a little clean up. I'd like to take my core files and put them into a separate project which I will reference from my main Silverlight app. Some of these classes are compatible with WPF and I would quite like to be able to have Silverlight / WPF code all in one project. My ideal solution would be a single project that allows multiple configurations. So, Configuration: Silverlight would generate: Company.Controls.Silverlight.dll

What is the best practice for compiling Silverlight and WPF in one project?

无人久伴 提交于 2020-01-10 10:23:08
问题 I've just completed a Silverlight project and it's time to have a little clean up. I'd like to take my core files and put them into a separate project which I will reference from my main Silverlight app. Some of these classes are compatible with WPF and I would quite like to be able to have Silverlight / WPF code all in one project. My ideal solution would be a single project that allows multiple configurations. So, Configuration: Silverlight would generate: Company.Controls.Silverlight.dll

How does the number of classes in an assembly impact performance?

纵饮孤独 提交于 2020-01-10 03:18:04
问题 The project I'm working on will generate code for a large number of classes - hundreds to thousands is expected. It is not known at generation time how many of these classes will actually be accessed. The generated classes could (1) all live in a single assembly (or possibly a handful of assemblies), which would be loaded when toe consuming process starts. ...or (2) I could generate a single assembly for each class, much like Java compiles every class to a single *.class binary file, and then

How to find out which assembly handled the request

喜你入骨 提交于 2020-01-09 09:36:11
问题 I have a Web solution which contains two projects ( A and B ) with B referencing A . In A I have an Html extension method that obviously can be called from either A or B . My question is once the method is called (usually from a partial view) is there a way inside the method to figure out whether the call came from Assembly A or Assembly B without passing anything to it? I tried to see if I can do anything with HttpContext.Current.Request but could not find anything useful. I can get the URI