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

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

VS2008 WPF Xaml: Is there a path length limit when loading an assembly?

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :WPF


It seems that there is a path lenght limit for VS2008 when loading XAML assemblies.

Using the Microsoft sample Southridge, if the project is stored on "C:\Projects\C# samples\Southridge_Labs\1.Southridge_Fundamentals\Start" the designer does not load the assemblies.

But if I copy my files the project to the root (C:\Southridge_Labs\1.Southridge_Fundamentals\Start) then it works fine.

Basically I have solved my problem, but I want to know if there is an EXPLICIT limit and I cannot find any information related.

Thanks for your help.

View Complete Post

More Related Resource Links

XAML WPF assembly not loading into designer


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 ?

Error loading an assembly in VS 2010


Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0385538b\d249bb9e\App_global.asax.nfwopg19.dll' or one of its dependencies. The system cannot find the file specified.

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.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\0385538b\d249bb9e\App_global.asax.nfwopg19.dll' or one of its dependencies. The system cannot find the file specified.

Source Error:

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.

Assembly Load Trace: The followin

Assembly dependency loading

I have a VSTO addin that I want to add a plugin loading mechanism to.  I publish the addin to a location on my hard drive, with the plugins in a separate folder.  I load plugins from assemblies using Assembly.LoadFile().  The plugins folder is outside of the AppDomain ApplicationBase. One of the plugins depends on a COM object, and Visual Studio automatically generates an interop assembly for the COM object.  But when I try to use that plugin, I get an exception saying that the interop assembly cannot be found.  It is in the plugins folder, along with the plugin assembly itself. I tried adding the plugin directory to the PrivateBinPath, but since it is outside the ApplicationBase, this is ignored.  It works if I put the interop assembly in the folder where the published VSTO addin is, but don't see that as a solution as it requires manually moving DLLs around each time things get rebuilt. Is there some way of telling the framework where to look for the dependency?  Or even of loading the dependency explicitly?  Since the dependency is also a .dll in the plugins folder, my plug-in loader attempts an Assembly.LoadFile on it, but this doesn't seem to help the framework to resolve the dependency when I try to use the plugin.

Is there a limit to the length of a vb script job

This sounds stupid, but I created a ms sql server job that is activeX - language = vbscript The job is just a series of log statements. If I make the script > 300 lines long, I get errors. If I chop out some of the log statements, it works ok. Does anyone have any idea what is going on and how to get around / fix this? thanks jonathan

VS2008 Debugger Loading ScriptResources Disables Step Menu

This is a Web Forms Website Project using several Ajax controls I set some break points, then F5, IE loads the .aspx page of the C# source I am trying to debug but then the Solution Explorer opens and adds an item and tree of items labeled Script Documents > Windows Internet Explorer > MyPage.aspx and about a dozen ScriptResource.axd files (including jquery files from a library loaded using absolute referencing which I have commented out in code to determine if jQuery library was causing this wierd behavior). The Debug > Step menu selections are all greyed out and pressing any Function keys does nothing. I also recall script files loaded into IE which "looked" like I was stepping into and over or whatever but that has not been intentionally repeatable. I am very puzzled and need some help understanding how and why this is occurring and what to do about it.

Bug With Namespace in xaml that points to assembly with Workflows/Activities?

Hey All, Kind of an oddly worded question, but I'll try my best.   I have a xaml file with a namespace using at the top like this: xmlns:vm="clr-namespace:My.Namespace" This namespace is within an assembly that contains some Windows Workflow 4 designers and activities. [Designer(typeof(DeploymentDelegateDesigner))] public class ExecutionDelegate : NativeActivity { [DefaultValue(typeof(BuildDeployment))] public Activity Body { get; set; } /// <summary> /// /// </summary> /// <param name="context"></param> protected override void Execute(NativeActivityContext context) { context.ScheduleActivity(Body); } } In the above snippet, BuildDeployment is an activity.   If I build this project, an error occurs on the property attribute (DefaultValueAttribute) which states: "Error 43 The type or namespace name 'BuildDeployment' could not be found (are you missing a using directive or an assembly reference?) C:\dev\PathToProject\Activities\ExecutionDelegate.cs 13 30 My.Namespace" I've masked the error to hide some proprietary information.   This ONLY occurs when I have a custom namespace at the top of one of my xaml files. I've tried cleaning/rebuilding the solution, and restarting Visual Studio 2010. I'm at a loss on this one and it is a show stopper. &nbs

IDE hangs when loading the Fluent XAML Control page

Hi All, This question is related to the MS Fluent WPF RibbonControl samples at http://fluent.codeplex.com. My OS is Vista. But the Fluent suite 1.3 is supposed to be stable. Nevertheless, the 3.5 NET sample apps will execute OK... but when I try to view the "window.xaml" code page in the VS2008 Pro IDE, the page loader hangs (the devenv.exe process consumes 50% of the CPU time) and never completes. Is the IDE configured properly? I'm new to Fluent and just installed the Samples. Also, I installed and uninstalled the MS Ribbon Control samples for WPF. If anyone can help... Please do! Thanks, King

FAQ: How do I get the maximum path/directory length?

How do I get the maximum path/directory length?Please remember to mark the replies as answers if they help and unmark them if they provide no help. Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.

Textrange.Load not loading Xaml code into a FlowDocument


I'm trying to convert text with Xaml tags into a FlowDocument.  I've done this before and it worked fine (as far as I can recall - that was about a year ago.)  Now I can't get this to work:

private Span FormatString(String _textToFormat)
    FlowDocument _formattedDocument;
    Span _formattedText;

    _myString = "<FlowDocument xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"><Paragraph>This is some <Run FontWeight=\"bold\">bold</Run> text.</Paragraph></FlowDocument>";

    _formattedDocument = new FlowDocument();
    _formattedText = new Span();

    TextRange textRange = new TextRange(_formattedDocument.ContentStart, _formattedDocument.ContentEnd);

    MemoryStream msDocument = new MemoryStream((new ASCIIEncoding()).GetBytes(_myString));
    if (textRange.CanLoad(DataFormats.Xaml))
        textRange.Load(msDocument, DataFormats.Xaml);

// rest of function trimmed - the problem is above

Things work fine up to and including the creation of the MemoryStream (inspection with the debugger shows that the bytes are in there.)  "textRange.CanLoad" also resolves to true, but textRange.Load(msDocument, DataFormats.Xaml) doesn't seem to do anything - after that, a look at "textRa

Cannot create unknown type when loading WF Service from loose Xaml with ActivityXamlServices


I am trying to host a WF4 (RC) Service dynamically. I have a test solution with two projects. The first is a declarative workflow service library with one root Flowchart activity in it, and a simple custom code activity. The workflow service library does not depend on any other custom assemblies or references. The second is my host app, which in my test solution is just a console application.

In my host app, I am attempting to the use ActivityXamlServices to load the Xaml for the workflow service into an activity, and then use the WorkflowServiceHost to fire up a workflow instance using that activity.

As soon as I try to new up the WorkflowServiceHost object, I get this exception...

Cannot create unknown type '{clr-namespace:DeclarativeServiceLibrary1}CodeActivity1'.

If I remove CodeActivity1 from my Flowchart designer, everything runs fine. If I add a direct reference to the workflow service project from my host project and then create a WorkflowServiceHost using an instance of my Flowchart activity instead of the activity created from the Xaml, it also works fine.

It seems to not like using my CodeActivity for some reason when loaded dynamically.

Limit to CAML Query Length ?

I have a dynamic CAML Query which runs Nested <Or> Statements. The Query works fine when there are Less than around 300 <Or>s but anything greater produces the "Value does not fall within the expected range" error. 

Ajax ToolKit not loading when open VS2008



Went to


And downloaded the the Toolkit then went to


And followd the instructions on installing the toolkit.

Then I used the toolkit in my VS2008 with no problem. The problem is that when I close the application I am working on in VS2008 and then re-open it in VS2008 I get the error  

Error 1 Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The module was expected to contain an assembly manifest.


Error 3 Unknown server tag 'asp:ToolkitScriptManager'

For every spot I have an Ajax control.

If I try to add an Ajax Control to the application I get

"The operation could not be completed. Invalid FORMATETC structure"

I do have the AjaxControlToolkit.dll in my Bin folder and I did a web reference to the dll also (I got those two peices of advice off the web)


The only fix I have is to delete the Ajax Toolkit tab in VS2008 and then add a new tab then do Choose Items... and re-choose the Ajax Toolkit dll I downloaded from CodePlex in the begining.

This i

VS2008 assembly load problem


Hi, I have .NET solution in VS2008. In my solution there are 20 projects. In Debug configuration everything is OK. But in Release configuration there is problem with loading one specific assembly(class library from my projects).

Could not load file or assembly 'Solution.Project, Version=1.0.3929.32377, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

My system is Windows 7 prof. 64bit. I checked directory and file(.dll) is OK. On other computers it`s OK. I checked out working copy to another directory and same problem.

Where can be problem please?

Assembly only used in xaml not copied to application folder


Hi, I have used a couple of assemblies (in a control library) where they have stuff (eg properties) only ever referenced in xaml. In these cases, the assemblies, are not being copied to the applications main folder.

As soon as I reference something in them from normal C# code, they get copied!

THis is in dev studio 2010, has anyone else had this, and know how to get around it?

Thanks in advance



VS2008 SP1 crash when opening XAML designer

Dear Sir,

I repeatedly encounter a hard crash each time I open a specific XAML file in the VS2008 designer (C# project). This repeats every time (frustrating). I use Windows 7 ultimate, VS2008 SP1 TFS (SP1 installed after TFS). Please find the attached entries from my Application event log below.

I understand that there is no SP2 yet and that there is some confusion with respect to the hot fixes in the forums. I would be happy if I could get a pointer to a relevant hotfix, since I cannot find anything that seems to fix my problem. It would also be interesting to know if/when a SP2 will be released, since there seems to be quite a few people out there with quite serious stability issues.

Yours sincerely,

PS As for other threads on this forum: 1) Having the toolbox pane open does not fix my problem. 2) And the fix in KB963035 does not work for me although I (in addition to the problem described here) also get the "busy waiting for an internal operation" message a few times a day.

First entry:

Faulting application name: devenv.exe, version: 9.0.30729.1, time stamp: 0x488f2b50

Faulting module name: unknown, version:, time stamp: 0x00000000

Exception code: 0xc00000fd

Fault offset: 0x0e

Issue with dynamic usercontrol loading when using ParseControl() method in VS2008


In the process of migrating an old VS2003 web app to VS2008, I'm running into this issue and haven't been able to find a resolution. 

Sample code:

"Default.aspx" has a PlaceHolder(ToolHeader).  In the Page_Load(), we dynamically load a user control passing in the virtual path to a helper method [public Control ParseUserControl(string virtualPath)].  This reads the content from the physical path, returns a Control from ParseControl() method. 

 I immediately get the following error when I open the default.aspx page in browser.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'DynamicUC.UcControl'.

Source Error:

 Line 1:  <%@ Control AutoEventWireup="true" CodeBehind="UcControl.ascx.cs" Inherits="DynamicUC.UcControl"  %>

Can't figure out why it can't load the type.  Namespaces are looking right.   I try removing the Inherits="DynamicUC.UcControl" attribut

No xaml designer in vs2008



I create WPf application, but i can not see the xaml designer, that means only xaml code exists, no interface.


The application can run and display xaml page


when I try to view the xaml designer, the error messeage is:


There is no editor available for "~~~/××.xaml" . Make sure the application for file type(.xaml) is installed.



I have try many times to install framework 3.5, vs2008 express edition, vs2008 beta2 professional, vs2008 trial edition, but still no work




   how to install xaml editor? or how to install application for .xaml? or what should i install?




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