Adding references when using in MonoDevelop when using MonoDroid - monodevelop

I have only just started experimenting with MonoDroid and this is my first time using Mono and MonoDevelop. I wanted to do some Json stuff and added a reference to ServiceStack.Text library. However, the namespaces in the newly added assembly references are not available in the intellisense until I restart MonoDevelop. Has anyone else encountered this? I can't quite tell if this is a MonoDevelop issue or something more specific to the MonoDroid/MonoDevelop combination.

I think it is related to Mono for Android somehow. I tired recreating your test case, which seemed as you described with a Mono for Android project. Creating a similar project just for MonoTouch, it loads the IntelliSense immediately not having to restart MonoDevelop. I suggest you file a bug in their BugZilla: https://bugzilla.xamarin.com/index.cgi

Related

How to reference a DotnetStandard 2.0 library from another DotnetStandard library?

I have started a project to move some framework libraries targeting Dotnet 4.6.1 to DotnetStandard. I am using VS2017. I started with a relatively simple library which did not have any nuget references and only couple of classes. The approach I took was,
Create a new DotnetStandard 2.0 library project. Just to make sure I have a clean slate instead of manipulating the csproj file of the existing project.
Copy the code files from the old to the new project
Make any code changes required to make the new project build
This worked pretty smoothly. Now, I started with a second library that referenced the first one. I followed the same steps as mentioned above. At Step 3, however, I am hitting roadblock. I am unable to get the namespaces exposed by the first library in the second library, whatever I do. I have tried these,
Referenced the First project from the second project as Project Reference
Created a nuget package for the first project, hosted it in a local folder and installed the package in second project.
Both ways, I am unable to get the namespaces and classes from the first project.
What am I doing wrong?
UPDATE
I tried creating a dummy solution and tried creating two Dotnetstandard projects there. Project referencing worked fine there. So, to experiment, in my actual solution, I deleted the second project and created again. That somehow resolved my issue and I am able to successfully add nuget as well as project references now. Not sure what the problem was earlier.

"One or more projects are incompatible with UAP,Version=v10.0" Issue [UWP]

I've been developing UWP app until I got this error (picture below). I've searched for solution but I couldn't find anything. It doesn't even say which package is the incompatible. How can I find the incompatible package in my solution? Also is there any way to re-create project.json by automatically? I ask it because I changed something on project.json and broke it more.
Also I'm using VS2017 and I'm able to run project without issue. I just can't update package.
Thanks.
(github link for project if you want to look at it.)
I used your GitHub https://github.com/almorax/dota2-handbook-uwp project to troubleshoot the problem and looks like the problem is with the way the nuget package is referred in "Dota2Handbook" project. In other projects, you have used "PackageReference" way to refer the nuget package however in "Dota2Handbook" project you are using project.json to refer nuget package. When I changed "Dota2Handbook" project to use the "PackageReference" way then I was able to get the latest package.
Note: You will notice that "Dota2Handbook.Infrastructure" project already use the new way to refer Nuget packages
More details on PackageReference : https://learn.microsoft.com/en-us/nuget/consume-packages/package-references-in-project-files
What happened to me is that I have UWP projects that were made in VS 2015 and initially targeting Windows 10 RTM. These projects where updated to VS 2017 and to target Creator's Update. All worked fine, and all projects still used the original project.json style.
Then I tried to create a new Windows Runtime Component project and target Creator's Update initially. Targeting Creator's Update in VS 2017 causes the project to use the new PackageReferences project style. This produced the errors shown in the above question when I referenced the WinRT component from the UWP app.
Rather than converting the all of my legacy UWP project files to use the new format, I target the new UWP or WinRT Component library to Anniversary Edition (which uses the older project.json project style), then retarget to Creator's Update.
Of course, at some point updating the project file may be appropriate, just know that it will no longer be supported by VS 2015. Conversion steps are illustrated here.

Why don't FastInject tags work in my Flex/Air Parsley project when build in release mode?

I've got a project that I am working on that works fine when debugging from IntelliJ but when I do a release build (still in IntelliJ) and install the .air fil to my computer none of the FastInject tags seem to work.
I thought that this might be due to the include-as3-metadata issue but that does not seem to be the case. I have included all the metadata tags that I think I have used.
I have spent some time investigating this and have not made much progress other than getting frustrated!
I created a view that displays the logs created by spicefactory - but this seemed to fix the issue!
I tested to see if I could inject and of classes that are expected to be FastInjected, this also fixed the issue.
It seems that if I add any logging related code to the application the FastInject tags start working.
In fact, I have created a release air file here. If I install this on a computer with Flash debugging turned on the application doesn't work. If I follow the steps here to debug an installed Air application - it starts to work!
If anyone else can confirm this behavior I would appreciate it.
It turns out that this was simply a race condition causing an error in context creation that was not displayed in a non-debug player.
This exception never happened while I was developing the application and any changes to the application to add logging changed the initialisation order of the context and caused the issue.

How to install JSON for Visual Studio 2013?

I Installed the Nuget Package Installer thing, and it says it installed it.
However I can't find any references to JSON in Visual Studio.
I tried using System.JSON but I can't find it.
How can I use it?
Thanks
I have had been through the same trouble today, when I almost completed my Software Project and just had to use the File to use its contents to change the content of the Project.
For that I wanted to use JsonObject class to get the contents of the .json file. When I tried to write this
using System.Json;
It gave me the exact same error that you might have been going through. It asked for the Assembly files and DLLs.
I kept searching and I stumbled upon to this post, which was totally unhelpfull for me. So I searched and got what I was looking for. After that, I wanted to share that triumph with you people too so that next visitor must have an answer to his trouble on Stack Overflow.
Solution
What I did was, I went to the NuGet website for the System.Json extension package.
http://www.nuget.org/packages/System.Json
There, I capture the command for the installation.
I just click on the Tools --> NuGet package manager --> Package Manager Console and it gave me a new window in the bottom part of Visual Studio 2013.
There I typed (pasted) the link of command I copied. It started and installed the package for me. And now I can use it!
Further answer
I was told that it is a part of .NET v4.5, but I even have the v4.5.1 and still I don't get it why I don't have that package, maybe because on the Web page of the package it is shown deprecated. But still who ever needs it, can have the answer I have posted and it would help him out!
Good luck!
I think you can use the Newtonsoft JSON.NET package.
http://www.nuget.org/packages/newtonsoft.json/
I was also looking for a way to do JSON in C# and saw that they made it easier with .NET 4.5, couldn't do it and found this stack overflow question. I wasn't really satisfied with Afzaal Ahmad Zeeshan's answer so I kept searching and found this which I guess isn't depreciated and worked for me.
Steps in plain English (for .NET 4.5):
1.Add Reference to System.Runtime.Serialization
2.Add "using System.Runtime.Serialization.Json;" to your class
3.call "JsonReaderWriterFactory.CreateJsonReader()" or whatever methods you need to use to read/write json
Install latest VS 2017
Install-Package System.Runtime.Serialization.Json -Version 4.3.0
-- in PM console

Does mvvmcross support windows phone 8?

I'm working my way through the MMVMCross Tip Calculator tutorial.
Got an Android instance up and running and have now turned my attention to Windows Phone 8.
So far, I can't find the Cirrious.MvvmCross.Plugins.Json assembly in the WindowsPhone bin folder, and I'm also having issues with the CreateApp() method not being able to resolve the Core.App class (there are a bunch of suggestions for chasing down the Core namespace but none of them have an App class inside that I can see).
When I comb through the docs it seems WP7 is supported explicitly, but no mention of 8. Anybody have any luck getting this scenario going? Is there a hack I'm missing?
After installing the Nuget package (The HotTuna Startup) in an Andriod project, I was unable to build and was getting the same problem in the CreateApp() where Core is not resolved. I had missed adding the package MVVMCross.Core and MvvmCross - Hot Tuna Libraries (which added the app.cs) to my core PCL library. Those Nuget packages are a great way to get started!
It's obvious now, but maybe this will help someone else.
Yes, Windows Phone 8 is supported, but there's no specific extensions for WP8 yet (e.g. we still use the Community C# SQLite code)
The Core.App class should be in your Core/application project. e.g. in the tutorial it's in https://github.com/slodge/MvvmCross/tree/vnext/Sample%20-%20Tutorial/Tutorial/Tutorial.Core