Question: I am creating SQL Server database (not server) project for our existing database using VS2015 and SSDT (the latest version I think). I ran into a compile error saying :

> 
> Error SQL71501: User: [xxxxx] has an unresolved reference to Login
>  [xxxxxx].
> 
> 
> 

I came across [this](https://social.msdn.microsoft.com/Forums/en-US/1f8226fe-b791-4344-8735-3d38307e8664/error-1-sql03006-user-x-has-an-unresolved-reference-to-login-x?forum=vstsdb) post (the answer by Demetri M), that suggests to create a server project and have a current project reference that, but I do not see an option to create SQL Server SERVER (not Database) project in VS2015.

[This](https://msdn.microsoft.com/en-us/library/84b1se47(v=vs.90).aspx) documentation from MSDN didn't help either.Is this something that is no longer valid?

Answer: 
Expanding on [@morxa's answer and comment](https://stackoverflow.com/a/35690567/325418), some `sh` doesn't have `source` defined. In such case we can use

```
grep NAME /etc/*-release

```

to be able to see what the OS is. Usually the `PRETTY_NAME` can tell the whole name:

```
PRETTY_NAME="Ubuntu 20.04 LTS"

```
You should use following cmd to detect **Ubuntu** release name:

```
export UBUNTU_RELEASE=$(lsb_release  -sc || cat /etc/*-release|grep -oP  'CODENAME=\K\w+$'|head -1)

```

For Ubuntu docker images I am using following cmds when I need to add multiverse to apt.source.lists and haven't duplicate lines:

```
RUN export UBUNTU_RELEASE=$(lsb_release  -sc || cat /etc/*-release|grep -oP  'CODENAME=\K\w+$'|head -1) &&\
    echo "deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_RELEASE}-security multiverse" >> /etc/apt/sources.list && \
    echo "deb-src http://archive.ubuntu.com/ubuntu/ ${UBUNTU_RELEASE}-security multiverse" >> /etc/apt/sources.list && \
    echo "deb http://archive.ubuntu.com/ubuntu/ ${UBUNTU_RELEASE} multiverse" >> /etc/apt/sources.list && \
    echo "deb-src http://archive.ubuntu.com/ubuntu/ ${UBUNTU_RELEASE} multiverse" >> /etc/apt/sources.list && \
    echo "removing duplicated strings from /etc/apt/sources.list" && \
    awk '!x[$0]++' /etc/apt/sources.list > /tmp/sources.list && \
    cat /tmp/sources.list > /etc/apt/sources.list && \

```

You should use following cmd to detect **Debian** release name ( [I am using](https://github.com/weldpua2008/docker-net-snmp/blob/master/debian/unstable/Dockerfile#L5) it for my docker images):

```
export DEBIAN_RELEASE=$(awk -F'[" ]' '/VERSION=/{print $3}'  /etc/os-release | tr -cd '[[:alnum:]]._-' ) && \
     [[ "x${DEBIAN_RELEASE}" = "x" ]] && export DEBIAN_RELEASE="unstable" 

```