I have a solution with around 10 projects, I have not written any of this myself, but I'm going to take over a project here. The project that is the main project is based on WPF. When I try to run this project, I get the following compiler error:
The tag 'RoutingManagerView' does not exist in XML namespace 'clr-namespace:RoutingManager.Views;assembly=RoutingManager'. Line 29 Position 14. C:\Source\WSA\WsaClient\Views\MainView.xaml 29 14 WsaClient
Then, if I double click this error message, so that the xaml is opened, and the designer is loaded, the designer does not load, and I get 3 more error messages:
Unable to load the metadata for assembly 'WsaClient'. This assembly may have been downloaded from the web. See http://go.microsoft.com/fwlink/?LinkId=179545. The following error was encountered during load: Could not load file or assembly 'WsaClient' or one of its dependencies. The system cannot find the file specified. C:\Source\WSA\WsaClient\Views\MainView.xaml 1 1 WsaClient
Unable to load the metadata for assembly 'RoutingManager'. This assembly may have been downloaded from the web. See http://go.microsoft.com/fwlink/?LinkId=179545. The following error was encountered during load: Could not load file or assembly 'RoutingManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. C:\Steria\Forsvaret\P6088\Source\WSA\WsaClient\Views\MainView.xaml 1 1 WsaClient
The type 'Views:RoutingManagerView' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\Source\WSA\WsaClient\Views\MainView.xaml 29 14 WsaClient
I googled it, and many have suggested that this is because a DLL is locked since it originates from the internet. However in my condition, I do not have a DLL. It's complaining on two projects that are a part of the solution, WsaManager and RoutingManager. I got all the source code on a zip file on an usb pen, and I have extracted it to somewhere on my c drive, so there is no remote access of the code.
If anyone have had the same or similar problem earlier, I would highly appreciate any pointers here on how to resolve this.
EDIT
The last error message is given on this line in the XAML file:
<Views:RoutingManagerView DataContext="{Binding Dependency}"/>
And on the top of the XAML file, this is the import for the assembly:
xmlns:Views="clr-namespace:RoutingManager.Views;assembly=RoutingManager"
Resolve this by right clicking on the solution and choosing 'Rebuild Solution'
An additional point for other readers: if your projects builds successfully, but you get this error message while trying to load your view in the designer, make sure your assembly is x86 or Any CPU, because Visual Studio 2010 is a 32bit process and cannot load x64 assemblies in the designer.
To resolve this problem, I had to compile the projects one by one, starting from the project with no dependencies on other projects, and then working my way "up".
It seems that the Build all did not manage to do this properly automatically.
Try this, this was the only advice that worked for me:
Unable to load the metadata for assembly ''. This assembly may have been downloaded from the web. See http://go.microsoft.com/fwlink/?LinkId=179545. The following error was encountered during load: Could not load file or assembly '' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
In WPF project to allow the project to load from remote source we have to enable it in the configuration file devenv.exe.config.
Step 1: Search the configuration file devenv.exe.config in your system. Usually it is located at
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config
Step 2: Edit the configuration file. Add following line in the tag
<loadFromRemoteSources enabled="true" />
Step3: Restart your visual studio.
http://exacthelp.blogspot.cz/2012/02/unable-to-load-metadata-for-assembly.html
Unable to load the metadata for assembly 'WsaClient'. This assembly
may have been downloaded from the web. See
http://go.microsoft.com/fwlink/?LinkId=179545. The following error was
encountered during load: Could not load file or assembly 'WsaClient'
or one of its dependencies. The system cannot find the file specified.
C:\Source\WSA\WsaClient\Views\MainView.xaml 1 1 WsaClient
I run into same error: I can build and run my project, but I can not design XAML. I realized that it was local configuration issue because it's not replicable on my other machine (using same repository revision).
I started digging more and figured out that VS 2010 does not like # symbol in path. So error shows up when I have my sources in
C:\#projects\<my project>
After I moved them to
C:\projects\<my project>
Problem is gone.
I hope this will help to someone else.
I suspect the ..
The tag 'RoutingManagerView' does not exist in XML namespace 'clr-namespace:RoutingManager.Views;assembly=RoutingManager'. Line 29 Position 14. C:\Source\WSA\WsaClient\Views\MainView.xaml 29 14 WsaClient
.. error is causing a cascade of other errors. It looks like you're trying to create a RoutingManagerView from the namespace RoutingManager.Views in the assembly RoutingManager. However, it is not there. Make sure the class is visible to the outside world. Or try to clean and rebuild the solution and see on which project the first error occurs. Because if the projects are interdependent, an error in one project might cause reference errors in others.
Related
Since today I get the following new Error message:
System.IO.FileLoadException: Could not load file or assembly 'WebDriver, Version=2.53.1.0, Culture=neutral, PublicKeyToken=1c2bd1631853048f' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) ---> System.IO.FileLoadException: A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
Everything worked fine until yesterday and now I lost 6 out of my 7 test VMs to this error.
I read every documentation I could find and tried to compare the non working VMs with the the non working version and could not find a difference.
Suspicious is the Version=2.53.1.0 as the current WebDriver DLL is 4.4.0. Where could the reference to this potential old DLL come from?
Is there a debug or logging option I could activate? A way to see which DLLs are loaded?
Needless to say that with only 1 out of 7 Testmachines we will not be able to meet the deadline.
Got it. It's the other way around. I must not use a new version. I must use an old 2.53 version.
The update must have slipped in because I can't remember updating them consciously.
For those who have similar problems: Extract the content of selenium-dotnet-strongnamed-2.53.1.zip into C:\Program Files (x86)\Common Files\microsoft shared\VSTT\Cross Browser Selenium Components\
Adjust destination directory if you have an unusual Windows installation.
ASPNETCOMPİLER(0,0): Error ASPCONFIG: Could not load file or assembly 'DAL' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I update oracle data access from 2.121.2.0 to 4.122.19.1.
I changed my project platform target to x64.
Now project is working. But when I publish error occured.
Does anyone know what may be causing this issue and how to solve this problem ?
İf you look output you see that compiler use C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_compiler.exe but I need is C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_compiler.exe. x86 aspnet compiler doesn't compile for x64 platform. So I changed compiler with added new x64 active solution platform. Then everything is ok
I'm trying to run PRISM (MEF) example project, but get this error:
Managed Debugging Assistant 'BindingFailure' has detected a problem in
'Prism4MefDemo.vshost.exe'.
Additional information: The assembly with display name
'Microsoft.Windows.Shell' failed to load in the 'Load' binding context
of the AppDomain with ID 1. The cause of the failure was:
System.IO.FileLoadException: Could not load file or assembly
'Microsoft.Windows.Shell, Version=3.5.41019.1, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)
I've tried to remove and manualy add reference to Microsoft.Windows.Shell but still nothing.
The version of this DLL is 3.0.1.0, and not 3.5.41019.1 as in the Exception.
This is the line with the Excecption:
protected override DependencyObject CreateShell()
{
return this.Container.GetExportedValue<ShellWindow>();
}
How can I fix it?
Thanks.
Finally I solved this issue by installing Multilingual App Toolkit from here and Add Reference to "Microsoft.Windows.Shell.dll" from the location "C:\Program Files (x86)\Multilingual App Toolkit" or copy the dll to your private assembly folder and refer it.
When you install Microsoft.Windows.Shell.dll from Nuget, it was installing v3.0.1, But the actual expected version was v3.5.41019.1. you ll get this new version from the above path.
Thanks
So after trying everything, I looked for others files in my computer (Microsoft.Windows.Shell.dll) and found newer version, as expected by the Exception (3.5.41019.1) in MicrosoftRibbon for WPF\V3.5 folder.
It is strang,because the latest version of the NuGet package is 3.0.1.
Thanks anyway.
Adding Microsoft.Windows.Shell.dll v3.5.41019.1 to your project references, would solve the problem.
We had this problem when using the Ribbon control.
The solution was remove the ribbon: prefix from the very start of the XAML and use the default ribbon control, not the one that utilizes a namespace.
I renamed my WPF application's assembly from DBce_TEST2 to AMS, then attempted to build it to see what would happen. I ran it, and it wouldn't build for obvious reasons but now after renaming it back to DBce_TEST2 I get the following error:
Managed Debugging Assistant 'BindingFailure' has detected a problem in 'G:\C# Projects\Asset Management System\DBce_TEST2\bin\Debug\DBce_TEST2.vshost.exe'.
Additional Information: The assembly with display name 'AMS' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'AMS' or one of its dependencies. The system cannot find the file specified.
The error can be fishy. Use Fusion log viewer to understand what has gone wrong.
How to enable assembly bind failure logging (Fusion) in .NET
Figured it out. Renamed the assembly again to some random text, attempted to run it, then renamed back to original assembly name and the error disappeared. Guess some generated files were messed up by visual studio a little bit, and this fixed it.
I'm having little problem running my C# application after switching to Windows 8.1 from 8.
The problem is that I get this exception from title and there's not much help online. I tried to pinpoint the problem and it seems like my x64 application is trying to call x86 CSharp library. The reference in project leads to a DLL file, that upon calling x64 dumpbin program with /headers parameter outputs:
Dump of file Microsoft.CSharp.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
14C machine (x86)
3 number of sections
4FFA5C64 time date stamp Mon Jul 09 06:21:56 2012
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
2022 characteristics
Executable
Application can handle large (>2GB) addresses
DLL
Notice the machine is x86, while the application is running in x64 (checked with Environment.Is64BitProcess). This might be the problem I'm facing, however I can't find way to solve it - there seems to be no x64 .Net libraries installed. The only ones I have found are at: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework. Or maybe I'm completely off and there's some other problem. Anyway the exception occurs at startup in one of constructors and full detail is:
Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
"Could not load file or assembly 'Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The module was expected to contain an assembly manifest."
Edit:
While still panicking, I solved this by downloading CSharp.dll and replacing the dummy 0-byte file in path shown in answer by it.
The module was expected to contain an assembly manifest
You've been looking at a reference assembly, it is not the one that's actually loaded when you run your program. Microsoft.CSharp.dll is stored in the GAC, put there by the .NET installer. You can see the file by navigating to c:\windows\microsoft.net\assembly\gac_msil\microsoft.csharp. Keep clicking until you get to the file.
The exception message is a very unhealthy one, it doesn't recognize the DLL as a .NET assembly. There are few decent explanations for that, other than the file being corrupted. File corruption is always bad news, a strong hint that your hard-disk is failing. You'll need to get it fixed, follow-up if necessary at superuser.com