1
голосов
1ответов
305 просмотров

Missing namespaces, LINQ works in web app but not website!

Okay guys, I have an asp.net website set up to target the 3.5 framework, using Linq to Sql. However, the site won't build, and i get missing namespace and assembly exception whenever i try to. Here's the catch, I have installed 3.5 SP1, and I have added the System.Core, System.Data.Linq, System...

1
голосов
2ответов
3813 просмотров

could not load dll or one of its dependency

a. My C# program will load a dll (which is dynamic), for now let's take a.dll (similarly my program will load more dll like b.dll, c.dll, etc....). b. My program will invoke a method "Onstart" inside a.dll (it's constant for all the dll). I am able to achieve the above 2 cases by reflection mec...

1
голосов
3ответов
4195 просмотров

are you missing an assembly reference?

I'm getting the joyous 'type or namespace name "Something" does not exist in the namespace "Something else" (are you missing an assembly reference?)' error. What I've got is a Website project that contains the website itself along with several other custom projects upon which the website relies....

14
голосов
4ответов
12866 просмотров

C#: Custom assembly directory

Say we have an application which consists of one executable and 5 libraries. Regularly all of these will be contained in one directory and the libraries will be loaded from there. Is it possible to do so that I can have for example some of the libraries in one directory called Lib, and the rest ...

1
голосов
4ответов
439 просмотров

Securing .net Assemblies

I want to secure my assembly (dll) by binding it to a specific environment. Say I have a dll (BizLogic.dll), I want to make it available to my co-developers to use it within the organization. But I don't want others to use it outside my organization. Is there any way to address this issue? Than...

7
голосов
2ответов
4956 просмотров

Get paths of assemblies used in Type

I need a method that takes a Type and returns the paths of all assemblies that used in the type. I wrote this: public static IEnumerable<string> GetReferencesAssembliesPaths(this Type type) { yield return type.Assembly.Location; foreach (AssemblyName assemblyName in type.Assembly.Get...

4
голосов
3ответов
998 просмотров

What is "AllInternalsVisible" parameter of assembly:InternalsVisibleTo attribute?

My IntelliSense is coming up with a boolean named parameter "AllInternalsVisible=" in an [assembly:InternalsVisibleTo("AssemblyName")] declaration. Just position the cursor after the second double-quote and hit Ctrl-space. What is that - I cannot find any documentation on MSDN about that. I a...

2
голосов
3ответов
2499 просмотров

How to detemine (by code) the assembly corflags?

I need to write a CorFlags-like application. If I have a path to assembly file, how to I read its CorFlags? I specifically need to know if the assembly is Any-CPU or x86 only I want to avoid loading the assembly using reflection because I need to scan many files.

4
голосов
2ответов
940 просмотров

Does the whole .NET assembly get loaded in memory or just the parts used?

If I have a 15M .NET assembly and a program calls a method in it, does the whole assembly get loaded into memory and use 15M or a lot less? (assuming the assembly is not allocating any memory during runtime)

8
голосов
2ответов
4769 просмотров

How do I find Assembly Version of Calling Program?

I am using C# for this application. I have a DLL that gets included within my application. From this DLL, I need to find the Assembly Version of the main program in which this DLL is included. System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() does not return what I...

2
голосов
2ответов
869 просмотров

Can I determine what triggered an assembly load?

When windows service installer is bombing out with a "Error 1001. Unable to get installer types in the MyService.exe assembly." So it can't load MyServiceInstaller. Fusion logging is showing me that it is failing when trying to find my Data.dll assembly. The thing is, it should not need to ...

4
голосов
1ответов
1031 просмотров

Multiple Assembly.Load(Byte[]), same instance or leak?

What happens when I call Assembly.Load(Byte[]) multiple times with a Byte array containing the same assembly ? Will I get the same instance of Assembly for each call ? The same assembly loaded multiple times within the app domain ???

20
голосов
6ответов
17556 просмотров

Finding all Namespaces in an assembly using Reflection (DotNET)

I've got an assembly (loaded as ReflectionOnly) and I want to find all the namespaces in this assembly so I can convert them into "using" ("Imports" in VB) statements for an auto-generated source code file template. Ideally I'd like to restrict myself to top-level namespaces only, so instead of:...

24
голосов
4ответов
8886 просмотров

Why is assembly binding redirect not working in my web site?

I have a web site project that I run from Visual Studio using the built in development web server. The virtual path of the web site is set to / The web.config contains a runtime element with <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAss...

13
голосов
2ответов
7567 просмотров

Why doesn't fusion log binding errors?

I have added the following to the registry key Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion: EnableLog DWORD 1 LogFailures DWORD 1 If I start an ASP.NET web site from Visual Studio it throws a Parser Error: Could not load file or assembly 'CMS.Controls, Version=4.1.3518.21577,...

0
голосов
1ответов
145 просмотров

assembly in deployed asp.net application is referencing an absolute path on my pc

I do not know why this is happening: [NullReferenceException: Object reference not set to an instance of an object.] DataWeb.Core.HttpHandler.ProcessRequest(HttpContext Context) in X:\projects\visualstudio\work_projects\Production\DataWeb\DataWeb.Core\HttpHandler.cs:23 System.Web.CallHandl...

5
голосов
3ответов
10887 просмотров

Maven include JavaDoc Jar in Assembly

I have a project with multiple modules, including on that is responsible for building the final assembly from the artifacts of the other modules. As part of the assembly, I want to include the JavaDocs for two of the other modules. I have updated the pom files for those modules to generate the ...

2
голосов
2ответов
893 просмотров

Why doesn't private assembly discovery use the Fully Qualified Assembly Name to match, but rather the filename?

Our application dynamically loads a set of private assemblies that each reside under their own sub-directory. They each have their own dependencies which are also in that same sub-directory. Each assembly is strongly named and the dependencies are the same library, but different versions. MyApp ...

0
голосов
4ответов
1598 просмотров

Relationship between Assembly and Namespace in .NET framework?

I know that it's possible to have many classes in a namespace. Now, is it possible to have a class in more than one assembly (.dll file)?

0
голосов
4ответов
154 просмотров

ASP.NET Assembly -IL to Source

Ofcourse the IL is lanuage independent,can i get the source code back from IL (let the source code be any language C#,VB) ?

0
голосов
1ответов
365 просмотров

Do event handlers stop garbage collection if the hanlder is in a seperate assembly?

If I have a class declared in assembly A, and am listening to it in assembly B, will this prevent garbage collection. Its a common situation, such as the one where you are listening to a property of an object in the business model from the ui. i saw this question which talks about event listener...

3
голосов
3ответов
830 просмотров

Why bother with strong names for private assemblies?

We produce a number of applications that share assemblies. Since memory or disk space is not a problem, we use private assemblies by duplicating the shared assemblies into each app's local folder. This avoids the issues caused by putting them into the GAC. I hear that strong names are a real good...

5
голосов
7ответов
12533 просмотров

The .NET equivalent of static libraries?

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...

21
голосов
1ответов
25709 просмотров

Maven creating flat zip assembly

To Maven gurus out there: I'm trying to package non-java project artifacts (.NET) into a single zip file. I'm having 2 problems: If I change packaging in my POM to zip <packaging>zip</packaging>, I get this error message: [INFO] Cannot find lifecycle mapping for packaging: 'zip'. Com...

4
голосов
3ответов
2747 просмотров

Assembly binding under a WindowsImpersonationContext. How to prevent FileLoadException?

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...

4
голосов
1ответов
780 просмотров

Maven assembly include problem

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, ...

0
голосов
1ответов
273 просмотров

Is it possible to get private assembly key?

Is it possible to get private assembly key in .NET using only public token? Thanks, Alexey Z.

0
голосов
5ответов
705 просмотров

Accessing .Net 3.5 assemblies from .Net 2

Visual Studio gives a warning when trying to do that, but does not prevent it. Is it safe and what are the implications?

2
голосов
5ответов
3647 просмотров

C# Assembly not found at runtime

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 butt...

0
голосов
1ответов
1425 просмотров

How to add assembly to web.config using C# asp.net?

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>