MsBuild (v14) does not generate licenses.licx

1.2k Views Asked by At

It seems that MsBuild versions 14 does not generate the licenses.licx file when used "manually". When we compile our code from visual studio (v2017), everything works fine, but when done manually, from a batch file, the license file is not generated, and clearly our build fails, because the file is not found.

We use the following command:

msbuild.exe [project_path] /verbosity:normal /t:rebuild /tv:14.0 /p:Configuration=Release,Optimize=true,Platform=AnyCPU,OutputType=Library

I tried every solution on the internet, I've installed .net SDK for windows 7, 8 and 10, and still no luck.

Does anybody have an idea why?

Thank you in advance

UPDATE:

My description was not totally correct. The thing is msbuild does not output the [assembly_name].dll.licenses file. The licenses.licx exists under the "My project.." correctly.

1

There are 1 best solutions below

0
On BEST ANSWER

We found that vs 2017 has MsBuild version 15 installed under "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\bin\msbuild.exe" and not under "C:\Program Files (x86)\MSBuild\15.0\bin" like the previous version 14.

By using the version 15, the issue no longer occurs.