Comments (9)
The bigger question is: what are you using that’s dependent on the preview bits?
from aspnetcore-realworld-example-app.
You should be using 2.1.1
from aspnetcore-realworld-example-app.
I agree, but last time I used 2.1.1, I ran into a dependency issue with a NuGet package that needed to target 2.1.0, so what is the 'best practice' when faced with such an issue ?
I need a stable set of NuGet dependencies that work together in a WebAPI project targeting asp.net core 2.1 along with entity framework core.
As a bonus I would love to know if it is possible (perhaps by editing the .csproj file) to target .net framework just for one or two assemblies that are not compatible with .net core.
I really don't want to break my app, by updating a nuget package only to find that there is the nuget equivalent of .net dll hell
from aspnetcore-realworld-example-app.
If you want an example of multi-targeting for a library you can look at my project here: https://github.com/adamhathcock/sharpcompress/blob/master/src/SharpCompress/SharpCompress.csproj
For libraries, you should be trying to target a netstandard
and only resort to a .NET Core specific (e.g. netcoreapp2.0
or netcoreapp2.1
) or full framework specific (e.g. net45
) target for an executable. Sometimes it's unavoidable because they have other own specific APIs.
Again, I'd like to know your specific problem with dependencies to recommend more. Maybe read the docs here: https://docs.microsoft.com/en-us/dotnet/core/packages
from aspnetcore-realworld-example-app.
Ok, so if I delete the current NuGet packages and install the 2.1.1 current versions, will I risk breaking anything in my project ???
from aspnetcore-realworld-example-app.
The answer is YES, so thanks very much :(
PM> Install-Package Microsoft.AspNetCore.App -Version 2.1.1
Restoring packages for C:\Users\everettr\source\repos\OCM_API\OCM_API\OCM_API.csproj...
NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Workspaces 2.6.1 requires Microsoft.CodeAnalysis.CSharp (= 2.6.1) but version Microsoft.CodeAnalysis.CSharp 2.8.0 was resolved.
Install-Package : NU1107: Version conflict detected for Microsoft.CodeAnalysis.Common. Reference the package directly from the project to resolve this issue.
OCM_API -> Microsoft.AspNetCore.App 2.1.1 -> Microsoft.AspNetCore.Mvc.Razor 2.1.1 -> Microsoft.CodeAnalysis.CSharp 2.8.0 -> Microsoft.CodeAnalysis.Common (= 2.8.0)
OCM_API -> Microsoft.VisualStudio.Web.CodeGeneration.Design 2.1.0-preview1-final -> Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.1.0-preview1-final ->
Microsoft.VisualStudio.Web.CodeGeneration 2.1.0-preview1-final -> Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 2.1.0-preview1-final ->
Microsoft.VisualStudio.Web.CodeGeneration.Core 2.1.0-preview1-final -> Microsoft.VisualStudio.Web.CodeGeneration.Templating 2.1.0-preview1-final ->
Microsoft.VisualStudio.Web.CodeGeneration.Utils 2.1.0-preview1-final -> Microsoft.CodeAnalysis.CSharp.Workspaces 2.6.1 -> Microsoft.CodeAnalysis.Workspaces.Common 2.6.1 ->
Microsoft.CodeAnalysis.Common (= 2.6.1).
At line:1 char:1
- Install-Package Microsoft.AspNetCore.App -Version 2.1.1
-
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Install-Package : Package restore failed. Rolling back package changes for 'OCM_API'.
At line:1 char:1
- Install-Package Microsoft.AspNetCore.App -Version 2.1.1
-
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Time Elapsed: 00:00:02.1836939
PM>
from aspnetcore-realworld-example-app.
Looks like you're directly referencing Microsoft.VisualStudio.Web.CodeGeneration.Design 2.1.0-preview1-final
which should be 2.1.1 as it exists here: https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Design/
from aspnetcore-realworld-example-app.
from aspnetcore-realworld-example-app.
NPM isn't much better. You can and do still run into transitive dependency issues when referencing an old package (which was your case). csproj and Nuget aren't as simple but they're not terrible either. I encourage you to do a diff on your new csproj vs the one that didn't work to understand what the issue was.
from aspnetcore-realworld-example-app.
Related Issues (20)
- Problems with deploying HOT 1
- HTTP ERROR 404
- Security Risk - User Hijacking? HOT 4
- Database provider SQlLite hard-coded HOT 3
- Unable to delete article containing comments HOT 2
- Implement one database transaction per HTTP API call HOT 3
- CORS and pre-flight OPTIONS requests. HOT 4
- Missing app.UseAuthentication()? HOT 2
- Class vs Namespace HOT 4
- cannot use chinese for the title of article HOT 1
- Default connection string is hard-coded, only SQLite can be used. HOT 1
- can't connect to localhost:5000 HOT 1
- No License for Repo HOT 2
- Should .dockerignore include .git folder? HOT 2
- Circular references from Article HOT 3
- Wrong docker command for 'make run' in documentation node "Docker Build" HOT 1
- Adding an existing tag when editing an article causes an error
- Badly implemented GET /articles endpoint
- ASP MVC core frontend request
- are there any plans to upgrade this to .Net 6? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aspnetcore-realworld-example-app.