Home » WPF

"Assembly '...' Was Not Found" When including a reference to a local namespace

I've got a WPF application with a window and a usercontrol:


<Window x:Class="UI.Windows.Main"




Title="Window1" Height="600" Width="800">


<!-- Snip -->




<UserControl x:Class="UI.Windows.Documents.MyDisplay"




<!-- Snip -->



Now, when I try to look at this in the designer i get an error saying Assembly 'UI' was not found.  I've searched high and low, but the internet is full of references to this being a 2005 issue and the solution is to upgrade to 2008.  I'm already using 2008 (don't even have 2005 installed on the machine), and I still get the problem.


45 Answers Found


Answer 1

Will it be improved in the next release?

Answer 2

 In the Window xaml can you please try this...


should work..

Answer 3

My project's namespace  is actually "UI.Windows", but I tried all of the below lines and all gave me the same error  (except for the name of the assembly  it couldn't find)





Answer 4

I have a feeling the Cider designer  doesn't actually support this scenario, i.e. a UserControl in the same assembly  as what you're designing.


Answer 5

That would seem really odd on 2 counts:

1.) Wouldn't this be the first thing someone would try when trying UserControls for the first time?  It would also seem like an arbitrarily unneccessary requirement that UserControls be in a separate assembly.

2.) In several places in the documentation, Microsoft says that if the namespace  you're looking for is in the current assembly, you can omit the assembly  part of that uri, or include it but leave the assembly blank.  Either refers to the current assembly.

From MSDN:

Mapping to Current Assemblies

assembly can be omitted if the clr-namespace referenced is being defined within the same assembly as the application  code that is referencing the custom classes. Or, an equivalent syntax for this case is to specify assembly=, with no string token following the equals sign.



Answer 6

I moved this thread from WPF forum to Cider forum for better answers.


Answer 7

Tim Dawson wrote:

I have a feeling the Cider designer  doesn't actually support this scenario, i.e. a UserControl in the same assembly  as what you're designing.

What you say Tim was more for VS 2005. In VS 2008, this works prefectly fine and i have been using UserControl's from same assembly in the XAML without any issues.

Assuming I have an application  with namespace  as TestWPFApp and a Main window  XAML and a UserControl in that, I include the following in my main window XAML


and then i can reference  the user control below as

<local:myUserControl />

and this works perfectly fine. You may have to build the solution once to create the assembly. Till that time designer may give an error.
In the fact the good part in VS 2008 is that when you type in xmlns:local= the intellisense pops up and provides a list of valid inclusions and the one i added, was listed as an option, so i don't even have to figure the right one out and type it.

Answer 8

I disagree that this now works in vs2008 sp1.

I've got an assembly  that contains a usercontrol  [ucCustomers] that contains a child userControl [ucToolTip].

The main usercontrol does not render the local  clr-namespace in Cider saying that the child usercontrol was not found.
Here's the namespace  bits:

<UserControl x:Class="CustomerMangementTool.ucCustomers"

when I add the following to the Xaml, the designer  breaks:
<local:ucTooltip x:Name="myTooltipInstance" />

The error  displayed is: Error 1 The type 'local:ucTooltip' was not found. Verify that you are not missing an assembly reference  and that all referenced assemblies have been built...

NOTE: Blend renders fine, and the project compiles and runs no problem...this is a Cider design-time only issue

Any ideas...


Answer 9

Interesting, that is supposed to work. When you type <local: does the IntelliSense dropdown include ucTooltip?
Marco Goertz \ Sr. Dev Lead \ WPF Designer "Cider" \ Microsoft

Answer 10

Nope, no intellisense at all.
I've also tried "Cleaning" the solution and rebuilding.

to recap, this happens when I try to work in the designer  view with a usercontrol  that contains an instance of another usercontrol from the same assembly.

Answer 11

I'm in the exact same boat.  I can't believe something as basic as this would be overlooked by MS.

Answer 12

Well, there is something else going on then. I just created a new WPF Application project with 2 UserControls in that same assembly  and I was able to use UC2 inside of UC1 and UC1 inside of Window1 with no problems at all.

Could you try a brand-new project like that?

BTW, could you also try to invoke the IntelliSense drop-down manually by pressing Ctrl+J or Edit->IntelliSense->List Members?

Are you getting IntelliSense everywhere else in XAML?
Marco Goertz \ Sr. Dev Lead \ WPF Designer "Cider" \ Microsoft

Answer 13

The problem was in using an assembly  that references  another assembly.  I was able to get around this by adding a namespace  attribute to the assembly, but I then had to delete the reference  in the project using the assembly and re-add it for it to work.  I've noticed this kind of thing a lot--the need to delete stuff and re-add references when there is a problem.  The IDE does not like WPF.

Answer 14

obviosuly I have now the same problem but in very unexpected circumstances. I have worked on a custom control at home and it all worked fine. Then I packed the whole project and moved it to another computer in the office and now designer  fails! Nothing was changed in the project.

I have VS2008 Team Edition at home and Express in the office (yes, weird but that is the setup I need). Both SP1 and both run on WinXP.

So it seems to be related a PC-specific issue. Very unfortunate

Answer 15

We have this problem too. We are 4 people working on the same project. The person who added the user control to the project has no problem but every one else (including me) gets the error: Assembly 'CompanyName.ProductName' was not found. Verify that you are not missing an assembly  reference. Also, verify that your project and all referenced assemblies have been built. The text in the designer  reads: Problem Loading The document contains errors that must be fixed before the designer can be loaded. Reload the designer after you have fixed the errors. 

This happens in all our xaml-files that references  an external assembly. Of course we all have the assembly and can reach it with no problem from the code behind file. We can all build an run the solution. 

I'm using: 
Microsoft Visual Studio 2008 Version 9.0.30729.1 SP 
PresentationFramework.dll 3.0.6920.1453

We are in the startup of a big WPF project and we really need this to work. If VS2008 can't handle it, are there any other tools that we can use until it works in VS2008? I'm thinking of Blend or even better a free xaml-tool? 


Lina Larsson


Answer 16

Is it possible that this is a x64 issue?  I have a similar issue with a control, but if I set the compilation to x86 it works fine.  I need to support both x64 and x86 separately due to native dependencies, which is another frustrating story - I can't seem to teach VS.NET to use a different reference  for x86 and x64.  Basically, the designer  is a 32-bit process and can't load 64-bit controls, it seems.


Answer 17

After few days of trial and error, finally managed to display user control on main window.
If you were using StaticResource on styling certain controls, please use DynamicResource
I'm using VS.net 2008 in Vista

Step 1:
Initially, do as instructed by Atul Gupta

Step 2:
Create a ResourceDictionary file at project location (eg. namely 'AppStyles.xmal'). Add in all your style settings.

Step 3:
At App.xmal, direct the setting to your ResourceDictionary file (eg. AppStyles.xmal)

<Application x:Class="ProjectName.App"
        <!-- Merge the Resources & Styles from AppStyles resource dictionaries to share throughout the application  -->
                <ResourceDictionary Source="Resources\AppStyles.xaml"/>


Step 4 :
Change / replace all StaticResource to DynamicResource at usercontrol  window. Solution rebuild might be needed after that.

Special thanks to Sacha Barber's excellent demo code at codeproject.com

Hope this will help.


Answer 18

I've encountered a similar issue. I have tracked it down to being a 64-bit issue with the designer. I had a WPF User control project that was being built to both x86 and x64 configurations. When built in X64, the XAML designer  cannot find the reference  to the control library. The only workaround I could find was to change the project configuration for the WPF User control project to Any CPU insteand of specific x86 or x64 configurations. Is this a known issue with the XAML designer and is it going to be fixed? I can forsee the case where I need to build targeted CPU versions instead of Any CPU so any insight would be appreciated.

Answer 20

Bumping this thread bug until microsoft fixes it!!!

Its not x64  issue. Its not a 'put ;assembly= at the end of your clr-namespace' issue.

 Here's 4 other threads talking about this.



Answer 21

Hi asdf989

I'm sorry that you're hitting this issue with the WPF designer  in Visual Studio 2008 ("Cider"). I'm a Program Manager on the Cider team. I would like to work with you to reproduce the issue you're seeing and ensure it gets appropriate attention.

It would really help to ensure we are looking at the same problem, if you could construct a simple project which reproduces the issue for you on your machine, then share that project with me by email at mwthomas at microsoft dot com. 


Mark Wilson-Thomas


Answer 22

Wow. Amazing. I'ver never had anyone EVER respond to a post about a bug who could actually do anything about it.

Cheers. I'll email you right away with a detailed description of the problem.

The summary is:

It must be something wrong with the overall VS 2008 IDE configuation because every demo /sample project I've downloaded is broken in the same way. Its not tied to User controls like I thought. Its a more general failure which may be a good thing oddly enough.

Broken for me.

Project 1)


This is microsofts wpf  example. Its broken in the same way.

Project  2)


This is some dudes wpf binding example. Its broken in the same way.


Project 1)


Project 2)


Things I've tried:

1) Adding assembly  to the end like.



2) Changing the project to x86

3) Rebuilding and closing reopening the xaml designer.

4) Turning off Resharper

What I'm using

1) VS 2008 SP1 9.0.30729.1 SP

2) .net framework 3.5 sp1

 3) windows xp pro

4)resharper (turned off but still installed)

 Thanks all I can think to write for now.


Answer 23

Hi all

working with asdf989, we discovered that the issue was that he had a # character in the path to his projects. Moving to a path without a # in it solved the problem. The designer  has problems resolving paths with # in them (this is a known issue).

I doubt that this is going to be the problem everyone is facing; please let me know if you are facing this problem and do not have a # in your project path; send me mail at mwthomas at microsoft dot com.


Mark Wilson-Thomas

Program Manager, WPF+Silverlight Designer, Visual Studio.


Answer 24

Does this error  always occur with paths with # in them?  I tried including  one at home, and it just worked fine...

Answer 25

I am having a similar problem. I was working with the new WPF controls and was adding the Ribbon after getting the DataGrid to work. It is now saying that it cannot find the RibbonControlsLibrary assembly  no matter what I do.

The weird thing about this is that it was working. It is as if I did something that fubar'd the project. My path does not have any odd characters in it either and the application  actually runs fine, it is just the designer  and intellisense that are broken. Here is the error.

Error 1 Assembly 'RibbonControlsLibrary' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. M:\Code\Applications\TaskDestroyer\trunk\MainWindow.xaml 6 13 TaskDestroyer

Edit: It seems restarting my system fixed the issue...


Answer 26

My issue WAS down to the # character in the path, we had "c#" as one of the folder names in our VSS tree. Thanks for identifying the issue

Answer 27

At first I thought "why would anyone have a # in there path or filenames?". Then I realized that I have all my WPF projects under "C:|_Main\Projects\C# WPF\". I changed the path to "C:\_Main\Projects\CSharp WPF\", rebuilt everything and things worked out just nicely.

Can someone from Microsoft either fix the '#' thing or at least make this issue more well known. This costed me several hours of wasted time on an issue that was discovered a while ago.


Answer 28

I've encountered the same problem with a directory named SourcesC#\  ....

Answer 29

I had the same problem. I had C# in my projects folder path. Code ran fine, displayed properly in Blend
but VS2008 xaml designer  always gave up with the "assembly not found...." error.
Changed folder name from C# to Csharp and everything works as it should.
Thanks for the tip Mark Wilson :)

Answer 30

I am having this problem, and read with interest the issue of path resolution. I have changed the output directories of all my projects to a single ".\bin" directory. This is to resolve runtime referencing problems for dlls written in native c++

Question. Can the Xaml editor find assemblies that are not output to the default paths that come with VS2008 when you set up a module?

Answer 31

Awsome, i don't believe a # in a file name can do the trick, it's the solution for me ... I guess now why all the project on my desktop worked fine and not the real ones in the C# directory.
Thanks a lot !

Answer 32

I've run into this problem at run-time, works fine in the designer. I suspect it's related to my AssemblyVersion changing on every build. I'm not sure if this qualifies as a framework problem, compiler problem or designer  problem.


Answer 33

I've run into this problem at run-time, works fine in the designer. I suspect it's related to my AssemblyVersion changing on every build. I'm not sure if this qualifies as a framework problem, compiler problem or designer  problem.

Shaun Wilson // MySpace.com // Engineering - Infrastructure Group

The problem is in the two-pass compilation of WPF projects: If you have a slow PC (or a big project) and you are using version wildcards ( [assembly: AssemblyVersion("1.0.0.*")] ) then you'll end up with an assembly  having version "" but the .baml-resource nested inside the assembly references  "" although the original xaml only contained something simple as 'xmlns:local="clr-namespace:Company.AppName"'. (You can verify this with Reflector).
This can happen with a totaly fresh build -- from time to time you even can have luck and both compilations occur for the same time-number-representation and everything works well 'till the next build.

Very frustrating because we use version wildcards to ensure that every build only uses the exactly assemblies it was build against.

Answer 34

My problem was that I had a dyanmic AssemblyVersion attribute combined with signing the assembly.

You might try adding ";assembly=" to the end of the clr-namespace:.. string to ensure the runtime is checking the calling/owning assembly  and not attempting to resolve an external assembly.

You may also see this if you are using an obfuscator that doesn't "play-well" with BAML/WPF.

If you provide a verbose exception detail, it may be helpful.

Answer 35

There is no obfuscation being done. The assembly  is signed with a strong key (.snk) but this doesn't affect any version numbers.

The problem is that every WPF assembly is compiled twice (just look at the MSbuild scripts) -- and the second compilation gets a different version number (this is the bug).

So I end up at runtime with the following error  which clearly states that the baml includes a reference  to version "0.906.29.19489" but in fact the resulting assembly got "0.906.29.19492":

System.Windows.Markup.XamlParseException occurred
  Message=" Die Datei oder Assembly \"MyAppName, Version=0.906.29.19489, Culture=neutral, PublicKeyToken=ec279e9c96512601\" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)  Fehler in Objekt \"System.Windows.ResourceDictionary\" in Markupdatei \"MyAppName;component/app.xaml\", Zeile 10, Position 6."
       bei System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObjectIds currentXamlObjectIds, XamlObjectIds contextXamlObjectIds, Type objectType)
       bei System.Windows.Markup.XamlParseException.ThrowException(ParserContext parserContext, Int32 lineNumber, Int32 linePosition, String message, Exception innerException)
       bei System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)
       bei System.Windows.Markup.BamlRecordReader.Read(Boolean singleRecord)
       bei System.Windows.Markup.TreeBuilderBamlTranslator.ParseFragment()
       bei System.Windows.Markup.TreeBuilder.Parse()
       bei System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream)
       bei System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       bei MyCompany.MyAppName.App.InitializeComponent() in d:\svnWORK\Kundenprojekte\MyAppName\MyCompany.MyAppName\App.xaml:Zeile 1.
       bei MyCompany.MyAppName.App.Main() in D:\svnWORK\Kundenprojekte\MyAppName\MyCompany.MyAppName\obj\Debug\App.g.cs:Zeile 0.
       bei MyCompany.MyAppName.AppRunner.Main() in D:\svnWORK\Kundenprojekte\MyAppName\MyCompany.MyAppName\AppRunner.cs:Zeile 21.
  InnerException: System.IO.FileLoadException
       Message="Die Datei oder Assembly \"MyAppName, Version=0.906.29.19489, Culture=neutral, PublicKeyToken=ec279e9c96512601\" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)"
       FileName="MyAppName, Version=0.906.29.19489, Culture=neutral, PublicKeyToken=ec279e9c96512601"
       FusionLog="Der Assemblymanager wurde geladen aus:  C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\mscorwks.dll\r\nAls EXE-Datei ausgeführt.  D:\\svnWORK\\Kundenprojekte\\MyAppName\\MyCompany.MyAppName\\bin\\Debug\\MyAppName.vshost.exe\r\n--- Ein detailliertes Fehlerprotokoll folgt. \n\r\n=== Zustandsinformationen vor Bindung ===\r\nLOG: Benutzer = ZETEKO\\Markus\r\nLOG: DisplayName = MyAppName, Version=0.906.29.19489, Culture=neutral, PublicKeyToken=ec279e9c96512601\n (Fully-specified)\r\nLOG: Appbase = file:///D:/svnWORK/Kundenprojekte/MyAppName/MyCompany.MyAppName/bin/Debug/\r\nLOG: Ursprünglicher PrivatePath = NULL\r\nAufruf von Assembly : WindowsBase, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35.\r\n===\r\nLOG: Diese Bindung startet im default-Load-Kontext.\r\nLOG: Die Anwendungskonfigurationsdatei wird verwendet: D:\\svnWORK\\Kundenprojekte\\MyAppName\\MyCompany.MyAppName\\bin\\Debug\\MyAppName.vshost.exe.config\r\nLOG: Die Computerkonfigurationsdatei von C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\config\\machine.config wird verwendet.\r\nLOG: Verweis nach der Richtlinie: MyAppName, Version=0.906.29.19489, Culture=neutral, PublicKeyToken=ec279e9c96512601\r\nLOG: Download von neuem URL file:///D:/svnWORK/Kundenprojekte/MyAppName/MyCompany.MyAppName/bin/Debug/MyAppName.DLL.\r\nLOG: Download von neuem URL file:///D:/svnWORK/Kundenprojekte/MyAppName/MyCompany.MyAppName/bin/Debug/MyAppName/MyAppName.DLL.\r\nLOG: Download von neuem URL file:///D:/svnWORK/Kundenprojekte/MyAppName/MyCompany.MyAppName/bin/Debug/MyAppName.EXE.\r\nWRN: Der Vergleich des Assemblynamens führte zum Konflikt: Revisionsnummer.\r\nERR: Das Setup der Assembly konnte nicht abgeschlossen werden (hr = 0x80131040). Die Suche wurde beendet.\r\n"
            bei System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
            bei System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
            bei System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
            bei System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
            bei System.Reflection.Assembly.Load(String assemblyString)
            bei System.Windows.Markup.ReflectionHelper.LoadAssemblyHelper(String assemblyGivenName, String assemblyPath)
            bei System.Windows.Markup.ReflectionHelper.LoadAssembly(String assemblyName, String assemblyPath)
            bei System.Windows.Markup.BamlMapTable.GetAssemblyFromAssemblyInfo(BamlAssemblyInfoRecord assemblyInfoRecord)
            bei System.Windows.Markup.BamlMapTable.GetTypeFromTypeInfo(BamlTypeInfoRecord typeInfo)
            bei System.Windows.Markup.BamlMapTable.GetTypeFromId(Int16 id)
            bei System.Windows.Markup.BamlRecordReader.GetElementAndFlags(BamlElementStartRecord bamlElementStartRecord, Object& element, ReaderFlags& flags, Type& delayCreatedType, Int16& delayCreatedTypeId)
            bei System.Windows.Markup.BamlRecordReader.BaseReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
            bei System.Windows.Markup.BamlRecordReader.ReadElementStartRecord(BamlElementStartRecord bamlElementRecord)
            bei System.Windows.Markup.BamlRecordReader.ReadRecord(BamlRecord bamlRecord)

Answer 36

I forgot to mention: adding ";assembly=" to the xmlns:local reference does not change anything.

Answer 37


I ran into a simmular problem. I had good compilible WPF application. After a throw away my 'obj' and 'bin' directory the same error occured. After restoring the 'bin' and 'obj' it compiled again. 
Is this a egg or chicken problem?!

Normaly when you build an application  from scratch, there is already a dll bofore you add some controls

Answer 38

I had the same problem as John Taylor, but there was no # symbol. I solved it by specifying "...;assembly=" instead of just "..." in the namespace  declaration.

Answer 39

I had this annoying problem as well. I solved it like many others by adding ";assembly=" last on the same line as xmlns for the namespace.

Answer 40

I had this same problem but wasn't about to change my directory structure just because of (another) Microsoft bug. I just used subst to make a drive letter at the "C#" directory and then reloaded my project from there.

For those unfamiliar with subst, just take a command prompt to the directory where you have the "#" in and type:

subst P: .

Then look for the project under P:

I would rather do this and wait for the fix - probably in VS 2010 I'm hoping.

Answer 41


I'm having the same problem and my path does not contain '#' character, but it contains '-' character.

does '-' character also causes the same problem?


Answer 42

There is one another bug in WPF.

If you define your WPF project name as:


and also the project namespace  as:

namespace AssemblyVersionUpdater.UI

then you get the error:

Error    2    The type name 'UI' does not exist in the type 'AssemblyVersionUpdater.AssemblyVersionUpdater'    C:\svn\tools\AssemblyVersionUpdater\AssemblyVersionUpdater.UI\obj\Debug\App.g.cs    60    36    AssemblyVersionUpdater.UI

i ve checked the app.g.cs file and seen that the VS could not recognise the System.Windows.Application due to .UI namespace definition.

I ve changed the project namespace to AssemblyInfoUpdaterUI and all was good again...


Answer 43

I am having this issue, but I don't have any "#" in the path..

I have a dialog (Wait) that is using a custom user control (FlashRinger).  All objects are in the same namespace (ntouchPC).

I get "The tag 'FlashRinger' does not exist in XML namespace..." error in the designer view, but my program runs perfectly fine.

Below is the xaml for the Wait and FlashRinger objects.  Let me know if you need further information:

<Windowx:Class="ntouchPC.Wait"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:ntouchPC"Title="ntouch PC - Please Wait..."WindowStartupLocation="CenterScreen"Background="{StaticResource BrushGrey75}"Width="288"Height="375"ResizeMode="NoResize"WindowStyle="ThreeDBorderWindow"Icon="../Images/Application.ico"Loaded="Window_Loaded"Closing="Window_Closing"><StackPanel><GridBackground="White"><ImageSource="../Images/NtouchGleam.png"/></Grid><StackPanelHeight="230"Background="{StaticResource BrushGrey75}"><local:FlashRingerMargin="10"Width="155"Height="155"/><TextBlockx:Name="_textBlockWaitMessage"FontFamily="Segoe UI"FontSize="13"Foreground="White"HorizontalAlignment="Center"Background="Transparent">Please Wait ...</TextBlock><TextBlockx:Name="_textBlockElapsed"FontFamily="Segoe UI"FontSize="13"Foreground="White"HorizontalAlignment="Center"Background="Transparent"/></StackPanel></StackPanel></Window>


<UserControl x:Class="ntouchPC.FlashRinger"
  Loaded="FlashRinger_Loaded" Unloaded="FlashRinger_Unloaded">
		<Canvas x:Name="_canvasMain"/>

Answer 44

I had this annoying problem as well. I solved it like many others by adding ";assembly=" last on the same line as xmlns for the namespace.

It solved what: Designer problems or application runtime failure?

Answer 45

Unfortunately, adding ;assembly= does not satisfy my VS 2008 SP1 designer.

BTW, my namespace is just ATA, no dots in the name.  There are no funny characters in the project path.

There are not wildcards in the project version.  I am signing though.  I installed VS 2010 and then all this stuff broke on 2008.

- Charlie



I have a T4 template that I have created to use FxCop's Introspection engine however, my reference to it only works when I use an abolute path on my local machine.



assemblyname="C:\Program Files\Microsoft FxCop 1.35\FxCopSdk.dll" #>



assemblyname="C:\Program Files\Microsoft FxCop 1.35\Microsoft.Cci.dll" #>

When I change these to:



assemblyname="FxCopSdk.dll" #>



assemblyname="Microsoft.Cci.dll" #>

It does not load because it is executing in a temp directory.  I understand this.  However, if I had a Reference path in the project properties or I add a project reference to the DLL in my class library, throws the same exceptiong.

According to Oleg's blog, it is supposed to look at the abolute path, then GAC, then project reference paths, then project references.  It does not appear to be doing this.

I am using VS2010


Hi all, i am using Biztalk 2009

is this bug still their in 2009 Biztalk schemas....

BUG: Type "###" is not declared in reference to local type of an included XSD Schema file






I've defined the UI look for my application using a set of resource dictionaries. I now have a requirement to provide a second front end that has the same UI look. I moved the resource dictionary xaml files into a separate assembly so that I can share them between both front-ends.

I updated the reference in the application.xaml file to use the following format to load the resources:

<ResourceDictionary Source="pack://application:,,,/assemblyname;component/Styles_Base.xaml"/>

One of the styles references the ScrollChrome class in the Luna theme. I declare the namespace at the top of the xaml file with:


And then use the ScrollChrome class with the following syntax (dots replace lines of irrelevant text):

<luna:ScrollChrome x:Name="Chrome" .... luna:ScrollChrome.ScrollGlyph="DownArrow" ThemeColor="Metallic"/>

This all works fine when I run the application from within Visual Studio, however when I try to run the application independently of the debugger, I get the following error:

The tag 'ScrollChrome' does not exist in XML namespace 'clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna'

Both the assembly that contains the resource dictionaries and the application assembly that references it have a reference to the PresentationFramework.Luna assembly.

Can anybody give me any suggestions as to why this works fine in the debugger, but fails when run outside the debugger? The only solution that I can see at the moment is to move the resource dictionaries back into the front-end assemblies and share the files in SourceSafe, which is a path I'd rather not take.

Thanks in advance for any help.


Simon Burrows

We have upgraded our project from Visual Studio 2008 to Visual Studio 2010 without any issues until now.  Our project contains a folder call Libraries which contains different versions of Oracle ODP.NET DLL's as well as different versions of Telerik DLL's.   Our project contains references to one of the versions of each.  The problem is once we remove the reference and re-add it by browsing to the new version, again inside the Libraries folder inside the project, it adds the reference, but to the same version we just removed.  We can even copy the DLL to our desktop, remove the reference and add to the new one on our desktop and it still will point to the Libraries folder version???.  The only we we can actual change the reference to the new DLL is by manually changing the path in the .vbproj file, which is obviously not going to work for us.  The same behaviour worked perfectly in VS 2008.  We switch our references quite often, when new versions come out, but also far more often to QA different versions of ODP.NET and Telerik Control DLL's, so manually editing the .vbproj file is becoming quickly cumbersome.  If I browse to a specific version at a specific path, Visual Studio should ALWAYS do what I'm telling it to do...add the reference to that version at that path.

I did some seaching and came across a few other people with the same issue.  This better not be as designed and if it's a bug, which I believe it to be, when will it be fixed?

Other articles with same behaviour:

This behaviour has been reproduced on every developer machine in our group, so it's not an isolated incedent.


I'm new in writing C# application in Visual Studio 2008. I'm currently writing a web application for CRM 4.0 Reporting Service rendering.

I reference my web application to our Reporting Service web service http://reportservername /ReportServer/ReportExecution2005.asmx and name it 'RSWebReference'.

Then I want to reference it in my code: Using RSWebReference;

Not sure why, but I cannot build my solution, saying "The type or namespace name 'RSWebReference' could not be found (are you missing a using directive or an assembly reference?)".

I read this thread in http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/74f70e30-83e8-4817-b5e0-7729450730a1 that the website probably is using .net 1.1, and I should change it to .net 2.0.

However, I think the website is already using 2.0. Is it probably because I'm using VS 2008? How can I tell and change if the website is using 1.1 or 2.0?

Or could I be doing something wrong? Thanks in advanced for your help!

-Elizabeth K.

Win 7, VS 2008 SP1, .NET 3.5 Sp1

I have an error on my machine only, but has no complaints on other similar machines. I have a separate xaml file in my local assembly, so I make the declaration in my main XAML file :

A local type xaml is used (in a grid) and is in the body of the main xaml file :
<local:PLTButtonPanel x:Name="BtnPanel" HorizontalAlignment="Left" VerticalAlignment="Top" .....MORE STUFF..../>

This error is displayed when trying to load the designer :
Error 1 Assembly 'MyAppName' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. H:\usr\src\CS\MyAppName\MyAppName\MainFrameWindow.xaml 6
Error 2 The type 'local:PLTButtonPanel' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. H:\usr\src\CS\MyAppName\MyAppName\MainFrameWindow.xaml 220

When I compile, the erros go away, the app runs fine, BUT the Designer never loads the UI into view. It has no problem on ther identically configured machines.

Any ideas what is not set properly ?



I have a .NET 2 assembly project which is referenced from a C++ CLR DLL project. This all builds fine in VS2010 but using MSBuild the CLR projects fails to find the assembly namespace.

I've seen various blogs with a similar problem but the various workarounds don't seem to help (Copy to Local on/off etc).

If it helps the CLR DLL wraps the .NET assembly and exposes a native C interface for use by legacy apps.

Many thanks for in advance for your suggestions,



We have a fairly big SharePoint project where we use TFS, kicking of a build runs some tests and everything works as expected, but we get a warning:

CA0060 : The indirectly-referenced assembly 'BihConsumerInterop, Version=, Culture=neutral, PublicKeyToken=48e046c834625a88' could not be found. This assembly is not required for analysis, however, analysis results could be incomplete. This assembly was referenced by: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\ISAPI\Microsoft.Office.Server.Search.dll.

Now the solution according to other blogposts is to add the referenced DLL to the project, but it seems i cannot find anything about the assembly BihConsumerInterop, so I was wondering if there was anyone that knows a bit more about this DLL :)


I create a simple user control on a wpf application:
a StackPanel composed of a TextBlock and an Ellipse

<UserControlx:Class="MM2.NamedStop"x:Name="namedStop"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"mc:Ignorable="d"><Grid><Grid.Resources><StyleTargetType="Ellipse"x:Key="stopEllipse"><SetterProperty="Width"Value="6"/><SetterProperty="Height"Value="6"/><SetterProperty="Fill"Value="Black"/></Style></Grid.Resources><StackPanelOrientation="Horizontal"><TextBlockName="leftTextBlock"Text="{Binding Path=Text, ElementName=namedStop}"/><EllipseMargin="4,0"Style="{StaticResource stopEllipse}"/></StackPanel></Grid></UserControl>

Code behind:
Dependancy property Text binding to the Child textBlock Text

namespace MM2

 ///<summary>/// Interaction logic for NamedStop.xaml///</summary>publicpartialclass NamedStop : UserControl

  publicstatic DependencyProperty TextProperty = DependencyProperty.Register("Text",
                                      typeof(string), typeof(NamedStop),
                                      new PropertyMetadata(("stopName")));

  publicstring Text
  get { return (string)GetValue(TextProperty); }
   SetValue(TextProperty, value);

  public NamedStop()
In the Main Window:

I run the code and it works fine.
The designer works too.

I close the solution and I reopen it.

In the main window designer now I get two errors:




Error 1 Assembly must be specified for XAML files that are not part of a project. Reopen this XAML file after adding it to a project, close this file and reopen it using the project it is associated with, or modify the clr-namespace to include the name of the assembly. 

<local:NamedStop Margin="12,105,420,190" Text="Chelsea"/>
Error 2 The type 'local:NamedStop' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. 

I run on:
- Visual Studio 2010 C# edition
- Windows 7

I browse on the MSDN forums and I found many other questions about it.

WPF User Control http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/fc02cd12-8e79-46e5-86d0-729fcd31bcac/ (first post January 11, 2008 ) Designer Errors with UserControls in WPF project http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/6379d330-f382-4b4d-a690-e89326ab4c72 (first post January 25, 2009)WPF XAML xmlns: assembly not found problem http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/thread/174000a1-5166-49ea-92db-c02c0a8bcb13  (first post November 09, 2006 to 2010)"Assembly '...' Was Not Found" When including a reference to a local namespace http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/thread/0a244e58-dc0a-4f13-80ce-438f1e135320 (first post May 08, 2008)

I tried with the configuration manager to change the Solution Platform from x86 to x64 but the designer get the error.
If I run the code the application works.
Can I fix the problem?

Thanks in advance,

When we deploy BizTalk visual studio solutions from 2010 , we cannot find the assembly in windows assembly. Cannot see it either in tBizTalk assembly viewer. Any ideas where it can found and why they r not in assembly as they used to be in earlier editions. Thanks much.

I have a shared executable assembly (winforms) targeting .NET Framework 2.0 loaded from a network location. In the application entry point (Program.Main) I perform some tasks before calling Application.Run(). One of those tasks is a call to a stored procedure. Occasionally the call to the stored procedure results in a SQL timeout. When this occurs the assembly is taking a little bit longer to load. On subsequent calls to the assembly, sometimes the sql exception occurs and at other times it does not. I have tracing in the application which shows the steps the application is taking so I know it is actually entering Main and then the exception occurs when the call is made to the SQL server.

When the assembly is copied locally, the sql timeouts never occur. So I'm a little confused over exactly what is happening with the CLR loading the assembly. From what I understand when the assembly is loaded and the image is executed it is already running in local memory and the call is made from the local machine. Why would a slow loading assembly call cause this issue? Isn't the image already loaded into memory?


i received an error showing


Error    27    The type or namespace name 'IgnoreDataMember' could not be found (are you missing a using directive or an assembly reference?)    F:\Main project\downloaded facebook applications\Facebook\Types\Facebook.Types.auth.cs    24    10    Facebook

hop any one can help me out immediatly



 I use 'Microsoft.ApplicationBlocks.Data'  in my application. Now I want to generate a key pair and sign my assembly but i get the following error message.


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, Boolean forIntrospection) +0
18      System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +54
19      System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
20      System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
21      System.Reflection.Assembly.Load(String assemblyString) +25
22      System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32
23   24   [ConfigurationErrorsException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
25      System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596
26      System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +70
27      System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177
28      System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +185
29      System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +350
30      System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
31      System.Web.Compilation.BuildManager.CompileCodeDirectories() +525
32      System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +448
33   34   [HttpException (0x80004005): The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
35      System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57
36      System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612
37      System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +644
38   39   [HttpException (0x80004005): The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
40      System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3465427
41      System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +69
42      System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +279
43   44   45   46   47   --------------------------------------------------------------------------------
48   Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433 

 I've googled the problem, but can't figure out a solution.

Anyone had the same problem and fixed it?



I built a sp application on a dev environment and the code worked.  I moved the whole project to a different dev environent (i.e. differmt machine name, domain, etc), and when I try to compile, I get the above error (also, one about System.Data.dll)

If I understand, it means VS 2010 is getting confused as to use the 32 bit or 64 bit GAC?  If thats true, how do I force this in vs?




I have a class library.
The folder structure is:
ATO -> Web -> Security
Within the security folder I have a file called LdapMembershipProvider.cs.
In this file I have overridden MembershipProvider:

namespace ATO.Web.Security
    class LdapMembership : MembershipProvider

And I have successfully used this library in a project.

Just added another folder to the class library called Utilites.
In the Utilities Folder I added a file called  LdapUtilities.cs

Name space and class in the file is as follows:

using System.Text;
using System.Web.Security;
using System.DirectoryServices;
using System.Collections.Specialized;
using System.Configuration;
using System.Web.Hosting;
using System.Web;

namespace ATO.Web.Security.Utilities
    public class LdapUtilities
        /// <summary>
        /// Sets mail attribute in HttpContext.Current.Items["mail"]
        /// as well as impliments custom ValidateUser()
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public bool ValidateUser(string username, string password)

            return true;


So in the ASP.Net Web project I made a reference to the project:

Now in the web project I make a using statement:
using ATO.Web.Security.Utilities.

Here is the strange thing.  Intellisense will pop up Utilities with the {} icon knowing it is a namespace. 

But then I get the compile error:
Error 1 The type or namespace name 'Utilities' does not exist in the namespace 'ATO.Web.Security' (are you missing an assembly reference?) C:\Development\Applications\Fehix\login.aspx.cs 7 24 http://rmlssam/FehiDashx/

The intellisense knows it is there.  Why am I getting this error.

Another thing is from a button click in the web page I try directly:
bool ldapUserIsValid = ATO.Web.Security.Utilities.LdapUtilities. This whole pathway shows up in Intellisense but then it cannot pick up:
public bool ValidateUser from within:
public class LdapUtilites.


I'm getting this error message on compile a .NET solution(3.5) where there is a Class library which is developmed using .NET 1.1.
"Assembly generation failed -- Referenced assembly does not have a strong name"

it uses System.Web.Mail library whic is absolute (warning message).

But this class library individually compiles correctly

Can someone please advice me.


I am having a problem verfiying a fix from one of our third party vendors.

The fix has to do with a date control mask.   I have a stand alone application which is just a window with the date control and when it is built and run using the latest assembly the fix works.   When our main app is  built and run with the latest assembly it does not work.  I have looked at the assembly version that is loaded with our main app via a couple tools and it appears the the latest version is loaded, but I get the old version's behavior.

The third party assemblies are not in the GAC.

Does anyone have any suggestions of what to look at, or have any ideas of what might be going on in our case?

It feels like a reference or some type of environment problem



Hi.  I'm trying to locate all calling locations of a public function - some of the calling locations will be in external assemblies.  I've been trying Find Symbol, Find All References, and Navigate To.  For some reason, only the calling locations in my currently open solution show up as results.  I've tried referencing the external calling assemblies, and adding them to a custom component set - no luck.  I have the .dlls and the source code for all the external assemblies - but they are in separate solution file(s).  Anybody have any advice on this?  Any help is greatly appreciated.  Thanks,


I have a WCF Service (with servicecontracts,datacontracts, etc) , like this

    [ServiceContract(Namespace = "http://company.com/MyCompany.Services.MyProduct")]
    publicinterface IService
        CompositeType GetData();
    [DataContract(Namespace = "http://company.com/MyCompany.Services.MyProduct")]
    publicclass CompositeType
        // Whatever

If I want use the service in a client, I think there are two options:

1 - use Service Reference (use WDSL) to URL Publish of WCF Service.

2 - use Assembly Reference to assembly contains Interfaces, Contracts, DataContracts classes.

Which is the best way ? which the advantages of each other?

Should "Hi", "Thanks" and taglines and salutations be removed from posts? http://meta.stackoverflow.com/questions/2950/should-hi-thanks-and-taglines-and-salutations-be-removed-from-posts

<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure