Updating postsharp form 4.x to 5.x - postsharp

I try to upgrade postsharp 4.0.30319 to 5.
When i try Project - Nuget Packages - Update PostSharp - Update all Packages the following happens:
First a list of installation appears
...
"PostSharp.Patterns.Diagnostics 5.0.31" was installes succesfully.
then
Install failed. Rolling back...
Fehler beim Update von "PostSharp 4.3.33" auf "PostSharp 5.0.31". Es wurde keine Version von "PostSharp.Patterns.Diagnostics" gefunden, die mit "PostSharp 5.0.31" kompatibel ist.
So it seems that first an update of the packages is installed, and then afterwards it is said that the package is not found.
I have no clue how to solve this issue.

Based on the reported error it looks as if the Diagnostics 5.0.31 package was not available on NuGet. The package is currently available, so this could've been a temporary error.
Please also note that Diagnostics in PostSharp 5.0 is a complete re-write that is not backward compatible with 4.3 version. You can follow a documentation page about the upgrade process from 4.3 to 5.0: http://doc.postsharp.net/logging-upgrade

Related

Why can't I install Microsoft.EntityFrameworkCore.Sqlite?

I am following this tutorial:
https://learn.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=visual-studio
I am immediately stopped because I can not complete the following command:
Install-Package Microsoft.EntityFrameworkCore.Sqlite
This is the error:
Could not install package 'Microsoft.EntityFrameworkCore.Sqlite.Core 7.0.0'. You are trying to install a package into a project that targets '.NETFramework,Version=v4.7.2', 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.
I am attempting to learn how to use the Entity Framework and so I don't know much regarding this. Any advice would be helpful even if it's a link to something I need to read.
About the tutorial
The tutorial is about .netCore but in the error message you can see that you created a .netFramework project '.NETFramework,Version=v4.7.2'.
Create a new console application, but don't select projects that have (.NET Framework) in the description.
About the Sqlite package (only if continue the practicing with .netFramework)
The command Install-Package Microsoft.EntityFrameworkCore.Sqlite will try to install the last version. Currently, the last version is 7.0.0. This version only work with .NET 6.0.
You can check existing .net versions right here
So, you need to specify the version. The version for .NET 4.7.2 is the 3.1.31.
Install-Package Microsoft.EntityFrameworkCore.Sqlite -Version 3.1.31
Nuget Sqlite package info here

There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'ios-arm64'

I was using VS Enterprise 17.3 preview 1 but my trial was expiring so I download and installed VS Community 17.3 preview 1. I open my MAUI project and build and I get this error;
There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'maccatalyst-x64
I assume I must've missed something in the installation so I go back but all the relevant components are installed
I double check with the Enterprise installation and they match. I then go back to opening the project in VS Enterprise and now I get the same error there too!?
I've tried deleting bin/obj folders cleaning and rebuilding;
I've tried adding this to the .csproj
<GenerateErrorForMissingTargetingPacks>false</GenerateErrorForMissingTargetingPacks>
I've tried changing the TargetFrameworks from this:
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
To this (and a few other combinations):
<TargetFrameworks>net6.0-android;</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
So I'm now stuck unable to build :( help pls
Turns out I had an error in a blazor file that the compiler wasn't referencing. The 'no runtime pack' error was a red herring and unrelated to the actual error.

Cordova app for Windows, NuGet fails to get correct version of System.Collections.Specialized

I'm tearing my hair out trying to build a windows app using Cordova. The build error I'm getting is:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\
MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(377, 5):
error : The package System.Collections.Specialized with version 4.0.0
could not be found in C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\.
Run a NuGet package restore to download the package.
[C:\cygwin64\home\Owner\src\apps\mytestapp-
gen\platforms\windows\CordovaApp.Windows10.jsproj]
In visual studio, I attempt to add the version of the package to the project and I get the following error:
Severity Code Description Project File Line Suppression State
Error Could not install package 'System.Collections.Specialized
4.0.0'. You are trying to install this package into a project that targets
'native,Version=v0.0', 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.
Can anyone advise how to resolve this?
I've looked at this very old question How can I make my managed NuGet package support C++/CLI projects? but I can't find anything (particually from the VS2017 era) that helps
May be, this helps others to solve the issue:
My Visual Studio 2017 installation must obviously have been damaged when removing the Visual Studio 2015 installation from that same machine. After I performed a repair of Visual Studio 2017 via Visual Studio Installer the isuue disappeared.

UWP Deployment Microsoft.NET.Native.Runtime.1.7 not found error

I have recently installed a few updates to windows / visual studio 2017, and now when I create a package of my UWP app and try deploying it to any of the machine where it used to work just fine - installation fails and there is this error message in windows error log:
AppX Deployment operation failed for package 92211ab1-5481-4a1a-9111-a3dd87b81b72_1.0.26.0_neutral_~_n78qa84z3g9aj with error 0x80073CF3. The specific error text for this failure is: Windows cannot install package 92211ab1-5481-4a1a-9111-a3dd87b81b72_1.0.26.0_x86__n78qa84z3g9aj because this package depends on a framework that could not be found. Provide the framework "Microsoft.NET.Native.Runtime.1.7" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and minimum version 1.7.25531.0, along with this package to install. The frameworks with name "Microsoft.NET.Native.Runtime.1.7" currently installed are: {}
I can not find any reference on the web for this package.
The package installs just fine on the developement machine.
Any help would be greatly appreciated.
EDIT 1:
Screenshot of my dependencies folder below:
UWP Deployment Microsoft.NET.Native.Runtime.1.7 not found
The problem is that there is no Microsoft.NET.Native.Runtime.1.7 dependence in current OS system. And you could install Microsoft.NET.Native.Runtime.1.7 dependence manually.
The Microsoft.NET.Native.Runtime.1.7 dependence will be stored in the Dependencies folder where under the appx folder.
Update1
I have checked your screenshot. It seems that you generate your package in debug mode and I can reproduce the same dependency in this way. The .NET Native tool chain is checked by default in the release mode. So you could regenerate your package in release mode to get files above.
Looks like these dependencies only appear on a Release build, and not in Debug.

Cannot install FsLab with NuGet

Complete VS noob. Fresh install of Visual Studio Community 2015. New project. Trying to install FsLab with NuGet ends with this error:
Unable to find a version of 'Deedle' that is compatible with 'FsLab 1.0.2 constraint: Deedle (= 1.2.5)'
When I search for Deedle the version that NuGet shows is v1.2.5.
I suspect this is a NuGet problem after reading about some issues with its dependency resolution management.
I tried installing Deedle separately and setting NuGet's Dependency behavior to Highest with no luck. In the end I installed Paket which worked with no problems. No time to debug this further for now.