Error showing window-VBForums
Results 1 to 2 of 2

Thread: Error showing window

Hybrid View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2012
    Posts
    6

    Error showing window

    I've an application build with C# and WPF, that is being developed by 3 developers, including me.
    On a certain stage of the application, an error came up that we can't determine how it happened and how to solve it, so we ask for your help.
    Although everything works well when compiling, and running the aplication, we can't see the window in design view. Instead we have the following error message on the Visual Studio IDE:


    "An Unhandled Exception has occurred

    Click here to reload the designer

    Details:
    System.ArgumentOutOfRangeException
    startIndex cannot be larger than length of string.
    Parameter name: startIndex
    at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
    at MS.Internal.Host.PersistenceSubsystem.ExtractSourceFileInfo(Uri uri)
    at MS.Internal.Host.PersistenceSubsystem.FormatInnerXamlParseException(Exception ex)
    at MS.Internal.Host.PersistenceSubsystem.ReportException(Exception ex, TextModel model, Int64 sourceVersion)
    at MS.Internal.Host.PersistenceSubsystem.Load()
    at MS.Internal.Host.Designer.Load()
    at MS.Internal.Designer.VSDesigner.Load()
    at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedView.Load()
    at MS.Internal.Designer.VSIsolatedDesigner.VSIsolatedDesignerFactory.Load(IsolatedView view)
    at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
    at MS.Internal.Host.Isolation.IsolatedDesigner.BootstrapProxy.LoadDesigner(IsolatedDesignerFactory factory, IsolatedView view)
    at MS.Internal.Host.Isolation.IsolatedDesigner.Load()
    at MS.Internal.Designer.DesignerPane.LoadDesignerView(Boolean isReload)"

    We've tried to see if we could solve this using Expression Blend, but apparently everything is ok in Blend. We can see the window (although the programmers aren't using blend, so we need it to work in Visual Studio). I've installed SharpDevelop to see i the problem could be solved from it, but Sharpdevelop shows the window as a grey window, without any objects on it and has the following output:

    The target "ResolveAssemblyReferences" does not exist in the project.

    and when building gives the following output:

    Build started.
    Warning MSB3247: Found conflicts between different versions of the same dependent assembly.
    Build finished successfully.

    We've been googling and trying several workarrounds but we haven't found the solution.
    Can you please help?

    My thanks in advanced

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2012
    Posts
    6

    Re: Error showing window

    Well, i think i found the sollution here

    http://stackoverflow.com/questions/1...the-same-depen

    the problem looks like duplicate eferences. I think it's "mscorlib.dll". I just don't know how to fix it.

    the IDE now gives me the following info

    ...

    Unified primary reference "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".
    Using this version instead of original version "2.0.0.0" in "c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.DebuggerVisualizers.dll" because there is a more recent version of this framework file.
    ...
    Resolved file path is "C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll".


    I'm only placing here these lines but there are several other references, specially from sql and they all say "Using this version instead of original version "2.0.0.0"",... "because there is a more recent version of this framework file."

    I strongly believe that this "reference spaghetti" is causing the problem.

    How can i retrieve one of these .dll's (2.0 or 4.0)?
    It seems impossible to change the versions from the "add reference" since Visual Studio tells me that the reference cannot be taken.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.