I opened a Xamarin cross platform sample Project in Visual studio 2013 and When I build, it gives this error:-
This question is also same but no one reply any answer.
Error 2 The "CompileXaml" task failed unexpectedly.
System.IO.FileNotFoundException: Could not load file or assembly 'XamlServicesWP, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'XamlServicesWP, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Server stack trace:
at Microsoft.Silverlight.Build.Tasks.CompileXaml.GenerateCode(ITaskItem item, Boolean isApplication)
at Microsoft.Silverlight.Build.Tasks.CompileXaml.Execute()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Build.Framework.ITask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Finally , I got solution for this. I upgrade my Visual Studio from Update 2 to Update 4. When you Build your project it gives and error about Hyper - V Network adapter. To Solve that, allow to change in Hyper -V Network Adapter settings by click on "Retry" button in prompt. ( You can also upgrade Window phone SDK to 8.1 for better experience. It is optional not necessary to solve this error.)
I worked around this problem by going back to Visual Studio 2019, rather than sticking with Visual Studio 2022. It seems 2022 still has a few issues.
Related
System.TypeLoadException: 'Method 'get_HistoryInfos' in type 'CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper' from assembly 'CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' does not have an implementation.'
Running into issues with my Visual Studio 2019 project, which is using CrystalReports Service Pack 30. When attempting to create a ReportDocument object, the system throws an error (see text above). Attempted for several days to find a solution online, and am not sure what to do next to rectify the problem. Any feedback or assistance you can provide is greatly appreciated.
I've built a Visual Studio extension for Visual Studio 2015 and 2017. I've developed it with 2017 and everything works great on 2017.
When I install it on VS 2015 I get an error message saying it failed to load my package. In the visual studio ActivityLog.xml file I see the following error.
How can I enable both VS 2015 and 2017 to run the extension?
CreateInstance failed for package [MainWindowPackage]
Source: 'mscorlib'
Description: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.VisualStudio.Shell.15.0, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type) at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase) at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo) at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)
According to the error message, your extension dependency on Microsoft.VisualStudio.Shell.15.0, which is a VS 2017 assembly. So it is not contained in your VS 2015.
If you want your extension supports multiple versions of Visual Studio, you need to let your VSPackage to using only the features of the earliest version of Visual Studio that you support and program your VSPackage to adapt to the version of Visual Studio in which it is running. You could read this document: https://learn.microsoft.com/en-us/visualstudio/extensibility/choosing-between-shared-and-versioned-vspackages
And you also could reference the document that Supporting Multiple Versions of Visual Studio.
The custom installation path is "C:\Users\UserName\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\". Please check your extension path to make sure the Microsoft.VisualStudio.Shell.15.0 is installed.
You should reference Microsoft.VisualStudio.Shell.14.0 and other assemblies from VS 2015 in your extension to support both VS 2015/2017.
I have just tried updating Xamarin (for Visual Studio); it's now 4.5.0.433
My project (which compiled OK before the upgrade) now won't compile. Not
sure what my previous version was: probably 4.2.63 or earlier.
I am getting this exception:
Exception while loading assemblies: System.IO.FileNotFoundException:
Could not load assembly 'SMDiagnostics, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089'. Perhaps it doesn't
exist in the Mono for Android profile?
////File name: 'SMDiagnostics.dll'//
// at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve AssemblyNameReference reference, ReaderParameters parameters)//
// at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference)//
// at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)//
// at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver) LocationService/
I have investigated here Xamarin.forms Exception while loading assemblies Xamarin.Android.Support.v4).
No success.
So, I have now uninstalled all of Xamarin from VS2015 and tried
re-installing, only to find that VS2017 is now installed, and I cannot
re-install Xamarin into VS2015 - every time I try, a new install of
VS2017 is started. This is annoying in itself, I was happy with VS2015.
But even in VS2107, I am getting exactly the same error.
I have searched the Windows directory for SMDiagnostics.dll and there are several different copies in subfolders of C:\Windows\WinSxS. So why the sudden error, when the project was OK before today (nothing changed in the project itself!)
Here is the error that I get when I add OzekiSDK to my project references:
Error 1 Exception while loading assemblies:
System.IO.FileNotFoundException:
Could not load assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Windows.Forms.dll'
at Xamarin.Android.Tuner.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() SIPPHONE2
What is causing this error and how can I correct it?
System.Windows.Forms is not available on Xamarin.Android, therefore it is not possible to use this SDK as it appears to be targeted for Windows desktop apps.
My projects cannot be loaded anymore. Solution explorer says it is
(Incompatible)
**Unsupported
This version of Visual Studio is unable to open the following
projects. The project types may not be installed or this version of
Visual Studio may not support them. For more information on enabling
these project types or otherwise migrating your assets, please see the
details in the "Migration Report" displayed after clicking OK.**
**Non-functional changes required
Visual Studio will automatically make non-functional changes to the
following projects in order to enable them to open in Visual Studio
2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010
SP1. Project behavior will not be impacted.**
The generated HTML in the project directory says
The application which this project type is based on was not found. Please try this link for further information:
http://go.microsoft.com/fwlink/?LinkId=628321&projecttype=8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942
and the link is extremely unuseful. The log in appdata says
2219 ERROR SetSite failed for package [Visual C++ Project System Package][Object reference not set to an instance of an object.]:{ at
Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.<>c__DisplayClass55_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task) at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.ApartmentMarshaler.Invoke(Func`1
method) at
Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCProjectEngineShim.Initialize(IntPtr
instResources, Object sp, Object browser, IVCBuildPackageInternal
bldPkg)} {F1C25864-3097-11D2-A5C5-00C04F7968B4} 80004003 - E_POINTER
VisualStudio 2015/12/03 04:10:01.316 2220 ERROR End package load
[Visual C++ Project System Package]
and
616 ERROR SetSite failed for package [Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.HtmlToolHostPackage,
Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a][Expected 1 export(s) with contract
name
"Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.Bridge.IWebKitDiagnosticsProvider"
but found 0 after applying applicable constraints.]:{ at
Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition
importDefinition) at
Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String
contractName, ImportCardinality cardinality) at
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String
contractName) at
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String
contractName) at
Microsoft.VisualStudio.Composition.ExportProvider.GetExportT at
Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueT
at
Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceT
at
Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.HtmlToolHostPackage.OnCreateService(IServiceContainer
container, Type serviceType) at
Microsoft.VisualStudio.Shell.Package.GetService(Type serviceType) at
Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.HtmlToolHostPackage.GetServiceT
at
Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.HtmlToolHostPackage.Initialize()
at
Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider
sp)} {B66F381B-48DE-4C10-B71B-EF9A2A808D85} 80131500 VisualStudio
2015/12/03 03:57:12.693 617 ERROR End package load
[Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost.Package.HtmlToolHostPackage,
Microsoft.VisualStudio.WebClient.Diagnostics.HtmlToolHost,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]
Download and reinstall Office Tools from http://aka.ms/getlatestofficedevtools and after restart it should work again.
It's possible that this is caused by a problem with deploying Visual Studio's config file during the Update 1 install process. To learn more about that, please see https://social.msdn.microsoft.com/Forums/vstudio/en-US/e011bc08-8b1d-4a2a-99d6-a167da922145/visual-studio-2015-update-1-fails-to-update-devenvexeconfig-plus-fix?forum=vssetup. If you're hitting that problem, please be aware that my team is working on deploying a fix for future installs.
If your machine is not impacted by that problem, then I'm afraid I don't know what the specific problem is. If you're willing to share your setup logs with me, I can do some analysis to see if something failed to install properly. If you want to go that route, please contact me directly at eric.knox#microsoft.com so I can send instructions.
Eric Knox, Visual Studio engineering manager