PacktPublishing / C-Sharp-Data-Structures-and-Algorithms---Second-Edition

C# Data Structures and Algorithms - Second Edition by Packt Publishing
MIT License
33 stars 25 forks source link

Chapter07 broken #5

Open iankode opened 6 months ago

iankode commented 6 months ago

In Chapter07 the dependencies are broken expecting "..\07-Tree\07-Tree.csproj", whereas actual is "..\Tree\07-Tree.csproj", failing

e.g. errors

Severity    Code    Description Project File    Line    Suppression State
Error   NU1104  Unable to find project 'F:\MarcinJ\Chapter07\07-Tree\07-Tree.csproj'. Check that the project reference is valid and that the project file exists.   07-BSTVisualization F:\MarcinJ\Chapter07\BSTVisualization\07-BSTVisualization.csproj    1   
Warning     The referenced project '..\07-Tree\07-Tree.csproj' does not exist.  07-BSTVisualization C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 2153    

bacause those .csproj files are expecting "..\07-Tree\07-Tree.csproj", e.g. [note the "Include=" part]

F:\MarcinJ>type Chapter07\BSTVisualization\07-BSTVisualization.csproj
<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <OutputType>Exe</OutputType>
        <TargetFramework>net8.0</TargetFramework>
        <RootNamespace>_07_BSTVisualization</RootNamespace>
        <ImplicitUsings>enable</ImplicitUsings>
        <Nullable>enable</Nullable>
    </PropertyGroup>

    <ItemGroup>
        <ProjectReference Include="..\07-Tree\07-Tree.csproj" />
    </ItemGroup>

</Project>

because the actual independent project saught is (note "Tree" and not "07-Tree")

F:\MarcinJ>tree
Folder PATH listing for volume training
Volume serial number is 9CBD-A162
...
├───Chapter07
│   ├───AutoComplete
│   ├───BSTVisualization
│   ├───CompanyStructure
│   ├───HierarchyOfIdentifiers
│   ├───SimpleQuiz
│   └───Tree
...

Unclear when this error has arisen (e.g. author code or QA polishing by Packt), and sad no reviewer caught these errors.

I will shortly provide a PR to address this mismatch, and my approach will be to fix those 4 dependent parents I accept that changing that single independent child would be an alternate fix

marcinjamro commented 6 months ago

Hello,

As I mentioned recently, the publisher modified the files I sent to them and uploaded the wrong version to the repository. Immediately after receiving the information from you, I contacted the publisher regarding this problem. It seems that the appropriate version of the files is currently already in the repository and there should be no problems with building the solution. I would be very grateful if you could check if everything is working fine and thanks again for reporting the problem!

If you have any questions or problems, I will be happy to help. The easiest way to contact me directly is via the contact details on my website, i.e. https://marcin.com :-)

Have a nice day! Marcin