Mac - VS 8.10 - New 3.1 Project - Install Postsharp - postsharp

I created a new, console application. Nuget => Add PostSharp =>
Reading project file
/Users/jason/Projects/Postsharp/Postsharp/Postsharp.csproj.
Restoring packages for
/Users/jason/Projects/Postsharp/Postsharp/Postsharp.csproj...
Restoring packages for .NETCoreApp,Version=v3.1... Resolving conflicts
for .NETCoreApp,Version=v3.1... Cycle detected. Postsharp ->
PostSharp (>= 6.10.6). Checking compatibility of packages on
.NETCoreApp,Version=v3.1. Checking compatibility for Postsharp 1.0.0
with .NETCoreApp,Version=v3.1. Checking compatibility for Serilog
2.10.0 with .NETCoreApp,Version=v3.1. All packages and projects are compatible with .NETCoreApp,Version=v3.1. Package restore failed.
Rolling back package changes for 'Postsharp'.
Cycle Detected?
Geez, what am I doing wrong?
Thanks,
Jason

This is caused by naming your project PostSharp and having a dependency on the package of the same name.

Daniel, you were right, the project name was part of the problem.
The biggest issue was I needed to manually set PostSharpDependencyRestoreDisabled=True and then I had to manually add all the referenced Nuget packages. It was annoying, but at least it works now.
Thanks!

Related

Update version of package that's internally referenced from another package

My project uses .NET Standard Library version 2.1.0. One of the packages that it references is System.Net.WebSockets.Client version 4.0.2.0. This package in its turn has a dependency on System.Security.Cryptography.X509Certificates version 4.1.0. As a result, when I restore before build, this particular version gets downloaded. The issue is version 4.1.0 of System.Security.Cryptography.X509Certificates has a known vulnerability and should get updated to 4.1.2 which has the vulnerability fixed.
I am not sure how to update the version of a package that is being internally referenced from another package which itself is part of the .NET Standard Library.
I am getting flagged in my build for using the non-compliant version of the X509Cerificates package. Any pointers in this regard would be much appreciated.
Thanks.

Error in resolving package dependency swiftUI project

Dependencies could not be resolved because root depends on 'googleappmeasurement' 9.0.0.
'googleappmeasurement' 9.0.0 cannot be used because 'googleappmeasurement' 9.0.0 depends on 'nanopb' 2.30908.0..<2.30909.0 and root depends on 'nanopb' 2.30909.0..<2.30910.0.
that is my error message, can anyone help?
I am using SDK version 8.9.1 and everything working fine, If you executed the Resolve Package Versions and still not working. you can try the command Reset Package Caches from Project navigator scroll down right click on Package Dependencies then choose the command. that will clear all caches for all installed packages then re-install them again. if that not working i suggest you to use version 8.9.1 till Firebase fix the issue.
I have discovered the problem has been answered here. It occurs when importing Firebase using Swift Package Manager and setting to track "master" instead of a specific release version.
Got same error and solved, check attached image, this most likely packages usage misconfiguration, as follows:
1-perhaps you are working on a branch with different Xcode version than the other developer who installed the package.
2-Perhaps some package is conflicted being used twice, by so some dependencies are duplicated.
Well to solve this you gotta try either to match the Xcode version used while installing the packages, or to remove the package that makes errors(like Firebase here), and try adding that package again your side.

Dotnet restore not working

dotnet Version: 1.1.0 (global.json)
NuGet Version : 4.4.1.4656
VS2017 v15.5.2 (as Administrator)
.NET Core 1.1
The solution I am trying to build
Update I:
I just changed the project to run under target framework .NET Core v2.0 & sdk version 2.1.3 and I only get these kind of errors:
Severity Code Description Project File Line Suppression State
Error NU1202 Package Microsoft.Extensions.FileProviders.Physical 1.1.0
is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0).
Package Microsoft.Extensions.FileProviders.Physical 1.1.0 does not
support any target
frameworks. AspNetCoreExample C:\Users\Admin\Source\Repos\Examples\src\AspNetCoreExample\AspNetCoreExample.csproj 1
Update II:
While the following solves the current issue, i am not sure if it solves the root cause for this issue.
Delete the global nuget.config file %AppData%/Nuget/Nuget.config.
I fixed this issue by doing the following:
I migrated the project to .net core 2.0 and changed the global.json to point to sdk 2.1.3.
Removed all references in AspNetCoreExample manually and added the latest version for all of them.
Issues with target framework 1.1
When doing a restore from the solution in VS 2017:
When doing the restore from cmd (dotnet restore)
Running dotnet restore in Package Manager Console
NuGet.targets(103,5): error : Access to the path 'System.Runtime.dll'
is denied
.NET Core SDKs installed:
.NET Host
Now when opening the solution I get:
Comparing the log entries you pasted to their AppVeyor build,
https://ci.appveyor.com/project/Autofac/examples
Your machine's NuGet configuration seems to be broken. Analyze that and fix the issues.
You should add this code to your .csproj file
<RuntimeFramework>2.0.3</RuntimeFramework>
This worked for me.

Unable to resolve dependencies. 'xxx' is not compatible with 'yyy constraint: zzz)'

We have a project that is utilizing a set of Nuget-based Azure libraries. One of them was published with a specific MIN and MAX dependency on Newtonsoft.Json (max version being 7)
This was a headache, because other libraries depend on 8+ version of Netwon and this specific Azure library is just fine working with any modern Json package.
In VS2013, we forced to install this Azure library with newer version of Json package thru nuget installer and subsequently, Nuget never gave us any issues installing/updating other libraries.
However, after upgrading to VS2017, we cannot update any package (or at least the ones that depend on Json) and we get the error below.
Unable to resolve dependencies. 'Newtonsoft.Json 8.0.3' is not compatible with 'Microsoft.Azure.Insights 0.15.0-preview constraint: Newtonsoft.Json (>= 6.0.8 && < 7.0.0)'
How do we have Nuget ignore that specific Azure library's unimportant MAX version dependence?
How do we have Nuget ignore that specific Azure library's unimportant MAX version dependence?
If you confirm that Azure library is just fine working with any modern Json package and you want use the Microsoft.Azure.Insights 0.15.0-preview and 8+ version of Newtonsoft.Json at the same time. I would like provide a workaround to you, hope this can help you.
Detailed Steps:
Install the package Microsoft.Azure.Insights 0.15.0-preview with its dependencies first.
Only uninstall the package Microsoft.Azure.Insights 0.15.0-preview, Keep dependencies installed.
Update the Newtonsoft.Json to the version 8+.
Install the package Microsoft.Azure.Insights 0.15.0-preview in the Package Manager Console with following NuGet command:
Install-package Microsoft.Azure.Insights -IncludePrerelease -IgnoreDependencies
With the option -IgnoreDependencies, NuGet will ignore that specific Azure library's unimportant MAX version dependence:
Note: Need to mention is that if you update the Newtonsoft.Json package next time, you still need to follow the steps above to upgrade your Newtonsoft.Json package.

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.