assemblies

View current Assembly Version number within VS2008

余生长醉 提交于 2019-12-06 13:25:26
I would like to know if there is a way to see Assembly Version number of the last completed build within the Visual Studio 2008 IDE. I don't want to see the 1.0.* that is in the Assembly Information dialog box or AssemblyInfo file, but rather the full version (with the *'s replaced by real numbers). I also don't want to have to bring up the Properties of the project's executable or assembly. OK, I think I get your question better now, you want to see what the build number is, without actually building... as in, how does Visual Studio know what the next number will be when its setting is at * ?

ASP.NET application reference to assembly in programmatically loaded assembly

╄→гoц情女王★ 提交于 2019-12-06 12:35:52
My ASP.NET application loads an assembly and creates a class instance from an object within it. The assembly itself has a reference to a dll called "Aspose.Cells.dll" which it can access without any problems and is located on the same path as the assembly file itself. However, when I make a method call to one of its methods I get this error: Could not load file or assembly 'Aspose.Cells, Version=4.1.2.0, Culture=neutral, PublicKeyToken=9a40d5a4b59e5256' or one of its dependencies. I figure that I need to make my ASP.NET application reference this DLL as well but everything I've tried so far

How to figure out dynamically all methods with custom attribute

一世执手 提交于 2019-12-06 11:50:35
I have a simple challenge. I dynamically need to figure out all methods with a specific attribute in C#. I'm going to load the assemblies dynamically from another application and need to find out the exact methods. The assemblies look like the followings: Base.dll: Class Base { [testmethod] public void method1() ... } Derived.dll: Class Derived:Base { [testmethod] public void method2() } Now in 3rd application I dynamically like to load the above mentioned dlls and find out testmethods. If I load Base.dll, I need to get testmethod1. If I load Drived.dll, should I get testmethod1 and

How to use Ninject in constructor injection of a type in an external assembly

江枫思渺然 提交于 2019-12-06 11:30:42
问题 I am loading a type from an external assembly and want to create an instance of the type. However, this type/class is setup for constructor injection by objects currently being managed/bound by Ninject . How can I use Ninject to create an instance of this type and inject any constructor dependencies? Below is how I get this type. Assembly myAssembly = Assembly.LoadFrom("MyAssembly.dll"); Type type = myAssembly.GetType("IMyType"); 回答1: Assuming you've created a Kernel , you should be able to

Exception occured While loading dynamically EXE assembly in C++/CLI (Could not load file or assembly ', Version=1.0.3836.39802 …)

别等时光非礼了梦想. 提交于 2019-12-06 10:43:34
I am facing an exception in C++/CLI while dynamically loading assembly which itself creates an EXE in C++/CLI managed mode using Assembly.Load . It successfully loads a DLL assembly, but fails to load EXE assembly and generates the following exception: An unhandled exception of type 'System.IO.FileLoadException' occurred in TestManager.dll Could not load file or assembly 'testAssembly, Version=1.0.3836.39802, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Attempt to load an unverifiable executable with fixups` (IAT with more than 2 sections or a TLS section.) Exception from

Transferring Assembly over TCP

本小妞迷上赌 提交于 2019-12-06 10:07:53
问题 I am currently trying to send a serialized object over a TCP connection as follows - BinaryFormatter formatter = new BinaryFormatter(); formatter.Serialize(clientStream, (Object)Assembly.LoadFrom("test.dll")); where clientStream is TcpClient tcpClient = (TcpClient)client; NetworkStream clientStream = tcpClient.GetStream(); This is the sending part. But can anyone tell me how do I receive this on the client side (i.e. deserialize it on the other end)? 回答1: Don't serialize the assembly. Send

Python for .Net Error: ImportError: No module named

别来无恙 提交于 2019-12-06 07:32:05
We are using Python for .Net to call .NET API built using C# from Python script. We are getting ImportError: No module named - error when an import is done as follows. Python script: import sys sys.path.append(r"C:\myfolderA\myfolderB") print sys.path import clr clr.FindAssembly(r"AA.BB.CC") clr.AddReference(r"AA.BB.CC") from AA.BB.CC.Api.DDInterface import DDClient On the above line I am getting following error Traceback (most recent call last): File "C:\myfolderA\myfolderB\testAPI.py", line 7, in <module> from AA.BB.CC.Api.DDInterface import DDClient ImportError: No module named AA.BB.CC.Api

Having problems when two of referenced assemblies both define type A.A1

梦想的初衷 提交于 2019-12-06 07:21:40
问题 If two assemblies both define namespace A containing class A1 , then the two classes are considered unique types. a) Are the two namespaces also considered unique? b) If program P has a reference to both assemblies, how do we create an instances of the two types? Namely, I keep getting an error when I try to create an instance of A.A1 using A; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { A1 a = new A1(); // error } } } c) But if program P also defines type

How to create a Plugin Model in .NET with Sandbox?

ぃ、小莉子 提交于 2019-12-06 07:12:22
问题 Is there a way to load a .NET Assembly into a Sandbox environment that is also restricted in custom ways? I know you can run an Assembly in a different AppDomain, but can you limit it from being able to do certain things that you want to restrict? For example: I want to be able to load up a Plugin (simple, just defined via a specific interface) within a separate Assembly within an ASP.NET application, but I only want the plugin to be able to access certain Data Access Layer component and not

C# 4.0 Merge .dll assembly with .NET

眉间皱痕 提交于 2019-12-06 06:02:20
问题 I decided to leave my other question to die, since I thought of a new idea using Jeffrey Richter's method written on this page to merge a .dll library to my application. So I added my .dll file as an embedded resource and also added it as a reference. Then in Program.cs (I have no idea where the code he posted is supposed to go), I added this: ... [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); string[] args =