# biblatex not sorting the bibliography [closed]

I'm writing my dissertation in LaTeX and I cannot make the bibliography appears in citation order.

I'm using biblatex and I've used the sorting=none but is not working. At first it was working fine but after trying to change the citation style to harvard style, it stopped working. I deleted all the changes I made but is not working anymore. I don't know it's a problem with mendeley (I use it to manage my references), my code or something else.

This is my code:

\documentclass[12pt,a4paper,oneside]{report}
\usepackage{subfiles} %For join each section
\usepackage{graphicx} %For images and tables
\usepackage{subfig} %For sub images
\usepackage{float} %For the tables and images?
\usepackage{amssymb} %Math symbols
\usepackage{setspace} %Spacing
\usepackage{sectsty} %Italic subsection
\usepackage[table,xcdraw]{xcolor} %Table colours.
\usepackage{multirow} %Multirows
\usepackage{hhline} %For lines in the columns with colours
\usepackage{longtable} %Long tables
\usepackage{framed} %For Boxes
\usepackage{float} %Floats environment for caption in boxes.
\usepackage{pdflscape}
\usepackage{afterpage}
\usepackage{capt-of}% Captions outse Float For use the larger caption package
\usepackage[width=16.5cm, left=2.5cm, height=25.7cm]{geometry} %Margins
\usepackage{titlesec}

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{10pt}{\LARGE}
\titlespacing*{\chapter}{0pt}{0pt}{10pt}
\titlespacing*{\section}{0pt}{5pt}{5pt}
\titlespacing*{\subsubsection}{0pt}{5pt}{5pt}
\titlespacing*{\paragraph}{0pt}{0pt}{0pt}

\sectionfont{\large\bfseries}
\subsubsectionfont{\normalfont\bfseries}
\paragraphfont{\normalfont\bfseries\itshape}
\newfloat{Box}{tpbh}{Box} %Creates float "environment" Box

\usepackage[style=numeric-comp,backend=biber,sorting=nty]{biblatex}%For the References

\newcommand\frontmatter{%
\clearpage
%\@mainmatterfalse
\pagenumbering{roman}}

\newcommand\mainmatter{%
\clearpage
% \@mainmattertrue
\pagenumbering{arabic}}

\newcommand\backmatter{%
\if@openright
\cleardoublepage
\else
\clearpage
\fi
% \@mainmatterfalse
}

\begin{document}

\begin{titlepage}
...
\end{titlepage}

\newgeometry{width=16.5cm, left=2.5cm, height=25.7cm}

\frontmatter
\onehalfspacing
\tableofcontents
\listoffigures
\listoftables
\listof{Box}{List of Boxes}
\clearpage
\clearpage

\mainmatter

\subfile{Introduction.tex}
\subfile{background.tex}
\subfile{Ch1.tex}
\subfile{Ch2.tex}
\subfile{Ch3.tex}
\clearpage

\backmatter
\printbibliography

\end{document}


## closed as off-topic by Mensch, Stefan Pinnow, Troy, Zarko, barbara beetonAug 19 '17 at 18:24

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• It 'is not working' is not a helpful description of your problem at all. We need to know what you expect to see and what you see instead. If there were problems, TeX normally informs you about them in the .log file, Biber will write complaints to the .blg (on Windows the file extension is associated with the 'Performance Monitor', but Biber's .blgs are simple text files that you can open with your favourite editor). Did you try to delete the temporary files (.aux, .bbl, .bcf, ...) and compile again? Did you run Biber? – moewe Aug 11 '17 at 7:02
• Note that your code example is not an MWE (click the link to see what an MWE is): You are loading a lot of packages that are unrelated to your problem. But more importantly, we don't have any of your \include'd files neither do we know how your Project.bib looks like, so there is no way for us to run your example. Please try to reduce it to reproduce your problem with as little code (and noise from \include and unnecessary packages) as possible. – moewe Aug 11 '17 at 7:06
• I'm voting to close this question as off-topic because the op solved it by rewriting the bib file (see comment under the answer). The bib file is not shown in the question ... – Mensch Aug 19 '17 at 15:43