Tuesday, September 25, 2018

Removing NuGet dependencies on an empty ASP.NET project

I noticed that just making an empty ASP.NET project introduces a NuGet dependency due to Microsoft.CodeDom.Providers.DotNetCompilerPlatform. I believe this has something to do with code-analysis or analytics. However, I really don't care about it. On the other hand, if your build-server is not internet connected (for security), then this causes builds to fail.

How to remove this dependency?

There are two places where "stuff" end up due to this dependency:

1. Your web.config. remove the <system.codedom/> section altogether!


2. Your .csproj file will have a few different entries you need to remove: 
2.1. The imports

2.2. The reference

2.3. The packages.config file

2.4. The Target for NuGet


Once you remove these, you will no longer need NuGet for the empty / skeleton ASP.NET application.

.

Mounting VMWare Shared folders on linux

I run an ubuntu VM on my computer using VMWare Player. I've had trouble with mounting the VMWare shared folders, until I came across this post: https://askubuntu.com/a/1051620

Most searches turn up nothing useful, because they turn up outdated information. So I was really happy when this worked.

To manually mount shared folders on Ubuntu 18.04
sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000
.host:/ is a parent folder containing all shared folders. To see a list of shared folders under it without mounting, you can use vmware-hgfsclient.

To add as an entry in your /etc/fstab:

# Use shared folders between VMWare guest and host
#+goes in /etc/fstab
.host:/    /mnt/hgfs/    fuse.vmhgfs-fuse    defaults,allow_other,uid=1000     0    0

Dependencies: sudo apt-get install open-vm-tools open-vm-tools-desktop

.