.net-assembly

Get SvcHost assembly location (path) using SvcImplementation assembly

。_饼干妹妹 提交于 2020-01-16 05:47:27
问题 I have windows 8.1 x64, Visual Studio 2012 x86, IIS 8.5. I have Wcf Service Host project (contains svc file) <%@ ServiceHost Language="C#" Debug="true" Service="WcfServiceImplementation.MyService" %> I have Wcf Service implementation project. Wcf Service hosted in IIS I have 2 assemblies: WcfService.Host.dll and WcfServiceImplementation.dll This code in WcfServiceImplementation.dll: 1) Assembly.GetEntryAssembly() gets null. 2) Assembly.GetExecutingAssembly() gets WcfServiceImplementation. 3)

Configuration of .NET assembly binding of any newer assembly version in app.config <assemblyBinding>/<codeBase>

这一生的挚爱 提交于 2020-01-14 19:14:36
问题 In a C# project, I use an external assembly and add it in the References of the project. Let's say the assembly is called " ABC " , located at compile-time c:\complie-time\abc.dll of version 1.0.0.0 . The "Copy Local" is set to false. Because it is not copied local, the assembly location has to be specified in app.config. <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="ABC" culture="neutral" publicKeyToken="xyz"/> <codeBase

Trouble with “Assembly.EntryPoint.Invoke” [C#]

不打扰是莪最后的温柔 提交于 2020-01-13 19:30:30
问题 I have the following problem: I am compiling C#-code at runtime using the CSharpCodeProvider in Microsoft.CSharp . The created application runs perfectly, if I double-click on the generated file. If, however, I am loading my created assembly with Assembly.Load and invoking the entrypoint-method with Assembly.Load("...").EntryPoint.Invoke(null, null) , I get a NullReferenceException . The NullReferenceException is referring to the value of the .EntryPoint -Property. When I debug the variable

What is assembly interning?

帅比萌擦擦* 提交于 2020-01-13 18:21:07
问题 What is assembly interning? For what purpose it is used for? I heard that it is a new feature added by ASP.Net 4.5. Can anyone please explain this feature. Is it same as String interning? 回答1: From book Developing Windows Azure and Web Services: ASP.NET has a feature called shadow copying that enables assemblies that are used in an application domain to be updated without unloading the AppDomain. Normally, this is required because the Common Language Runtime (CLR) will lock the assemblies so

“The located assembly's manifest definition does not match the assembly reference”

为君一笑 提交于 2020-01-13 07:34:21
问题 I have deployed an .NET WebAPI app (compiled against .NET 4.5.2, and running locally) into an Azure App Service. The error thrown there is Could not load file or assembly 'System.Web.Mvc, Version=4.0.40804.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. I have checked that the System.Web.Mvc.dll in the App service's bin directory has a size of 505504 bytes - the very same size as

System.Data Assembly Not found

让人想犯罪 __ 提交于 2020-01-12 19:01:32
问题 I have a reference to System.Data in my windows service project. I keep getting the Exception : Could not load file or assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified. I attach the FusionLog to my code and found out the following. For System.Data only visual studio is looking here: Assembly manager loaded from: C:\windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll And it should

The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced

夙愿已清 提交于 2020-01-11 02:10:51
问题 The Problem Error when going to a specific page (in local debug): CS0012: The type 'System.Data.Linq.DataContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Here are the referenced lines of code in the error message: Line 28: Line 29: Line 30: public class _Page_Views_blah_granny_cshtml : System.Web.Mvc.WebViewPage { Line 31: Line 32: #line hidden All other pages

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

Include version number in exe file name in C# Visual Studio desktop application

我们两清 提交于 2020-01-06 19:27:47
问题 I looked everywhere for a solution, and I think that it's impossible to do that ! Can I include the version number (that is in AssemblyInfo.cs) into the .exe filename ? So I don't have anymore to rename the output exe file every release build. I just posted this question to be sure that in fact, it is impossible to do that. Otherwise, if someone has a working solution I'll be happy to know it. Thank you EDIT I'm not searching how to get the assembly version, which I can find, but I'm looking

Cannot find decorated function name in dll

五迷三道 提交于 2020-01-06 08:24:14
问题 I created a dll project in Visual Studio 2013 After compiling, I run dumpbin /symbols DLLTest.dll via cmd.exe in the directory where the dll is located, but I only get the summary I ran dumpbin /all DLLTest.dll (with the text output option) but I could not find the decorated function name in the output (I searched for int and getSomeNum that should be part of the decorated name in the output dump). I also tried to find a way in VS2013 to enter /FAs into the compiler options, but I was unable