`Microsoft.CodeAnalysis.Razor` has Apparent Invalid Dependency
See original GitHub issueDescribe the bug
Microsoft.CodeAnalysis.Razor
on NuGet lists the following as dependencies:
Microsoft.CodeAnalysis.Common (>= 4.0.0-2.21354.7)
Microsoft.CodeAnalysis.CSharp (>= 4.0.0-2.21354.7)
However, the posted versions on NuGet are:
Microsoft.CodeAnalysis.CSharp
: 4.0.0-2.final
Microsoft.CodeAnalysis.Common
: 4.0.0-2.final
To Reproduce
Attempt to install a NuGet package that depends on Microsoft.CodeAnalysis.Razor
.
Exceptions (if any)
The following message displays in the error list:
Severity Code Description Project File Line Suppression State
Error NU1102 Unable to find package Microsoft.CodeAnalysis.CSharp with version (>= 4.0.0-3.21370.20)
- Found 116 version(s) in nuget.org [ Nearest version: 4.0.0-2.final ]
- Found 0 version(s) in Microsoft Visual Studio Offline Packages
Additional outputs:
33> ... : warning NU1603: Microsoft.CodeAnalysis.Razor 6.0.0-preview.7.21378.6 depends on Microsoft.CodeAnalysis.Common (>= 4.0.0-2.21354.7) but Microsoft.CodeAnalysis.Common 4.0.0-2.21354.7 was not found. An approximate best match of Microsoft.CodeAnalysis.Common 4.0.0-2.final was resolved.
33> ... : warning NU1603: Microsoft.VisualStudio.Web.CodeGeneration 6.0.0-preview.7.21406.1 depends on System.Collections.Immutable (>= 6.0.0-preview.7.21377.12) but System.Collections.Immutable 6.0.0-preview.7.21377.12 was not found. An approximate best match of System.Collections.Immutable 6.0.0-preview.7.21377.19 was resolved.
33> error NU1102: Unable to find package Microsoft.CodeAnalysis.CSharp.Workspaces with version (>= 4.0.0-3.21370.20)
33> error NU1102: - Found 116 version(s) in nuget.org [ Nearest version: 4.0.0-2.final ]
33> error NU1102: - Found 0 version(s) in Microsoft Visual Studio Offline Packages
33> error NU1102: Unable to find package Microsoft.CodeAnalysis.CSharp with version (>= 4.0.0-3.21370.20)
33> error NU1102: - Found 116 version(s) in nuget.org [ Nearest version: 4.0.0-2.final ]
33> error NU1102: - Found 0 version(s) in Microsoft Visual Studio Offline Packages
Further technical details
- The IDE (VS / VS Code/ VS4Mac) you’re running on, and its version
Visual Studio 2022 Preview 3.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Microsoft.CodeAnalysis problem
Hello, I am receiving these suspisious waringns. Can someone help ? 1>CSC : warning CS8032: An instance of analyzer Microsoft.CodeAnalysis.
Read more >Blazor Server project keeps throwing internal errors when ...
Blazor Server project keeps throwing internal errors when adding new code. If I close them and keep adding my code they come back...
Read more >Could not load file or assembly Microsoft.CodeAnalysis
Right click on your project >> Manage Nuget packages manager for solution >> Tap on Updates >> Update your 'Microsoft.
Read more >Solution to Visual Studio 2022 messing up ...
NET 5 and .NET Standard 2 projects couldn't be loaded anymore in Visual Studio 2019. The error shown when attempting to load the...
Read more >Runtime C# Code Compilation Revisited for Roslyn - Rick Strahl
Compilation requires that each and every dependency that your code references has to available to the compiler. This means both explicit ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
4.0.0-2.21354.7 packages have been published to NuGet.org
This is still an issue, but with different analysis packages (
.Common
and.CSharp
):Latest posted versions of those are both
4.0.0-3.final
.