1

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.

  • Do you mean the `licenses.licx` file could be generated when you build from Visual Studio 2017? How about build it with MSBuild (v15)? Again, how to create the licenses.licx file when you build from Visual Studio? – Leo Liu Apr 25 '18 at 09:24
  • Like I mentioned, from visual studio everything is fine, the goal here is to rebuild with the batch file, so when rebuilt directly with msbuild.exe the file is not created. – AndrePinto-NET Apr 25 '18 at 09:38
  • AFAIK, the `licenses.licx` file will not be generated automatically, it have to be done manually (or other components auto-generate). So how did generated it in VS? Or what I understand is wrong. – Joy Apr 25 '18 at 10:03
  • No, it has not to be done manually, that makes no sense at all! The file is generated automatically, you don't even need to compile, just open any file that uses a component with it's own licence, and that immediately creates the file. – AndrePinto-NET Apr 25 '18 at 10:33
  • Are you seeing this behavior on the same machine where you can successfully compile with Visual Studio 2017, or is this a separate machine / build server? – C. Augusto Proiete Apr 26 '18 at 21:37
  • Same machine, and it is not only me, everybody here has the same problem. The only way for us to solve this, is for some reason that we cannot figure out to install VS 2015 together with VS 2017, which makes no sense... – AndrePinto-NET Apr 27 '18 at 06:05

1 Answers1

1

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.