Questions tagged [assembly-references]
142 questions
144
votes
14 answers
Why is System.Web.Mvc not listed in Add References?
Using C#, Visual Studio 2010.
There is a namespace called System.Web.Mvc documented on MSDN. The documentation for all the types in that namespace says that they are in System.Web.Mvc.dll.
However, when I go to Add Reference, “.NET” tab, this…

Timwi
- 65,159
- 33
- 165
- 230
107
votes
4 answers
ASP.NET MVC security patch to version 3.0.0.1 breaks build
After installing the ASP.NET MVC 3 security update KB2990942 it appears the MVC version increased from 3.0.0.0 to 3.0.0.1. This causes Visual Studio to no longer find the reference.

usr
- 168,620
- 35
- 240
- 369
56
votes
6 answers
How do I add assembly references in Visual Studio Code?
So I've come across a similar issue twice now while working on my first project in C#. When trying to add either using System.Data; or using System.Timers;, I get the following error:
The type or namespace name 'x' doesn't exist in the namespace…

jamessct
- 821
- 3
- 10
- 15
34
votes
7 answers
Visual Studio refuses to build project due to missing assembly reference that isn't missing
I'm building a c# windows service and has added a couple of assembly references (to other projects of my own) to my project.
I get the following error when I build:
"Error 25 The type or namespace name 'TestClass' could not be found (are you…

user1531921
- 1,372
- 4
- 18
- 36
29
votes
3 answers
mvc 4 assembly reference missing for Json.Encode
I am trying to call a Json.Encode(...) method in MVC 4 and I'm getting an error: The name 'Json' does not exist in the current context.
I've tried adding System.Runtime.Serialization namespace, which has Json class, but this particular instance of…

Scottie
- 11,050
- 19
- 68
- 109
25
votes
4 answers
Why my C# does not have System.ServiceProcess Library?
This is the code. I just wanna test the library of System.ServiceProcess library.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceProcess;
namespace…

user1535147
- 1,325
- 5
- 14
- 21
17
votes
2 answers
Azure package not including linked project DLL even with copy local set
I've an Azure solution with 4 projects in it. (VS 2012 on Windows 8, Azure Tools 1.8)
Core project with common code
Web Role Front End
Service Role for servicing data (from SQL Azure DB)
Worker Role for scheduled tasks
All role projects have a…

Chris Schaller
- 13,704
- 3
- 43
- 81
15
votes
2 answers
How to include reference to assembly in ASP.NET Core project
I have this line
string sConnectionString = ConfigurationManager.ConnectionStrings["Hangfire"].ConnectionString;
And it requires to include System.Configuration
In which place of the project I have to add reference to System.Configuration because…

NoWar
- 36,338
- 80
- 323
- 498
10
votes
5 answers
Need Hashtable and Arraylist
I am trying to use someone else's C# classes in my Windows 7 Phone app. The classes use objects of type Hashtable.
The file in question has
using System.Collections;
at the top, so I'm assuming that's the Hashtable object it wants.
When I try…

William Jockusch
- 26,513
- 49
- 182
- 323
10
votes
2 answers
Twitterizer 2 and C# - Namespace could not be found
I have a silly problem with Twitterizer2 and probably me :) . I add the reference twitterizer 2.3.1 from my downloads directory along with the newtonsoft one by right clicking on references and browsing to find them.
I then add
using…

Roger Hills
- 361
- 4
- 13
10
votes
1 answer
How are references located in .NET?
What process does .NET use to locate a referenced assembly at runtime and is it different than the process used to locate a referenced assembly during compilation? I am specifically interested in the locations that are searched and their search…

Timothy Schoonover
- 3,195
- 4
- 29
- 44
9
votes
1 answer
Ninject assembly does not match referenced assembly
Setup:
ASP.NET MVC3
Ninject v2.2.1.4
Ninject v3.0.0.15
Ninject.MVC3 v3.0.0.6
Ninject.Web.Common v3.0.0.7
Using NuGet, my UnitTest project references Ninject v2.2.1.4
My Web Project references Ninject v3.0.0.15, Ninject.MVC3 and…

Alan Alcock
- 787
- 1
- 11
- 26
6
votes
1 answer
C# 4.0 Compile time error, fails to resolve overload when wrong overload contains parameter types defined in .NET components that are not referenced
Here's simple code for a C# 4.0 console program:
using System.DirectoryServices.Protocols;
namespace OverloadTest
{
class Program
{
static void Main(string[] args)
{
var request = new SearchRequest("", "", SearchScope.Base, null);
…

Tyler Laing
- 3,533
- 1
- 14
- 7
6
votes
1 answer
Why do ASP.NET resolve assembly references differently?
I really tried hard to find a similar issue to get some leads, but no one seems to describe the case we are having, so here it goes.
Background
We have a product with the following general design:
[Local installation folder]
Contains a set of .NET…

Per Samuelsson
- 1,000
- 1
- 6
- 8
6
votes
0 answers
Why does the compiler when using an overload in another assembly sometimes require you to also reference a subassembly?
There are quite a few questions/answers about the compiler error mentionend below and how to resolve it, but the question here is asking about some insights why in this case this is required.
Why does a project A which uses an overload of a method…

Marwie
- 3,177
- 3
- 28
- 49