VS2015 .net framework versions are not listed while creating new project - visual-studio

After installing vs2015 with updates on window10, I am not able to select targeting .net framework versions although they are installed and listed on programs and features. .net framework versions are not listing on Create new project window.
I am not able to understand the problem over here. It was working fine previously. Tried to reinstall the vs2015 still same issue. Please need help to solve the issue.
Installed framework versions:
Installed framework versions
Framework versions are not available on create new project window.
framework versions are not available
Thank you.

Related

Is it safe to target the Bot Framework SDK to .NET 5?

We've recently started a project with the Virtual Assistant Template 1.0.1, and I wonder if it is safe to target the solution to net5.0 since we have some libraries that use this latest .NET GA release.
Currently, the VA template references the Bot Framework SDK 4.9.3. Any requirements on the SDK version?
I've done a couple of tests to confirm. The project compiles, and I can't see any errors. However, I'm looking for some confirmation from the community.
There are no obvious problems with targeting .NET 5. But if you'd like to be safe, you should go with the version the samples are using:
<TargetFramework>netcoreapp3.1</TargetFramework>

Data Annotation not found in .NET Standard Library in Mac Visual Studio(Community Version 2017)

I am working on a Xamarin.Forms application. Every thing was compiling and running before but then another developer who works on Visual Studio Windows version added DataAnnotation to project for validation. Since then I am getting compile time error that DataAnnotation is not found. I created a new MVC web project just to check if DataAnnotation is available for Visual Studio Community Version for MAC. It was available and is working for web projects. I have check my library versions and every thing is up to date.
Long story short; how can I add DataAnnotation for PCL projects in Visual Studio Community on Mac?
Following are the screenshots to give a better understanding of my question.
This screen shots shows that DataAnnotation is working on MAC if I create a new .NET Core MVC Project
DLL is present in .NET standard library for Windows and working just fine
But on MAC machine it gives the following errors
Use netstandard2.0 it's work. I Create a PCL Project with annotations change and change this.

Using EF7 SQLite on Android 7+

In my project, I am using the Microsoft.EntityFrameworkCore.SQLite package from NuGet. But for Android 7+, the app crashes with unauthorized access to "/system/lib64/libsqlite.so".
This is because Android 7 doesn't allow native libraries other than the ones in their NDK (as far as I understood). Also see this issue: https://github.com/aspnet/EntityFramework/issues/7777.
So, I researched the internet for about 2 days now and unsuccessfully tried a bunch of things to get EFCore to work on Android 7. One of them was to update to the preview version v2.0.0-preview1-final. But this resulted in other problems like the following where the app compiled, but crashed while deploying/starting on the emulator:
06-21 09:58:18.970 D/Mono ( 3632): Assembly Loader probing location: 'System.Runtime.CompilerServices.Unsafe'.
06-21 09:58:18.970 F/monodroid-assembly( 3632): Could not load assembly 'System.Runtime.CompilerServices.Unsafe' during startup registration.
06-21 09:58:18.970 F/monodroid-assembly( 3632): This might be due to an invalid debug installation.
I then tried to add the 'System.Runtime.CompilerServices.Unsafe' NuGet package manually to my project, but it didnt fix the problem.
I messed around a lot, trying different build parameters and such and actually got the app running with the preview package of EFCore on an Android 7 emulator. However, after a project clean and rebuild, the error showed up again.
Any help on how to get EFCore Sqlite to work on Android 7?
I am using Visual Studio 2017 with Xamarin.Android 7.3.1.2
I created an example project in order to reproduce the issue: https://github.com/tipa/EFCoreSample - Basically just started with the basic Android template from VS and added the Nuget package
I know this was asked more than two months ago and you've probably found the solution, but I've wanted to post how we've managed to get around this issue.
We are developing a Xamarin.Forms application with EntityFrameworkCore and SQLite. Due to project and company policies, we are restricted to using .NetStandard 1.6 (we migrated our PCL projects from .NetFramework to .NetStandard in order to integrate EntityFrameworkCore).
After this issue started happening to us, we managed to fix this by doing the following:
Updating "Microsoft.EntityFrameworkCore" and "Microsoft.EntityFrameworkCore.SQLite" from version "1.1.1" to "2.0.0-preview1-final" (this is the latest version that works with .NetStandard 1.6) in the DAL project (we have a separate PCL project that contains the Context, UoW, Repositories and Models)
Updating just "Microsoft.Data.Sqlite" (this automatically updates the needed dependencies) from version "1.1.1" to "2.0.0-preview1-final" in the main Xamarin.Forms Android project
EntityFrameworkCore versions 2.x.x use the Android 7+ "approved" way of accessing the "libsqlite.so" file, while versions 1.x.x do not.
Hope this is of help to anyone who might use similar packages that we had.
I had the same issue and I found a solution to this problem.
I'm using Xamarin.Forms applications with .Net Standard 2.0 libs and using EFCore with SQLite. All you have to do is edit your Android csproj and add this after the last PropertyGroup tag:
<PropertyGroup>
<NoWarn>$(NoWarn);NU1605</NoWarn>
</PropertyGroup>
And then add the reference for System.Runtime.CompilerServices.Unsafe in csproj:
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.3.0" />
Clean and Rebuild your Android Project.
I found the answer to the problem here: https://developercommunity.visualstudio.com/content/problem/152947/xamarin-android-run-error-could-not-load-assembly.html

Xamarin: Unable to add HotTuna.StarterPack

I am trying to install the MVVMCross.HotTuna.StarterPack on my Xamarin (Mac) Solution using the NuGet, but i ain't successful. The package was installed in the Xamarin.Android project successfully but while i try the same to do with the iOS and PCL project, it doesn't add. Any Idea on whats going wrong? Thanks!
That nuget package requires nuget 2.5 which isn't yet finished/released for Xamarin Studio - track https://github.com/mrward/monodevelop-nuget-addin/issues/13 for updates
It will also probably require fixes from Xamarin - they've not yet released PCL support, but it is in development. You can ask their forum and/or support for updates on this.
In the meantime:
you can develop for MvvmCross using VS on the PC - see http://mvvmcross.wordpress.com/
you can develop using binaries (not nuget) on the Mac - see http://slodge.blogspot.com/2013/05/xamarin-studio-quick-run-through-for.html
For Xamarin.Mac/MonoMac support, there's no PCL support currently available - so the only way to get this working currently is to fork the MvvmCross solution and to compile the PCL libraries for the appropriate Mac project. For more on current .Mac issues, track and/or contribute to: http://forums.xamarin.com/discussion/3733/playing-with-pcls

How can I change the targeted framework from 4.0 to 4.0.3

I have the Portable Library Tools beta 2 installed in Visual Studio 2010. I created a new library and set it to be compatible with .Net 4.0.3 and Silverlight 5. I then tried to add a reference to the PCL project from a Silverlight Web project. I got the message:
Unable to add a reference to project "PortableClassLibrary". The
current project's target framework is not one of or compatible with
the target frameworks of Portable Library project
"PortableClassLibrary".
A Portable Library project's target frameworks can be changed via the
Library tab in the project's properties.
I don't want to change the PCL target, I want to change the target of the Web project. I went the the Properties > Application tab and the Target framework is ".Net Framework 4.0". There wasn't an option for 4.0.3. I checked and realised that the update for 4.0.3 (KB2600211) wasn't installed on this machine, so I installed it and rebooted, as requested.
There still isn't a 4.0.3 option in VS and I'm still getting the message. Any ideas?
EDIT
VS 2010 SP1 is already installed.
To target .NET Framework 4.0.3, you need to install KB2600214, and then change the Project Properties -> Application -> Target Framework to .NET Framework 4.0.3.
You may have to consult this page on Microsoft's site. It offers a few workarounds for these Targeted Framework errors. Personally, I ended up manually modifying this line in my csproj file:
<TargetFrameworkVersion>v4.0.3</TargetFrameworkVersion>

Resources