Hi!
I have an e-commerce website that is already up and running for some time. It's built on .NET 3.5. So far, so good.
The "problem" is that now I need to start sharing functionality (products list, order mechanics, customer information, etc) from this project with new projects and external vendors. Since I know the thing is gonna be ...
In other words, if I have a compiled dll file, is there a way to find out (using Reflection) whether this dll is produced from a WebApplication, ClassLibrary or another project type? Is there any difference at all?
...
I have a class library that uses some xml files found in its own directory.
When referencing this library from another project, how do I ensure the library is working from it's own directory?
I tried Assembly.GetExecutingAssembly().Location but that still returns the path of the startup project.
...
I'm developing a project where users need to build reporting queries using complex Linq statements to generate data sets.
The best way I could think of to compile these user-generated queries and then execute them is to use the CSharpCodeProvider object to build an assembly and then store the result in a database blob.
Is there anythin...
I'm working on an application where users can create classes programatically at runtime. They have a UI screen where they fill out meta data which gets turned into classes. Basically, the data the user enters is used to generate properties in the .cs file.
So, I need to be able to instantiate an object from the generated class file af...
This is a deliberate repost of an earlier question. The reason why I'm posting a question that has already been answered is I beleive it wasn't answered completely.
My question is this: how does VS populate its Add References dialog for .Net objects? So far, I know about the following:
The PublicAssemblies folder inside VS's installat...
Is there any way to prevent o.GetType() from throwing an exception when called on an object whose type is internal and resides in another assembly?
I am wrapping a COM based API inside a .Net assembly so that it is possible to benefit from more native .Net integration (Collection interfaces, streams, exceptions etc.). The collections t...
The Visual Studio 2010 SDK ships with many assemblies like Microsoft.VisualStudio.Text.Data and Microsoft.VisualStudio.Text.UI that are just stubs. To write an extension for Visual Studio, you reference these assemblies, but set "Copy Local" and "Exact Version" properties of the references to false. When your extension is loaded in Visua...
I have a project that adds some extensibility to another application through their API. However, I want to be able to use the same project for multiple versions of their application, because most of the code is the same.
However, each version of the application requires a reference to the proper assembly for that version of the software...
It's possible to use the same strong name key for multiple related projects/assemblies.
I'm interested to know whether there are any drawbacks to using this approach. SPecifically, can it lead to a lack of security?
One area I'm thinking about this is in the use of the friend assemblies.
...
I have a project which has several custom descriptors written for the assembly plugin. Is there a way to run only one of those descriptors at a time instead of the whole bunch? I tried using the descriptors switch as documented here, passing in the full path to the one descriptor that I wanted to run, but instead it's running all of the ...
Is there a way to use visual studio's "add assembly reference dialog" (or something similar) in my own application? I need it for dynamic code generation and compilation.
This is not simply an OpenFileDialog, since it additionally looks into the GAC and so on, so it will be very complicated to do it on my own, I think.
If this is not p...
We have a product where the infrastructure/application and UI code is generic for the most part (some views may have to be tweaked but this is only in spark files). The domain model however may change from client to client and this needs to be easily swapped out and replaced with an assembly with potentially more properties/data on the e...
I have a assembly. In this assembly I have a class and interface. I need to load this assembly at runtime and want to create an object of the class and also want to use the interface.
Assembly MyDALL = Assembly.Load("DALL"); // DALL is name of my dll
Type MyLoadClass = MyDALL.GetType("DALL.LoadClass"); // LoadClass is my class
object ob...
In the build process for a .NET C# tool, I have been using ILMerge to merge the assemblies into a single exe.
I added a new class library recently, and now the ILMerge is failing. I have remembered to tell it to merge in the new DLL!
It is now giving me this error, which I don't really understand:
ILMerge.Merge: The assembly
'Da...
how can I protect my assembly, because once I deploy the setup,
assembly will be deployed too, and there are chances that user will get the assembly from Program Files, and may add reference to any other project or create new project based on it ! any solution or help would be appreciated thanks.
...
Having a .NET assembly, how can I detect whether it was built for .NET CF or a full framework?
...
All my data logic is in another data layer project that I reference in my asp.net mvc project.
Now if I call:
CategoryDAO.GetById(1);
Everything works fine.
If I call:
CategoryDAO.GetBlah(1);
VS.NET complains saying
"Error 102: The type 'NHibernate.Criterion.Order' is defined in an assembly
that is not referenced. You must a...
I have a .net application with about 10 assemblies. It would be nice to have them all together as a single assembly. Is this possible? How do I do it?
I guess something like a jar file for java applications.
Thanks
...
I have an assembly qualified name of a type, e.g.
MyNamespace.MyClass, MyAssembly,
Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null
I want to extract the assembly full name, i.e.
MyAssembly, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
Obviously I could do this with simple string parsing, but is there a fr...