Issue with IReadOnlyList on WP8.1 .NET 4.5.2 - c#

First a little background:
I'm trying to write an app for Windows Phone (for home use, nothing commercial) to send data over bluetooth to an Arduino.
I'm using Visual Studio Comunity 2015, a Windwos Phone with 8.1 (Denim) and my PC is also Windows 8.1.
I had a hard time finding anything useful to use bluetooth on Windowws Phone for this kind of application and finally found this library :
BluetoothManager.cs
With the rest of the Github project I'm trying to understand and use it, but each time I get an error :
Exception thrown: 'System.Exception' in mscorlib.ni.dll
After using several breakpoints, I found the cause, which is Line 74 of the library.
When adding a watch for the variable pairedDevice, I get
error CS0012: The type 'IReadOnlyList<>' is defined in an assembly
that is not referenced. You must add a reference to assembly
'System.Runtime, Version=4.0.10.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
I tried several things the main answers of this question, but nothing worked.
Installing the fix from Microsoft changed nothing
I don't have an App.config or Web.config file (because it's WP8.1 ?)
Adding .dlls from the Facade-folder says that it's already referenced
Can somebody help me with this?

Related

WPFToolkit.Aero2 failed to load

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.

Xamarin visual studio filenotfoundException Windows.winmd

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

Pechkin lib throws a TypeLoadException

I've tried many examples that use Pechkin and Pechkin.Synchronized but can't get it to run, because all the times, I get the following error.
An unhandled exception of type 'System.TypeLoadException' occurred in mscorlib.dll
Additional information: Could not load type 'Pechkin.GlobalConfig' from assembly 'Pechkin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
I'm using x64 Windows 7 Home Basic with VS2012 Express for Desktop and the csproj is configured to build for x86 target and installed Pechkin and Pechkin.Synchronized from using nuget PM.
The last code I tried was from here
It has been a while since you asked this question and you've already fixed your issue, but maybe it'll help someone else.
You should probably try implementing TuesPechkin instead. This is a fork of Pechkin solving many issues (Pechkin issues) and using the latest version of WKHTMLTOPDF. The developer is quite active and will probably solve any bug you may find.
I think the problem was the name of my C# Console project, it was Pechkin. When I changed it to PechkinTest, System.TypeLoadException did not arise.
Anyways, thanks.
I also got the same problem and i changed my project name from Pechkin to some other name and the problem solved !

C# remote (exchange)powershell

i made a while back an console application(in c#) which does a few powershell commands.
i connect to the (exchange)powershell with remote powershell.
but when the application runs;
RunspaceFactory.CreateRunspace(connectioninfo)
i get the following exception:
Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
the only thing i cannot figure out is why it was working before perfectly. i searched my solution, nowhere i could find a reference to that dll. i also searched my c# drive it was nowhere to be found either.
i restored my solution from my backup of 2-3 months old and the same error.
Can someone give me some pointers to what is going wrong ?
Found the problem.
apparently something is wrong on my computer(I'm guessing after installing the Beta of VS11)
anyhow, after using the project on a different machine where VS2010 is installed it worked just fine.
The error message is misleading.
I had got the error, as I used the reference to the System.Management.Automation.dll Version 3.0.0.0 (which means PowerShell 3.0).
The issue is, the Exchange Server 2007/2010 isn't compatible with PowerShell 3.0, so you must bind the reference to the System.Management.Automation.dll version 1.0.0.0 (Windows PowerShell 2.0).
Check all project references
Check app.config
Have a look here
UPDATES
Have a look here

NDjango throws TypeLoadException

I'm just trying to get started with NDjango but am having issues running a basic test app. When running the page in either debug or release the following exception is thrown:
Could not load type 'Microsoft.FSharp.Core.CompilerMessageAttribute' from assembly 'FSharp.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
This is thrown when the NDjangoHandle is created in the HttpApplication ctor. The fsharp assemblies are definitely all there in the gac (and they seem to be distributed with NDjango too) so I'm a bit confused about this one. Googling this turns up zip.
I'm using NDjango 0.9.7.0 for .NET 4.0 in vis studio 2010
Cheers
Did you install FSharpPowerPack? I am not sure if it was stated clear enough in the installation package but it is required and it does not come with the standard installation.
Also - by any chance do you have a side by side installation of VS2010/VS2008? The FSharp installation package has a bug which can cause similar problems
Let me know if you need further help. You can communicate with us directly through bug tracker and/or mailing list

Categories

Resources