Comments (7)
The package name is not packtlibrary.dll.
It is packt.cs8.sharedlibrary
Look at the solution project's .csproj and copy the package reference from there
from cs8dotnetcore3.
Thanks. I didn't realize that you need to go into the \Chapter06\PacktLibrary project first and build that DLL.
However, I still get an error when trying to use the NuGet package manager in VS2019
Severity Code Description Project File Line Suppression State
Error Package restore failed. Rolling back package changes for 'PeopleApp'.
Severity Code Description Project File Line Suppression State
Error NU1105 Unable to find project information for 'C:\Source Code\C# 8.0 and .Net Core 3.0\Chapter06\PacktLibrary\PacktLibrary.csproj'. If you are using Visual Studio, this may be because the project is unloaded or not part of the current solution so run a restore from the command-line. Otherwise, the project file may be invalid or missing targets required for restore. PeopleApp C:\me\Source Code\C# 8.0 and .Net Core 3.0\Chapter06\PeopleApp\PeopleApp.csproj 1
from cs8dotnetcore3.
I had to add the DLL manually as a reference to the project to get it to work. Not sure why the NuGet manager can't install the "Packt.CS8.SharedLibrary" normally.
from cs8dotnetcore3.
The point of that section is not to reference the class library project. The point is to compile, package, and publish the class library to the public NuGet feed and then reference that package from the console app. If you're fixing the errors by directly referencing the class library then your bypassing the issue. Are you able to reference any other NuGet packages like Newtonsoft.Json? Can you please include your .csproj so I can see your references? It should look like this:
from cs8dotnetcore3.
OK, I think I must've built them out of order; I was reading chapter 6 and then opened the PeopleApp project.
Thanks for you help. Great book!
from cs8dotnetcore3.
Ah! When you talked about "a ton of Packt CS8 nuget packages" it sounded like your were working on Chapter 7. I should always remember to request more information before jumping to conclusions. ;-)
If you download solution projects, like PeopleApp and PacktLibrary in Chapter06, then its best to always start by running "dotnet build" in the console app. That would have compiled the PacktLibrary as well as the PeopleApp and you would have avoided seeing errors for the statement: using Packt.Shared;
I will add a note to the sixth edition pointing that out. So thanks for the feedback and I hope you continue to enjoy the book.
from cs8dotnetcore3.
No problem. I assumed you saw the path I included about the error "C:\me\Source Code\C# 8.0 and .Net Core 3.0\Chapter06"
Thanks for the "dontnet build" tip!
from cs8dotnetcore3.
Related Issues (20)
- Chapter 5, Page 154 Errata HOT 1
- Pg 503 Employees Razor class library HOT 2
- The Result doesn't sort as expected HOT 1
- Missing solutions for Chapter 10 Exercises? HOT 3
- An Observation regarding using Web Services in chapter 18. HOT 2
- AspNetCore.Views_Home_Index.ExecuteAsync() in Index.cshtml, line 9 HOT 1
- Chapter 2, page 58 HOT 1
- Chapter 2, page 58
- Pg 113 - ME is Maine, not Maryland HOT 2
- cs8.0dotnetcore3, page 95-96, converting from binary object to string HOT 5
- Question HOT 1
- Duplication of one-to-many relationship using has/with pattern - configured from "both ends"
- A few curiosity HOT 1
- Chapter 1 :clone url is wrong,markjprice lost an a HOT 4
- error message: "The '<' operator is reserved for future use" HOT 6
- Downloading Northwind.sql results in an html doc HOT 1
- Need error info as a readme, or something. Please support your publications. HOT 2
- Using Cache in Customer Repository
- Your Book's Syntax Error in Chapter 6. HOT 1
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 cs8dotnetcore3.