Json.Net NuGet (NuPack) Package Reference unable to find assembly compatible with target framework - visual-studio-2010

I am getting an error when trying to add the Json.net package reference through the NuGet / NuPack Add Package Reference Dialog. The error I get is:
Unable to find assembly references that are compatible with the target framework 'Silverlight,Version=4.0,Profile=WindowsPhone'
I have the latest version of both the Windows Phone 7 SDK and the Package Manager tools installed. This is running in Visual Studio 2010.
Has anyone else run into this error?

According to James Newton-King (author of Json.NET), you can use the Silverlight 3.0 version.
http://json.codeplex.com/Thread/View.aspx?ThreadId=226910
Unfortunately the NuGet package doesn't properly indicate Windows Phone 7 support. So you'll have to add the reference the old-fashioned way. (e.g. Copy the assembly into a directory such as ~\lib\Json.NET - where ~ is your solution root - and Project... Add Reference...)

Related

What should I do about unstable packages in Visual Studio 2017, error: was restored using '.NETFramework,Version=v4.6.1' instead of target framework

I'm using Visual Studio to make an app. It works on Android and I'm trying to get it to work on iOS, but I need to resolve this unstable package in my dependencies.
Any advice about what I should do?
Error Message:
Package 'OxyPlot.Xamarin.Forms 1.1.0-unstable0011' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework'.NETStandard,Version=v2.0'. This package may not be fully compatible with your project.
That's a warning message, not an error message, and this is by design.
Please refer to https://learn.microsoft.com/en-us/nuget/reference/target-frameworks for target framework information.
.NET Standard 2.0 and .NET 4.6.1 have a huge surface area overlap.
For this Visual Studio and NuGet have added the concept of a fallback framework, where when a user tries to install a .NET Standard package in a .NET Framework project, it will allow the installation but warn the user that it's not 100% compatible and that there may be certain cases in which this does not work.
Related
https://github.com/NuGet/Home/issues/5192
https://github.com/NuGet/Home/wiki/Enable-.NET-Core-2.0-projects-to-work-with-.NET-Framework-4.6.1-compatible-packages

Windows RT 8.1 Sharpdevelop Issue (MSB3644) (MSB3248)

I've signed the Windows RT Desktop version of Sharpdevelop, but I continuously get this error
Build started.
Warning MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.0" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.
Error MSB3248: Parameter "SearchPaths" has invalid value "{CandidateAssemblyFiles}%3b
%3b
{HintPathFromItem}%3b
{TargetFrameworkDirectory}%3b
{Registry:Software\Microsoft\.NETFramework,v4.0,AssemblyFoldersEx}%3b
%3b
{GAC}%3b
{RawFileName}%3b
bin\Release\System.winmd". Illegal characters in path.
Build failed. (00:00:01.5781253)
All I need to do is get the exe compiled. I can sign it separately.

What is the aspnet50 target framework, and can I reference it from VS2013?

The packages at https://www.myget.org/gallery/aspnetrelease target aspnet50, and when I try to install them I get:
You are trying to install this package into a project that targets
'.NETFramework,Version=v4.5', but the package does not contain any
assembly references or content files that are compatible with that
framework.
Is there a way?
You can't do that (currently). If you insist on working with ASP.NET vNext in VS2013, you can use it as an editor and run everything from the commandline with the tools from the aspnet Home repository.
You should install the newest CTP of VS14 if you want to work with asp.net vNext, which you can download the newest version of from here and learn how to use it in this guide. ASP.NET vNext is in alpha currently, so documentation and information can be a bit sparse. aspnet50 is the (current) name for the new .Net framework introduced with ASP.NET vNext.
I was able to manually download the nuget packages and had no problem referencing from VS 2013.

Does DotNetOpenAuth support Windows Phone projects?

I get this error:
Could not install package 'DotNetOpenAuth.Core 4.1.0.12182'. You are trying to install this package into a project that target
s 'Silverlight,Version=v4.0,Profile=WindowsPhone71', but the package does not contain any assembly references that are compatible with that fram
ework. For more information, contact the package author.
I know what the error message says, but it makes no sence - only if this aint suppose to work on Windows Phone at all. I've tried with a WP7 7.0 project but same result...
DotNetOpenAuth does not currently support Windows Phone.

linqToTwitter and Windows Phone projects

I created a new Windows Phone application and added the linqToTwitter package. This added a reference to LinqToTwitterAg but I cannot start using TwitterContext or anything like that and cannot add 'using LinqToTwitterAg' or 'using LinqToTwitter'. Does LinqToTwitter not play well with Windows Phone applications?
When I tried to install the LinqToTwitter package via NuGet, I got the following error:
Successfully installed 'LinqToTwitter 2.0.21'.
Successfully uninstalled 'LinqToTwitter 2.0.21'.
Install failed. Rolling back...
Could not install package 'LinqToTwitter 2.0.21'.
You are trying to install this package into a project that targets
Silverlight,Version=v4.0,Profile=WindowsPhone71', but the package
does not contain any assembly references that are compatible with that
framework. For more information, contact the package author.
My suggestion would be to reach out to the package author and see if he can create a pacakge for you that is compatible with the Windows Phone 7.1 framework, or get the source yourself and try compliing it into your solution.

Resources