I am trying to use MSTest on our code base. Now I am running into different problems during this.
We implicitly use _getDefaultName from Microsoft.Practices.EnterpriseLibrary.Data and it gets the default connection string in the current Assembly's App.config. Since this test project would be a new assembly/project it is not able to fin...
The following is my directory structure
e:\test\probing
The directory probing containts an executable [Probing.exe] which loads the dll file ( Probe.dll).
The code is :
namespace Probing
{
class Program
{
static void Main(string[] args)
{
Assembly asm = Assembly.Load("Probe.dll");
...
Guys lease help me out I think I'm close, but I'm missing something.
Background
I'm rewriting a SQL CLR assembly (stored procedure), my assembly contacts another resource and gets back XML. I want to return this XML as a recordset, NOT a scalar value.
From what I've seen, this is how to return a recordset:
SqlContext.Pipe.Send(mySqlD...
I am new to ASP.NET having some basic doubts.
1) The public assemblies are deployed in GAC.Even when i go for "Add Reference ", I can
not point to c:\windows\assembly ( i hope it is not possible) .Still i need to refer the
assembly from ..\Bin folder of the source project ( custom assembly).Is there any consideration behind it?
2...
We all know that the assembly can be queried for attributes using the GetCustomAttributes method. I want to use this to identify an extension module for my application. However, to avoid loading every assembly I prefer a defensive approach:
using Assembly.ReflectionOnlyLoadFrom to get more details about an assembly (has it my ModuleAtt...
I have several .NET applications in C#, along with an API for them to access the database. I want to put all versions of the API in the database, and have them pick the highest revision and build number, but stick with the major and minor number they were built with. Basically when I reference API 1.2.3.4 I want the reference to read 1.2...
We ran into an interesting issue that I've not experienced before. We have a large scale production ASP.NET 3.5 SP1 Web App Project in Visual Studio 2008 SP1 which gets compiled and deployed using a Website Deployment Project. Everything has worked fine for the last year, until after a check-in yesterday the app started critically fail...
I have some C# code (let's call it "script") I am compiling at runtime. It uses an interface in my main program that I use to access its functions. Once compiling is done I have CompilerResults.CompiledAssembly in which case I can CreateInstance(Type).
Once I am done using the script I would like to unload completely. From what I und...
Hi Gang, I am trying to make a Visual Studio AddIn that removes unused references from the projects in the current solution (I know this can be done, Resharper does it, but my client doesn't want to pay for 300 licences). Anyhoo, I use DTE to loop through the projects, compile their assemblies, then reflect over those assemblies to get ...
I have a classlibrary. This library contains widget.ascx control. How to load this webusercontrol from web. I know "LoadControl". But this not applicable.
How can i load web usercontrol from library?
2009.09.24
My main goal is i'm creating addon based web application. Every addon will be widget of web application.
I need dynamicall...
Hi All, I am struggling with an issue while loading an assembly up in a temporary AppDomain to read its GetUsedReferences property. Once I do that, I call AppDomain.Unload(tempDomain) and then I try to clean up my mess by deleting the files. That fails because the file is locked. I Unloaded the temporary domain though! Any thoughts o...
I have a assembly made in another project (projA). Now I want to import this dll in another project (projB). How can I achieve this? This is what I've tried (in projB).
1 Put dll in same dir as my project. (the bin dir)
2 In we.config:
<assemblies>
<add assembly="projA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E...
I'm getting errors when I try to reference one of my assemblies in my ASP.NET web application's web.config. I'm trying to set up a <profile> provider, but when I removed the <profile> node, the next place it was referenced threw the same error.
The error I'm getting is:
CS0234: The type or namespace name 'MyNamespace' does not exist in...
I was looking at the msdn documentation and I am still a little confused on what exactly is the difference between using LoadFile and LoadFrom when loading an assembly. Can someone provide an example or an analogy to better describe it. The MSDN documentation confused me more. Also, Is ReflectionOnlyLoadFrom the same as LoadFrom except t...
I want to click a button in a webform page to add an assembly to the web.config file.
How can I do that?
<assemblies>
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
...
A strange error begans to happen with my XNA project on a new pc.
I have two projects on the solution and a library that is used by both of them. One of the projects, a XNA Game Project, runs perfectly. The other project is a mix of WindowsForm and XNA. The form launches a XNA class when a button is clicked.
When I run the program, it ...
Visual Studio gives a warning when trying to do that, but does not prevent it.
Is it safe and what are the implications?
...
Hi,
Is it possible to get private assembly key in .NET using only public token?
Thanks,
Alexey Z.
...
Context
We have this application, using about 60 coding projects.
We have several products that are realized using this same code base, so
we follow the maven best-practices : we assemble each product using an assembly project, using the assembly plugin.
We have an historical assembly using Ant, that need many improvements. In a firs...
I have an application that needs to do a lot of impersonation, due to moving and creating many files across protected network shares. I've created a simple static class that has a method takes a user, domain, password and a delegate that contains code you need run under the impersonation context.
The problem I've been running into is w...