How would one use .net reflection to determine the type of the executing assembly, by type I mean dll or exe. Currently its possible to do something like:
Assembly.GetExecutingAssembly().CodeBase.ToLower.EndsWith(".exe")
But it seems like something better could exist that does not need to do a string comparison, i.e. comparing the asse...
I'm trying to export a control library in a .dll for other developers in the office to consume.
The solution I original created looks like this:
Solution 1:
- Mri.Controls (Class Library)
- Mri.FmTool (Web Application)
Mri.FmTool references Mri.Controls.
Inside Mri.Controls, I have some javascript WebResources. Mri.FmTool seems t...
Hello,
I downloaded zlib.NET and there's a file that I must import,its named "zlib.net.dll".
My question is :How do I import that file so I can use it in C# Express 2008 like "System.zlib.etc"?
Thanks.
...
My project references an assembly (will call it X) that references another assembly (will call it Y).
When I try to compile my project, it demands that it should reference assembly Y. Why is that? I get the following error on the line where assembly X is referenced:
The type 'DevExpress.XtraEditors.XtraForm' is defined in an assembly...
I have the following client application and its corresponding config file:
namespace Chapter9
{
class Program
{
static void Main(string[] args)
{
AppDomain.CurrentDomain.ExecuteAssembly("AssemblyPrivate.exe");
}
}
}
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-micro...
Hi,
At the moment I am trying to get into the ASP.NET MVC framework.
For most of my test applications I used a single assembly/project. This worked fine for some smaller applications. Then I wondered how I could place my model, controller and view classes into separate assemblies? In really big web-applications it is not very realistic ...
In .Net, given a type name, is there a method that tells me in which assembly (instance of System.Reflection.Assembly) that type is defined?
I assume that my project already has a reference to that assembly, just need to know which one it is.
...
I'm jumping into unit-testing the Visual-Studio 2008 way, and I'm wondering what's the best way to accomplish cross-assembly class access for testing purposes.
Basically, I have two projects in one solution:
MyProject (C#)
MyProjectTests (C# Test Project)
Everything in MyProject currently has default accessibility, which if I recall...
What is the best way to check if a dll is a win32 dll or if it is a clr assembly. At the moment I use this code
try
{
this.currentWorkingDirectory = Path.GetDirectoryName(assemblyPath);
//try to load the assembly
assembly = Assembly.LoadFile(assemblyPath);
return assembly...
There is an enum of all supported processor architectures here: http://msdn.microsoft.com/en-us/library/system.reflection.processorarchitecture.aspx
Is there any way to determine which one corresponds to the running environment? System.Reflection.Assembly.GetExecutingAssembly().ProcessorArchitecture returns MSIL -- obviously wrong.
EDI...
I'm building a tool in managed code (mostly C++/CLI) in two versions, a 'normal user' version and a 'pro' version.
The fact that the core code is identical between the two versions has caused me a little trouble as I want to package the resulting tool as a single assembly (DLL) and I don't want to have to include the .cpp files for the...
Hello Devs,
How can I tell my .NET application where to look for a particular assembly which it needs (other than the GAC or the folder where the application runs from)?
For example I would like to put an assembly in the user's Temp folder and have my application know that the referenced Assembly is in the temp folder.
Thanks
...
I built an assembly containing one js file.
I marked the file as Embedded Resource and added it into AssemblyInfo file.
I can't refernce the Assembly from a web site. It is in the bin folder but I don't see the reference to it.
It seems like not having at least a class inside the assembly I can't reference it.
I would include the js f...
Hello,
This must be a trivial question to some, but I haven't found any actual information about this.
I have an ASP.NET MVC web application. As I like to write reusable code, I'd like to put my Controllers into a separate library assembly and reuse them across multiple web applications.
The question is, how can I tell ASP.NET MVC tha...
IronPython.net documentation says the MSIL in the assembly isn't CLS-compliant, but is there a workaround?
...