PhoneBootStrapper namespace in windows phone - c#

I'm trying to use MuPDF from Github for Windows phone 8. The Author MishaUliutin mentioned about sample project in a comment of issue. So I downloaded Repository code from here.
I tried to build the project but I am getting error namespace 'PhoneBootstrapper' could not be found on PhoneBootstrapper class. I'm not sure about the PhoneBootstrapper class or Is there any thing else that I'm missing.
Edit:
I tried to add the downloaded project to another new project using Add existing project option and then try to add reference from solution it gives the fallowing error in image.
For this I unblocked the dll file suggested from here http://vkslabs.com/reference-higher-version-incompatible-assembly-added-project/ (not working)
&
- I downloaded the sample project from Here [ https://bitbucket.org/mishauliutin/pdf-reader-for-wp8-public/downloads ]
- And sample project itself having a Solution file(.sln).
- I try build it & gives me the PhoneBootstrapper error.
So.. I believe phoneBootstapper is class from Caliburn.Micro which is added as nuget package to the project.

Related

Type or namespace name TSocket could not be found apache thrift C# Visual Studio 2019

Screenshot of installed thrift package and Thrift.dll reference:
I am trying to create a simple thrift client in Visual Studio 2019 using C#. I have generated the c# thrift bindings and everything else. However, I get "Type or namespace name "TSocket" could not be found". I have no other errors. Here is a snippet from my setup code:
// imports, namespaces
using System;
using System.Net;
using Thrift;
using Thrift.Transport;
using Thrift.Protocol;
TTransport socket1 = new TSocket("hostname", port);
TTransport transport = new TFramedTransport(socket1);
(more stuff .....)
I have no other issues with other references to thrift modules within the client. It just can't find "TSocket" somehow. I am super new to c# and thrift.
I am using thrift 0.14.1 and have installed it using the NuGet packages add-on Visual Studio 2019.
What could be the problem? Thanks.
screenshot of error
After looking at, it seems "TSocket" is not even listed under Transport as you can see in the screenshot below.
screenshot of available modules under Thrift Transport
Thrift 0.14 changed some names and the nested namespace structure. What was Thrift.Transport.TSocket is now Thrift.Transport.Client.TSocketTransport. See if swapping that fixes it.
If not check your project ref to the Thrift lib. Something like this may help (quoting "The Programmer's Guide to Apache Thrift"):
"To add the C# Apache Thrift library reference, right-click the References item in the project in the Solution Explorer and choose “Add Reference”. Next use the “Browse...” button to locate the Thrift.dll in thrift/lib/csharp/src/bin/Debug (or wherever). Make sure that there is a check next to the Thrift.dll entry in the Reference Manager dialog and then click OK. After a brief pause Intelisense errors should clear."
... or using the package manager:
"To add a Thrift.dll reference you can simply run the PackageManager install command:
PM> Install-Package -Prerelease ApacheThrift -ProjectName <your proj name here>
'ApacheThrift 1.0.0-dev' already installed.
Adding 'ApacheThrift 1.0.0-dev' to tradeServer.
Successfully added 'ApacheThrift 1.0.0-dev' to tradeServer.
"

Error in sample / template Azure Bot Framework solution 'EchoBot' without having modified any code

I have downloaded the Azure 'EchoBot' sample from Azure, using Azure Portal > Create Resource > Web App Bot > V4 Framework > Echo Bot.
I downloaded the resulting scaffolding code, and it seems to have an error already in the sample? I can't fix it myself, because I don't really understand the structure of the code yet. This was to be my learning exercise. It appears to be an error in the dependency injection during startup? I have updated all nuget packages and confirmed that other examples/samples on the net have this same code? (Replacing 'EchoBot' with the name of their solution). Can anyone assist? I can't even build and run the sample with this issue/error.
Try EchoBot.Echobot. The error message is telling you that it cannot resolve because you are using a namespace instead of a type. You have two options here:
1) The dirty way - replace EchoBot with EchoBot.EchoBot. The first EchoBot being the namespace, and the second being the class inside that namespace.
2) The nicer way - add using EchoBot = EchoBot.EchoBot; at the top of your Startup.cs file.
The explanation being that the EchoBot class declaration is inside the EchoBot namespace - see the EchoBot.cs file and you will see namespace EchoBot near the top.

Xamarin.UITesting NU1201 Error: Android 8.1 Is incompatible with .NETFramework 4.6.1

Have been having a little issue for the last couple of days now where I will create a new Xamarin Forms project on Visual Studio 2017 and add a Xamarin.UITest Cross-Platform Test Project for unit testing I recieve a series of NU1201 Errors when I reference the .Android App in the UITest Project.
Here is the exact error i get:
Error NU1201 Project App1.Android is not compatible with net461 (.NETFramework,Version=v4.6.1) / win-x64. Project App1.Android supports: monoandroid81 (MonoAndroid,Version=v8.1)
I have played around with the Android version numbers to see if the UITesting package doesnt support the latest android but no matter what version of android i target the problem remains the same.
Here is a screenshot of the project.
All the code is unchanged from the default project and runs in the simulator fine but only produces these errors when the Android app is referenced to the UITest project.
Solved it after many more hours of testing and trialling. Instead of adding the Android project to the references, Within the AppInitializer I added another method to the StartApp() call like so:
public class AppInitializer
{
public static IApp StartApp(Platform platform)
{
if (platform == Platform.Android)
{
return ConfigureApp.Android.InstalledApp("com.companyname.App1").StartApp();
}
return ConfigureApp.iOS.StartApp();
}
}
Therefore once I had already run the app via the emulator for the first time and installed on the device, the UITest simply uses the installed APK on the emulator instead of the project.
For those who ran into error NU1201, you might have come to the right place. This may not apply to the question asked but I ran into error NU1201 the other day and the reason for that is the nuproj configuration file for our nuget project has target configuration wrong. It should have been
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
instead of
<TargetFramework>net462</TargetFramework>
because the project is not of "SDK-style."
References: https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild-target-framework-and-target-platform?view=vs-2019

How to use iOS simulator/Android simulator from visual studio for Mac with xamarian.forms

I made mobile app at azure and quickstarted it as xamarian.forms and (after failing to publish downloaded table api application and deciding to edit it in browser) downloaded the client application they provided. Then when I tried to launch it with on (Debug>IPhone 8 Plus iOS 11.2) simulator, it (simulator) started but no application is visible (and nothing unusual is installed).
It shows warnings (could it be relevant?):
Warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see http://go.microsoft.com/fwlink/?LinkId=294190. (MSB3276)
(For Android simulator it gives some error like:
/Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/xbuild/Microsoft/NuGet/Microsoft.NuGet.targets(5,5): Error: Your project is not referencing the "MonoAndroid,Version=v8.0" framework. Add a reference to "MonoAndroid,Version=v8.0" in the "frameworks" section of your project.json, and then re-run NuGet restore.
)
How can I see the ****** application?
Thank you. =)
Open the project.json file in your xxx.Droid project. Change the MonoAndroid version from:
"frameworks": {
"MonoAndroid,Version=v7.1": {}
}
to:
"frameworks": {
"MonoAndroid,Version=v8.0": {}
}
Now, Restore Nuget Packages for your solution.

Building MacOS 10.8 source code on 10.6

I am trying to build SparkleShare on Mac.
I have Mac OS 10.6
SparkleShare claims to run on Snow Leopard (10.6) or later
SparkleShare contains calls to NSUserNotification, a class which is Available in OS X v10.8 and later
Monodevelop throws an error:
error CS0246: The type or namespace name `NSUserNotification' could not be found. Are you missing a using directive or an assembly reference?
In Monodevelop, when I begin typing MonoMac.Foundation.NSUser, the only suggested item is NSUserDefaults, NSUserNotification is not suggested.
Is this kind of cross-compilation possible?
I can't upgrade to 10.8 because I also want to check how the user experience is on 10.6.
Run:
git clone https://github.com/mono/monomac
git clone https://github.com/mono/maccore
cd monomac
make
It should generate MonoMac.dll. Copy it to wherever your MonoMac.dll is, restart Monodevelop, the project should now build fine.
I just had a look at MonoMac's source code, and NSUserNotification is a recent addition, it has been added three months ago: https://github.com/mono/monomac/commit/2c4a8c639254705e0dde1ce32f4e49cfcb72187e.
These are the generated files:
NSUserNotification.g.cs
NSUserNotificationCenter.g.cs
NSUserNotificationActivationType
NSUserNotificationCenterDelegate.g.cs
As a workaround for older MonoMac versions, you can simply copy these into your code.

Categories