I'm creating a Portable Xamarin.Forms project, and I just added some pages I had on my shared project fixing errors.
After the edits, the project doesn't compile with the error
Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.FileNotFoundException: Could not load assembly "Windows.winmd, Version=, Culture=neutral, PublicKeyToken='. Pheraps it doesn't exist in the Mono for Android profile?
Project: myproject.Droid
Plus others 4670 errors like this:
file .winmd "Windows.winmd" contains type 'Windows.Storage.Streams.IDataWriter'. Windows namespace usage is reserved.
Project: myproject.WinPhone
Any error has a different type and they all refers to the WinPhone project.
I tryed checking in the Droid references for the Mono.Android but this is the scenario:
(the selected one was thicked, i deselected it for testing, but still same error)
What can I do?
Thanks all
Related
I'm getting an unusual error when trying to build my newly created ASP.NET Core 6 project. Although it was working fine for the last few days, this error started appearing suddenly:
Unhandled Exception: System.BadImageFormatException: Could not load
file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The
module was expected to contain an assembly manifest.
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets
I tried changing the platform target to other options like x64 or x86, but this problem doesn't seem to come from the project itself. That is because, I created another project to see if it's still appearing. Turns out that this error being thrown even when I build my newly created project.
What could possibly go wrong? Should I reinstall Visual Studio 2022 (Community edition)?
EDIT
Rebooting the system fixed it. This could probably be an issue in my hard disk too as Hans Passant has mentioned in the comments section below.
I'm making an xamarin android project with asp.net web api. I put api project and android project in same solution. Android project get data from the api through data service. But when I added zxing NuGet package and I build the project this error came. Do the project really need this assembly? I guess not. But suddenly the project trying to load this assembly.
So, I got this error:
Severity Code Description Project File Line Suppression State Error
Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'System.Web, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono
for Android profile? File name: 'System.Web.dll' at
Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference
reference, ReaderParameters parameters) at
Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1
assemblies, AssemblyDefinition assembly, Boolean topLevel) at
Xamarin.Android.Tasks.ResolveAssemblies.Execute()
This error make the project can't be build, debug and run.
At first android project didn't need this reference.
I did add system.web references to my project, but after I added the reference this message warning showed up:
There was a mismatch between the processor architecture of the project
being built "MSIL" and the processor architecture of the reference
"System.Web", "AMD64". This mismatch may cause runtime failures.
Please consider changing the targeted processor architecture of your
project through the Configuration Manager so as to align the processor
architectures between your project and references, or take a
dependency on references with a processor architecture that matches
the targeted processor architecture of your project. ShopDiaryApp
At first project no need this reference. but now why they trying to load one? they make this warning uncomfortable and afraid it will cause problem at the end.
Any ideas to remove this warning? Thanks in advance.
I get this error when debugging:
Managed Debugging Assistant 'BindingFailure' : 'The assembly with display name 'WPFToolkit.Aero2' 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 'WPFToolkit.Aero2, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'
I tried uninstall the Extended WPF Toolkit nuget (3.3.0) and install again. didn't solve.
What am I missing ?
I am using VS Enterprise 2017 version 15.5.7, .NET 4.7.1.
The exception is when I debug Managed debugging assistant on the upper
line of my Xaml.
My references are:
just had the same issue, while using the WPFToolkit.Extended (standalone, old version)
fixed it by removing the reference I had, and installing the nuget you refer to.
my current references look like this:
Note, that I don't reference "WPFToolkit", while you - do.
I would say, try removing the "WPFToolkit" reference, see if it helps.
I am just start learing Xamarin
I am running just a single line program just Hello Xamarin
Whenever I run the project it throws the error
Severity Code Description Project File Line Suppression State
Warning Type universe cannot resolve assembly: System.Runtime,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a. App4.UWP
Severity Code Description Project File Line Suppression State
Warning Cannot resolve Assembly or Windows Metadata file
'System.Runtime.dll' App4.UWP C:\Users\Muhammad U
Usman\documents\visual studio
2015\Projects\App4\App4\App4.UWP\App4.UWP.csproj
Looks like you are trying to create a Universal Windows App with Xamarin. There is some error in the project creation, some of the dependencies might be missing. Go to project properties and check the target framework. If the target framework is .NET CORE, install packages related to Universal Windows Platform (UWP). Otherwise, if the target framework is classic .NET use the below link to get started.
Create UWP app
I have a simple app which I have added a CodedUI Test Project for trying out CodedUI Tesing. When I create the Test Project and create the UIMap and try to build the test project to run it, I get the following error message. The same error keeps coming in every project I build.
Error 1 Friend access was granted to 'UITest,
PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293',
but the output assembly is named 'UITest, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null'. Try adding a reference to
'UITest,
PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293'
or changing the output assembly name to match. c:\Program Files
(x86)\Microsoft Visual Studio
12.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.TestTools.WindowsStore.UITest.Extension.dll UITest
I have successfully build and ran a CodedUI Project a couple of days before this. It was fine.
It looks like you have called your solution/project UITest which is also the name of one of .NET's assemblies. When that happens, .NET can get confused and throw the error you have shown.
Therefore, try renaming your solution/project to a name that isn't the same or part of an assembly in the .NET framework.