.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

VS2010 used an assembly in the GAC in stead of the project reference that was explicitly set in my p

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :.NET Framework

When running my Windows Forms project in the debugger using F5 it uses the assembly version in the GAC in stead of the actual project referenced, thus ignoring the changes I make to my reference project.

If I remove the assembly from the GAC it works, but I woul like to be able to develop and test my assembly withoud having to remove my installed version first every time.

What is the best way to achieve this? Giving my reference project a defferent version number for instance?

Is this behaviour considered a bug that will be patched any time soon?



View Complete Post

More Related Resource Links

Error on VS 2008 Class Library project: are you missing an assembly reference?)

http://msdn.microsoft.com/en-us/library/bb153523(office.12).aspx Working with ASP.NET 2.0 Web Parts and Windows SharePoint Services 3.0 Based on the above MSDN Walkthrough, I created a Class Library VS 2008 project. When clicking the Build menu, 11 errors on System.Web.Security etc popped up.  What's wrong? *********************************************** using   System; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; Error 1 The type or namespace name 'Security' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) Error 2 The type or namespace name 'UI' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)

why .net2.0 project or .net3.5 project can not reference .net4.0 assembly


if the machine support .net3.5, .net2.0 project can reference .net3.5 aseembly and can load and call the functions. 

But why .net2.0 project or .net3.5 project can not reference .net4.0 assembly even the machine support .net4.0

VS2010 Professional .NET 4.0 Remote Debugging ASP Website Project


Trying to remote debug ASP website from VS2010 Pro to Windows Server 2003 machine.  Specifically, trying to debug a Web Service, but breakpoint says, "The breakpoint will not currently be hit. No symbols have been loaded for this document."  This happens for all compiled code though.  I have read this is due to missing PDB files and the work around is to manually copy them, as noted here.  Problem is, I cannot find any PDB files for my project, except referenced libraries, which I can remote debug.


  • web.config has <compilation debug="true">
  • Debugger is attached to wewp.exe process on remote server
  • Installed VS2010 remote debugger from DVD (as I can remote debug referenced libraries)

This is beyond frustrating.  I migrated my code from VS2008 .Net3.5 to VS2010 .Net4.0 to take advantage of the inherent multithreading framework.  Debugging works when using local host and was stable until deployment to test server.

Thanks in advance,


How can I be sure that my entire project is up-to-date and free of errors in VS2010?


Seems like a stupid question, but I will go to Build > Build Solution many many times and the build will succeed many many times, then I will put in a minor syntax error and the build will fail, BUT the build will not fail because of the minor syntax error; it will fail because of an unresolved type that I put in about twenty compiles ago. And then I will fix the minor syntax eror, and the compiler will still complain about the unresolved type. Here is my code:

<%@ Register TagPrefix="FTB" Namespace="FreeTextBoxControls" Assembly="FreeTextBox" %>
  <form runat="server">
  Hello World!!  

Pretty simple, really. I go to Buld > Build WebApplication1 and it runs OK. Now, if I put in a minor syntax error, such as substitute "forrrrrrrm" for "form" and then try to Build Solution, it complains not about the misspelled word, but about the FreeTextBox. And then if I correct the misspelled wird, it still complains about the FreeTextBox. Which leads me to believe that Building the Solution does not check absolutely 100% everything that needs to be checked. Is there a more thorough way of compiling a program that I need to use?

Registering controls of current assembly object reference NOT set error


Hi There,

I have created a simple ASP.net Web Application (2.0) and have added a web user control.

Now in my page I have added this control but I have registered like this,

<%@ Register Assembly="WebApplication1" Namespace="WebApplication1" TagPrefix="Custom" %>

Which means I want to access all the controls in my current Web Application project

Then I have added my user control like this,

<Custom:MyUserControl ID="MyUserControl1" runat="server" PublicProperty="Hello" />

Every thing is fine but when I execute the project, NO control on my user control gets "instantiated" and thus I receive error "Object Reference Not Set"

Note that My Control has,

1) Public property PublicProperty as String

2) 1 Label control

In Load Event Handler I am setting Text property of Label Control to PublicProperty. Here object reference NOT set error occurs (which means Label control is NOT initialized).

I don't want to register my control using Src, TagPrefix etc. Any ideas?


vs2010 web deployment project restarts w3svc even when restartwwwservice = false


We've updated some of our projects from VS2008 to VS2010.  When these projects are deployed the w3svc is restarted on the target machine, even when restartwwwservice = false in the vdproj file.


This was a problem in 2008 until SP1 (http://forums.asp.net/p/1300097/2534736.aspx).  Does this same problem exist in VS2010?


This is a major problem for us -  we need to be able to deploy projects without restarting IIS.


I've tried creating a new web deployment package and setting the restartWWWService field to false, but this still does a restart when it's installed.


Has anyone come across this problem in VS2010?

Could not load file or assembly - Web Deployment Project



I have the following projects in a solution :

- A Web Application

- A Class Library

- A Web Deployment project

The Web Application compiles and run fine when I don't go through the Web Deployment Project. However when I try to use that, I get the following error:

Error 1 An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4) 1 1 Folke.csproj_deploy

"An error occurred creating the configuration section handler for hibernate-configuration: Could not load file or assembly 'NHibernate' or one of its dependencies. The system cannot find the file specified. (F:\Folke\Folke.csproj_deploy\Release\web.config line 4)"

This is the beginning of my Web.config:


VS2010 Silverlight 4 - Getting "Object reference not set to an instance of an object" when loading a

In Visual Studio 2010 I'm trying to use the Blacklight Controls (http://blacklight.codeplex.com/releases/view/37652) in my own project (and actually included the Blacklight.Controls project in my solution so that I could debug what was going on) and... after making all the XAML changes needed to incorporate the Blacklight navigation menu with my stuff in the innermost grid... everything compiled ok when doing a Build.  When I run it there's a reference to a resource dictionary in the XAML that fails with the object reference error above.  The XAML is as follows:       <UserControl.Resources>       <controls:ResourceDictionaryManager x:Key="ResourceDictionaryManager">       <controls:ResourceDictionaryManager.ResourceDictionaries>       <controls:ResourceDictionaryCollection>       <controls:ResourceDictionary Path="/Blacklight.Showcase;component/ResourceDictionaries/DavesGlossyControls.xaml">       <controls:ResourceDictionary.ResourceKeys>       <controls:ResourceKeyCollection>       <controls:ResourceKey ResourceName="GlossyBlackScrollViewer" />       </controls:ResourceKeyCollection>     &

The type 'DataGrid' was not found. Verify that you are not missing an assembly reference and that

Hi; I'm new to WPF and I was going through the ExpenseIt tutorial on MSDN's website. The tutorial was working fine until I added DataGrid. I got the error message: "The type 'DataGrid' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built."     I could not find a clear answer online of which assembly references to fix and how to fix them. Any help would be appreciated. Thanks!     Note: I'm running the following: Windows Vista 32-bit operating system Microsoft Visual Studio 2008 Version 9.0.30729.1 SP Microsoft .NET Framework Version 3.5 SP1

Can I deploy a custom site page from the VS2010 SharePoint project?

Hi We're setting up some demos of our sharepoint plugins and want to easily deploy these into sharepoint so that all members of the company can easily get the demos running on their own machines. This is fine for layouts, web parts and so on - but the demo also has a customised sharepoint home page (which I edited in SP Designer) - how do I make this edited home page part of the VS2010 project so that it can be deployed easily to any site collection?   Thanks  

The type 'DropShadowEffect' was not found. Verify that you are not missing an assembly reference a

We created a grid in Expressions Blend but the DropShadowEffect caused an error for a developer who tried to build the solution and did not have Expressions Blend on his machine.  Had to replace with  <Border.BitmapEffect><DropShadowBitMapEffect ... Are there other incompatibilities between Expressions Blend and plain old Visual Studio 2008 development environs? <   UserControl   xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation   xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml   xmlns:d=http://schemas.microsoft.com/expression/blend/2008   xmlns:mc=http://schemas.openxmlformats.org/markup-compatibility/2006   mc:Ignorable="d"   xmlns:igRibbon=http://infragistics.com/Ribbon   x:Class="TestEditor.Ctrl_PR"   x:Name="UserControl"   MaxWidth="450"   d:DesignWidth="450" d:DesignHeight="125">     <Grid x:Name="LayoutRoot" RenderTransformOrigin="0.5,0.5" Width="450" Height="125">   <Border CornerRadius="8" BorderBrush="DarkSlateBlue" BorderThickness="0.5" HorizontalAlignment="Stretch" Grid.ColumnSpan="2">     <Border.Background>       <LinearGradientB

Reference a assembly compiled against .NET 4 CLR from a .NET 2 CLR

Hi, I just read this aricle http://msdn.microsoft.com/en-us/magazine/ee819091.aspx. In Figure 2 (Will These Runtimes Load in the Same Process?) You can read that it is OK to load an assembly compiled against .NET 4 CLR from an application compiled against .NET 2 CLR. But later in the aricle under "Library Developers and Consumers " you can read that it will not work for libraries. I have a web application (ASP.NET) compiled against .NET 2 CLR that needs to reference an assembly compiled against .NET 4 CLR. Will this work or not? I have tried it several times and it works fine. I don't understand the text in the aricle becase Figure 2 says it's OK but the text under "Library Developers" says it will not be OK. But for me it works. Maybe I have just had luck?

WPF: can we reference a image file (~.png or ~.bmp) from a separated assembly?

We try to reference a image file (xxx.png) in a separated Reference assembly call "ResourceLibrary.dllwe have implement following code in another assembly (not main execuation assembly). <Button > <Image x:Name="pageUpArrow" Stretch="Uniform" Source="pack://application:,,,/ResourcesLibrary;component/Images/xxx.png" /> </Button> We get a complaint at run time:Message="Cannot convert string 'pack://application:,,,/ResourcesLibrary;component/Images/xxx.png' in attribute 'Source' to object of type 'System.Windows.Media.ImageSource'. Cannot locate resource 'images/xxx.png'.  Error at object 'System.Windows.Controls.ControlTemplate' in markup file ...Could we directly reference a image file (xxx.png) in saperated assembly?thanks!Jane

VS 2010 Isolated Shell, WPF Designer & Custom Controls produces some assembly reference errors

Hello, i currently try to use the VS 2010 isolated shell for providing a custom WPF editor.As described in the headline the WPF designer is 'partly' not able to find all assemblies (details below). After some research the only similar problem description i found here . Unfortunately I could not find any solution for my problem there. These are the steps i have successfully finished: - create a vs isolated shell application with some basic extensions (some tool windows) - create a Custom Project template based upon the MPFProj project (as describe at: here ) - Add the needed reference for custom control in project template - Create and edit XAML markup (no code behind, only markup) - Compile and run XAML Now, the following problem occurred (as a step by step description): - I add a custom control to the toolbox using the context menu "Choose Items..." (ok ) - I drag this custom control from the toolbox into the WPF designer view (ok ) - The custom control is rendered correctly and no assembly reference errors occurred (ok ) - I hit the F5 button in order to execute the XAML markup -> The application is starting correct and looks as exspected (ok ) - I close the running application (window) -> Now the WPF designer view seems to refresh and 'tells' me that an assembly (the one of the custom control) could not be found (error!!! ): There error text is: "Th

How to open project in VS2008 which was created in VS2010?

How to open project in VS2008 which was created in VS2010?

Missing Assembly Reference for Microsoft.Office,.Server.Search

I am getting the following error while accessing the namespace: Microsoft.Office.Server.Search.Query  The type or namespace name 'Query' does not exist in the namespace 'Microsoft.Office.Server.Search' (are you missing an assembly reference?)   I have added references to 1) Microsoft.Sharepoint  2) Microsoft.Office.Server and  3) Microsoft.Office.Server.Search I am using VS 2010 and set the framework version to 3.5 and Sharepoint RTM Version  vinod kumar Bhasyam

The located assembly's manifest definition does not match the assembly reference

after applying the latest window 2003 server updates all web-sites on the server fails with the following message: 1 Server Error in '/' Application. 2 -------------------------------------------------------------------------------- 3 4 The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 5 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 6 7 Exception Details: System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 8 9 Source Error: 10 11 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 12 13 Stack Trace: 14 15 16 [FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)] 17 System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Bool
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend