MSBuildGitHash icon indicating copy to clipboard operation
MSBuildGitHash copied to clipboard

Is MSBuildGitHash not working without network connection?

Open suchja opened this issue 4 years ago • 2 comments

On 2 of my machines MSBuildGitHash is working like a charm. However, I do have one machine which is not connected to the internet (and will not be connected). On this machine my project starts throwing many compilation errors (e.g. Type Exception not known, ...). Once I uninstall MSBuildGitHash everything is working like normal.

I copied my whole project including packages folder which contains MSBuildGitHash from a machine (with network connection) where everything works smoothly onto the machine which shows these wired errors.

Any ideas or do you need additional information?

suchja avatar Jun 01 '21 10:06 suchja

I'm not sure what's going on here. My best guess is that you are running into a framework version issue for some reason. That's usually what causes types from the BCL (like Exception) to be "missing". When you do a build, check the top of the Output window (not the errors window) and see if you see any warning/errors being reported about framework version. It is possible that this package is causing some build issue that interacts poorly with the sdk targets.

Is it an Sdk-Style project (Project Sdk="Microsoft.NET.Sdk") or is it old-style? What framework is your project targeting?

MarkPflug avatar Jun 01 '21 17:06 MarkPflug

Thanks for the immediate response.

I'm targeting .NET Framework 4.6.1. So it is an old-style project.

Unfortunately the testing is a bit problematic. As soon as I do have the possibility to have it run again, I'll check the output window. However, I could bet to had a look there (but you never know ;).

suchja avatar Jun 04 '21 15:06 suchja