assemblies

Does using assembly compiled in older version of .NET framework affects whole performance?

白昼怎懂夜的黑 提交于 2019-12-18 11:55:38
问题 Lets imagine that we have two assemblies: Foo.Logic (compiled on .NET 2.0 framework) Foo.Application (compiled on .NET 4.0 framework) that have reference and uses compiled Foo.Logic. Does it have impact on Foo.Application performance (or have any other drawbacks)? 回答1: In the situation you described in the question, everything will Just Work™ without any problems. A .NET 4.0 application will load a .NET 2.0 library directly into the .NET 4.0 runtime environment. It will not use side-by-side

C# assemblies, whats in an assembly?

半腔热情 提交于 2019-12-18 11:44:43
问题 I'm trying to understand the internal access modifier in C#. I can't seem to understand what an assembly is exactly, and what part of my program is held inside that assembly. I was trying to make it so that a variable is accessibly only by objects within the following namespace: namespace Engine.Entity The variable in question is defined in a class inside of that namespace, so I assumed if I made it internal, only objects inside of that namespace have access to it. I am seeing assemblies and

Problem getting the AssemblyVersion into a web page using Razor /MVC3

梦想的初衷 提交于 2019-12-18 10:11:16
问题 I'm using the following code in a footer in my _Layout.cshtml file to put the AssemblyInfo version data into the footer of every page in my MVC3 site. However: @System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() Just prints in the footer: Revision 0.0.0.0 When I modified the view to display all of the assembly info for the "Executing Assembly" using the following @System.Reflection.Assembly.GetExecutingAssembly().GetName().ToString() Which prints the following:

Read embedded file from assembly

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 09:36:57
问题 I have to pass the path of a config file to a framework method (Gurok SmartInspect). The config file is an embedded resource of the assembly. Currently I read the file from the assembly and store it outside and then pass the pathName. Is there a better / less complicated way to achieve this goal, without copying the file? private static void ConfigLogger() { const string embeddedFileName = "xxx.SmartInspect.properties"; const string configFileName = "SmartInspect.properties";

How can I retrieve an embedded xml resource?

安稳与你 提交于 2019-12-18 06:16:15
问题 I added an XML file as an embedded resource in my class library by using the accessing the project properties in Visual Studio and then Resources | Add Resource | Add Existing File... I've tried to access the file using the following code, but I keep getting a null reference returned. Anyone have any ideas? var path = Server.MapPath("~/bin/MyAssembly.dll"); var assembly = Assembly.LoadFile(path); var stream = assembly.GetManifestResourceStream("MyNamespace.filename.xml"); 回答1: The MSDN page

Cannot add System.Web.dll reference

末鹿安然 提交于 2019-12-17 22:25:54
问题 I'm trying to use the HTTP functions contained in the System.Web.dll assembly. However, whilst the dll seems to exist in the same directory as every other dll Visual Studio 2010 references in my project, it fails to link in and raises a warning - "The referenced component 'System.Web' could not be found". The dll, however, is definitely there within the same folder as all others referenced by the project and selecting it in 'browse for reference' mode allows me to add it - it then fails to

Serialization Assembly. Is it needed or not?

与世无争的帅哥 提交于 2019-12-17 20:57:14
问题 I have a .net 2.0 c# ClickOnce app and it connects to its data via Web Services. I've been told that one way to potentially speed up the application is to generate a serialization assembly beforehand. I have several questions on this front. The default setting to whether to generate a serialization assembly is Auto. What criteria does VS2005 use to decide whether to generate a serialization assembly or not? It seems like it does not generate under Debug configuration, but it does under

How can I use a .Net assembly in Java

允我心安 提交于 2019-12-17 20:25:46
问题 I want to use a Microsoft .Net Assembly in a Java Application. Is there any way out to do that. Any help will be appreciated. 回答1: Java and .Net run an fundamentally different systems: the JVM and CLR respectively. It's not possible to directly load one into the other and use it. They are incompatible formats. It is possible though to have .Net and Java components interact through a bridge layer. There are several out there which provide this behavior http://www.jnbridge.com/ http://java

Preload all assemblies (JIT)

核能气质少年 提交于 2019-12-17 19:25:50
问题 We are taking a hit the first time some heavy UI screens are loaded. Our project is divided into one main executable and several DLL files. The DLL files can also contain UI screens which are slow the first time they are loaded. Is there a way (in code) we can preload all the referenced assemblies so as to avoid the JIT compilation hit? I know there is a tool called NGen. Is it possible to operate NGen in a development environment so we can see its effects instantly? Ideally though, we would

Maven assembly - Error reading assemblies

假如想象 提交于 2019-12-17 19:18:17
问题 I have defined a personalized jar-with-dependencies assembly descriptor. However, when I execute it with mvn assembly:assembly, I get : ... [INFO] META-INF/ already added, skipping [INFO] META-INF/MANIFEST.MF already added, skipping [INFO] javax/ already added, skipping [INFO] META-INF/ already added, skipping [INFO] META-INF/MANIFEST.MF already added, skipping [INFO] META-INF/maven/ already added, skipping [INFO] [assembly:assembly {execution: default-cli}] [INFO] ---------------------------