RazorLight: package restore failure
After upgrading to 1.0.0, I am unable to restore packages. I get the following error:
Version conflict detected for Microsoft.CodeAnalysis.CSharp.
DemoApp (>= 1.0.0) -> DemoApp.Library (>= 1.0.0) -> RazorLight (>= 1.0.0) -> Microsoft.CodeAnalysis.CSharp (>= 1.3.2)
DemoApp (>= 1.0.0) -> Microsoft.VisualStudio.Web.CodeGeneration.Design (>= 1.1.0) -> Microsoft.VisualStudio.Web.CodeGeneration.Utils (>= 1.1.0) -> Microsoft.CodeAnalysis.CSharp.Workspaces (>= 1.3.0) -> Microsoft.CodeAnalysis.CSharp (>= 1.3.0).
Downgrading to 1.0.0-rc2 resolves the issue.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 22 (8 by maintainers)
Commits related to this issue
- #43 Use wildcard for CodeAnalysis package — committed to toddams/RazorLight by toddams 7 years ago
- #43 - Lower CodeAnalysys version to 1.3.0 to avoid version conflict with ASP.NET MVC packages — committed to toddams/RazorLight by toddams 7 years ago
I use project.json. To fix the dependency conflicts, I added the following packages to my project:
I will add this to FAQ, closing the issue
Thanks @KolyaNET. I added these references to the .csproj file and the package restore is successful.
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="1.3.2" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="1.3.2" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="1.3.2" /> <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="1.3.2" />It isn’t a compilation error. The nuget package restore fails.