Dajbych.net


Visual Studio: Please restore the MSBuild Nuget package

, a minute to read

I have re­cently run into a prob­lem af­ter I up­graded my Vi­sual Stu­dio Ser­vice Fab­ric project from ver­sion 3.1.283 to 3.2.178. The build has been fail­ing and the ad­vice in the er­ror mes­sage was not help­ful. Some­thing in the build sys­tem was ap­par­ently changed and the up­date script failed to up­grade the so­lu­tion suc­cess­fully. I have cre­ated a new Ser­vice Fab­ric project and com­pared what was changed in the lat­est ver­sion.

The orig­i­nal com­piler er­ror mes­sage was:

Un­able to find the '..\pack­ages\Mi­crosoft.Vi­su­al­S­tu­dio.Azure.Fab­ric.MS­Build.1.6.6\build\Mi­crosoft.Vi­su­al­S­tu­dio.Azure.Fab­ric.Ap­pli­ca­tion.props' file. Please re­store the 'Mi­crosoft.Vi­su­al­S­tu­dio.Azure.Fab­ric.MS­Build' Nuget pack­age.

The fix is rel­a­tively easy. You must: