Questions tagged [assembly-references]

133 questions
135
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
  • 61,190
  • 29
  • 155
  • 224
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
  • 162,013
  • 33
  • 219
  • 345
34
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
  • 531
  • 2
  • 8
  • 15
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
  • 10,410
  • 17
  • 62
  • 103
27
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,420
  • 2
  • 18
  • 29
24
votes
3 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,159
  • 5
  • 12
  • 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…
14
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…
DmitryBoyko
  • 32,983
  • 69
  • 281
  • 458
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,421
  • 48
  • 170
  • 299
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…
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…
7
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
  • 2,945
  • 3
  • 27
  • 41
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,163
  • 1
  • 12
  • 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
  • 760
  • 1
  • 5
  • 8
6
votes
2 answers

The Type XX exists in both DLLs

I am developing a silverlight C# app, and I have added a reference to a Microsoft DLL and got the following message: The type exists in both DLLs Since I am using a control that is defined in both of the DLLs (one is associated with the SDK, the…
Allan Jiang
  • 10,075
  • 22
  • 96
  • 153
1
2 3
8 9