Questions tagged [.net-assembly]

A group of classes and namespaces compiled into a binary file, written in a .NET-specific language such as C# or VB.NET.

An assembly in .NET terminology is a set of modules assembled into a single process assembly (executable, ".exe") or a library assembly (".dll").

Assembly is the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions for .NET-based applications. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality.

3347 questions
18
votes
4 answers

Get dependent assemblies?

Is there a way to get all assemblies that depend on a given assembly? Pseudo: Assembly a = GetAssembly(); var dependants = a.GetDependants();
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
18
votes
3 answers

Can't load Assembly System.Net.Http.Formatting in .Net Solution

I get the following error when trying to update-package on the NuGet Console: At line:1 char:1 + Update-Package Microsoft.AspNet.WebApi -reinstall + CategoryInfo : InvalidOperation: (:) [Update-Package], InvalidOperationException +…
Darren
  • 1,352
  • 5
  • 19
  • 49
18
votes
2 answers

ASP.Net Core register Controller at runtime

I am asking myself if it is possible to load a DLL with Controllers in it at runtime and use it. The only solution I've found is to add an assembly via ApplicationPart on the StartUp: var builder = services.AddMvc(); builder.AddApplicationPart( …
JonKAS
  • 335
  • 1
  • 2
  • 9
18
votes
3 answers

Get assembly version in PCL

I have the following line of code in .NET 4.5 that I am trying to build as Portable Class Library. It's purpose is to get assembly version: this.GetType().Assembly.GetName().Version.Major; The problem is that Assembly.GetName() is not available in…
kls
  • 591
  • 3
  • 13
17
votes
1 answer

Could not load file or assembly 'log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies

I found several threads relating this issue, but none of those solved my issue. I have been previously using log4net version 1.2.10.0 in my ASP.NET services. I have updated it to current version which is log4net v2.0.8.0, due to some third party…
Abdul
  • 1,416
  • 9
  • 26
  • 57
17
votes
7 answers

Could not load file or assembly microsoft.sqlserver.sqlclrprovider 13.100.0.0

I run my Winforms app using SQLServer assemblies Microsoft.SqlServer.ConnectionInfo (13.100.0.0) Microsoft.SqlServer.SMO(13.100.0.0) On the same machine SSMS 2016(Aug) is installed. And here SQL 2014 Dev Edition is installed too. WHen I run my app…
ZedZip
  • 5,794
  • 15
  • 66
  • 119
17
votes
1 answer

Under what circumstances will .NET processes and AppDomains share loaded assemblies in memory?

I'm looking for more details around when and how .NET applications share loaded assemblies. I'm interested in sharing between OS processes, but also between AppDomains within the same process. Sharing assemblies reduces system memory usage by…
redcalx
  • 8,177
  • 4
  • 56
  • 105
17
votes
2 answers

Determine the load context of an assembly

Given a loaded Assembly is there a way (in code) to determine which of the 3 load contexts it was loaded into (default Load, LoadFrom, or Neither)? In Suzanne Cook's "Choosing a Binding Context" article, there are some disadvantages that occur when…
Matt Smith
  • 17,026
  • 7
  • 53
  • 103
16
votes
3 answers

How to embed a ruby gem into a C# project and require it from an embedded IronRuby script?

I have a C# project in which I have embedded an IronRuby program. The project (including my ruby script) is compiled to an .exe file in Visual Studio 2010 for distribution. I'm using a pattern similar to this for bootstrapping the IronRuby script:…
Roy Tinker
  • 10,044
  • 4
  • 41
  • 58
16
votes
1 answer

project.json Equivalent of InternalsVisibleTo

.Net Core's project.json allows configuration of various assembly properties (e.g. title, version, copyright) that a traditional .Net application would define using attributes typically placed in AssemblyInfo.cs (e.g. AssemblyTitle,…
Ben Gribaudo
  • 5,057
  • 1
  • 40
  • 75
16
votes
1 answer

Given the choice, what are the pros/cons of mixed-mode assemblies vs. separate interop DLLs?

When a 3rd-party component is offered in both "mixed-mode assembly" and "separate interop dll" versions, what are the pros and cons of each? A good example is System.Data.SQLite. The above link has this to say: [Mixed-mode assembly] packages should…
misha256
  • 337
  • 3
  • 16
16
votes
1 answer

How do you reference the executing assembly in DNX Core 5.0 (ASP.NET 5)?

I am porting some code from .NET 3.5 - 4.5. Inside of my assembly, I have some code that reads the resource from the currently executing assembly. However, GetExecutingAssembly() isn't a method on the Assembly type in DNX core 5.0. var xsdStream =…
NightOwl888
  • 55,572
  • 24
  • 139
  • 212
16
votes
10 answers

Check version of an assembly (dll) on OS X

How do I check the version of a dll on OS X? The dll is managed, created in C#, that's all I know.
Roberto
  • 11,557
  • 16
  • 54
  • 68
16
votes
1 answer

NuGet Enterprise - best practices for different maturity levels of packages

We want to use NuGet to share assemblies amongst developers in our organisation. We are currently looking at setting up three NuGet feeds, like this: Release-feed: Stable release-quality versions of the assemblies. QA-feed: Assemblies built in…
Spiralis
  • 3,232
  • 2
  • 39
  • 53
16
votes
4 answers

In my server saying "Could not load file or assembly 'MySql.Web..." but I have mysql in my application

Parser Error Message: Could not load file or assembly 'MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified. ... Line 240:
Marcos Freitas
  • 308
  • 2
  • 10