MvvmCross iOS dependency for .Net 3.5? - ios

I am trying to determine/understand if I need to reference the .Net 3.5 library in Xamarin for iOS projects.
Each time I open up a solution that contains a MonoTouch project for iOS I am prompted to include the .NET Framework 3.5. I would prefer not to intall this if possible. I can see that some of the Cirrious.MvvmCross dlls such as Cirrious.MvvmCross.Binding.Touch are dependent upon Runtime Version of v2.0.50727 - and I guess this is why it is probably prompting me. However, I can quite happily ignore the reference and it will work.
I would like to know what I can't do if I don't include the .Net 3.5 (2.n etc) so that I can safely ignore the dependency.
Secondly - if I can ignore this dependency - how do I go about this?
Thanks
Alan.

Related

Can i edit a .NET 6 Console C# project in .NET 4.7.2?

I used to program in .NET 4.7.2 (and still do), but my High School uses .NET 6
Currently we have started using C# console in .NET 6
I don't want to update to .NET 6 because i would also have to change my Unity editor version to one that supports VS2022
Is it possible to open .NET 6 projects in .NET 4.7.2, or am i gonna have to update Unity and reinstall VS, while scouring every part of my C:// partition to clean up junk/leftovers? I am very tight on free space especially on C://
No, you can't (if you mean anything more then editing text, cause for this you can use even notepad). But depending on language features used potentially you can copy-paste code into a .NET Framework 4.7.2 project and compile it. Or not, cause at least some newer features are not supported by older framework version.
Also you don't need full blown VS upgrade. You can look into installing just the .NET 6 SDK and VS Code (which requires less space compared to VS 2022).
Though I hugely recommend to extend your disk.

F# .NET Standard Library Project

I have a Xamarin Forms solution, containing several F# portable class libraries.
In order to use the latest version (4.0.0) of Microsoft.Azure.MobileClient, I need to upgrade to FSharp.Core 4.2.1, but this appears to be incompatible with Profile 78:
Could not install package 'FSharp.Core 4.2.1'. You are trying to
install this package into a project that targets
'.NETPortable,Version=v4.5,Profile=Profile78', but the package does
not contain any assembly references or content files that are
compatible with that framework. For more information, contact the
package author.
It is possible to use .NET Standard class libraries from Xamarin projects, but is it possible to create a .NET Standard class library in F#?
What is the best way forward here?
What the error message is telling you is that the project is targeting a PCL target. FSharp.Core 4.2.x does not have a PCL target anymore, and only contains .NET Framework and .NET Standard 1.6 binaries. Neither is compatible with the PCL target F# is using here.
The release notes for FSharp.Core were recently updated with developer guidance: https://www.nuget.org/packages/FSharp.Core/
This is the important bit for your project:
For existing packages targeting .NET Frameworks 4.0 or lower and PCLs, use FSharp.Core 4.1 or lower.
.NET Standard (as of this time) has not proliferated across all things .NET yet. As #Foole says, you can indeed create a .NET Standard class library with F# today. But it's not compatible with the rest of the .NET ecosystem until .NET Standard is fully supported on all flavors of .NET.
You can try to convert your Xamarin.Forms (and your F#) project from .NET Portable to .NET Standard 2.0, since both packages can be added to .NET Standard.
How to convert Xamarin.Forms to .NET Standard
Create new Xamarin.Forms project (skip for already created project)
Create new .NET Standard library project in the same solution
Add reference to Xamarin.Forms package
Copy your content from Xamarin.Forms shared project to the new library project
Change all references (from Android, iOS, UWP) to point to the library project instead of the shared project
Source: Xamarin Blog

MvcSiteMapProvider.dll not working in Visual Studio 2013

I have a MVC 2 project created in Visual Studio 2010 that use MvcSiteMapProvider.dll and works fine. But when loading the project in Visual Studio 2013, everything else work fine except it crashes at
Html.MvcSiteMap().SiteMapPath
The error message is
An exception of type 'MvcSiteMapProvider.MvcSiteMapException' occurred in MvcSiteMapProvider.dll but was not handled in user code
I believe that MvcSiteMapProvider.dll cannot be loaded correctly. I need help on this. Thanks.
Note that there is a separate DLL for each .NET framework version, and I suspect you are targeting the wrong framework. This can happen if you install MvcSiteMapProvider into your project and then change it to a different .NET framework version.
NuGet does not automatically upgrade/downgrade packages to the currently set framework version. This step must be done manually. The best way is to completely uninstall and reinstall the package as per this document. Also be sure to read this before attempting it.
But do note that if you do this NuGet will not remove any files you have changed (like Mvc.sitemap) and then prompt you whether to overwrite them. You should normally say no to each prompt to ensure your custom configuration is not overwritten.
Also note that it is not sufficient to use Assembly Binding Redirection with MvcSiteMapProvider because with each .NET framework version we create a separate build (DLL) that takes advantage of features that are not present in prior versions.

Update to Xamarin touch 8.2 and use mvvmcross

We are using xamarin and mvvmcross with great plesure normmally.
However I updated our project to the newest Xamarin.Ios 8.2, changed the reference from monotouch to Xamarin.Ios updated all our nuget packages (only mvvmcross packages) and then sh.. hit the fan.
1000 errors :P I got ridth of them all, however everytime I am using a component from mvvmcross it want me to reference 'module monotouch should be referenced.
Any suggestion for what I am needing to get my project to build again.
Regards
Xamarin's advice on the unified API is http://blog.xamarin.com/is-the-ios-unified-api-for-me/
Unfortunately, existing Xamarin.iOS components need to be re-built against the Unified API, so while we (and the community) are working to update the component code, you will not be able to include these in your app. A workaround for open-source projects is to download and compile the code yourself as part of your Unified API project.
#lothrop is doing a superb job leading the Unified API development for MvvmCross
You can see the progress, build it and contribute to it on https://github.com/MvvmCross/MvvmCross/pull/813 (and see a discussion on https://github.com/MvvmCross/MvvmCross/issues/801)
Currently I believe the progress is pretty good - it's working - but we have some VisualStudio Xamarin blockers which are preventing this being pushed to release.
Getting more dev effort on this - more input to https://github.com/MvvmCross/MvvmCross/pull/813 and https://github.com/MvvmCross/MvvmCross/issues/801 - would certainly be appreciated. e.g. the community can help by building and using #lothrop's code - does it work for them?

Wrapping up Asp.net Framework 4.0 in 3.5

I am working on an application in VS 2010 and using Asp.net framework 4.0 which i just migrated from Framework 3.5. The reason i had to migrate it to 4.0 is, i have a third party toolkit dll which is built in Framework 4.0, so in order to include it i had to change target framework of this project to 4.0. As, this project is being referred from other projects ans so on.., i end up converting whole application to framework 4.0. Every thing worked okay but as the application is using spring.net also, after successfully building the application, i found broken controls on almost all the pages. i am getting java script errors (about undefined control)for usercontrol PopupDatePickerControl we are using in the application. i downloaded and included latest version of Spring.net. i have no idea what is causing this problem. Please help if any one has experience working with this combination of framework 4.0 and spring.net? OR there is any way out to wrap up Framework 4.0 into 3.5. so i don't have to do this Migration.
Thanks!
Sounds like a shot in the dark on so many levels. It's probably not the combination of 4.0 and Spring.NET, unless you aren't referencing the correct Spring.NET dlls. Can you post parts of your IoC configuration and a rough outline of your app's architecture?
Also, what is the other third party toolkit you mentioned?

Resources