Problems with Msbuild version

Asked

Viewed 271 times

0

In the company where I work, front development is completely separate from back. Therefore, front developers do not have Visual Studio installed and rely on devs. Net to build and raise Dlls so they can download and run applications on local machines.

With this scenario, we are planning to install only Build Tools to restore Nuget packages and build C#codes. However, I’m struggling with Msbuild.

The command I’m using is:
msbuild SOLUTION.sln /p:Configuration="Release"

However, I get some errors in the build process:
error CS1056: Caractere '$' inesperado
error CS1041: Identificador esperado. 'static' é uma palavra-chave
error CS1518: Class, delegate, enum, interface ou struct esperado
Some other mistakes happen. Building directly in Visual Studio, this problem does not happen.

I have already checked the version of . Net Framework installed:
Microsoft (R) Versão do Mecanismo de Compilação 4.7.3190.0 [Microsoft .NET Framework, Versão 4.0.30319.42000]

When trying to install version 4.7 of . Net Framework, the installer informs that it already has a higher installed.

I tried to check the Msbuild Toolsversion, but the only available version is "4.0":
MSBUILD : error MSB1040: ToolsVersion inválido. A versão das ferramentas "15.0" não é reconhecida. As versões de ferramentas disponíveis são "4.0".

How do I accomplish this process? Restoring Nugets packages is working perfectly, but the build process is having these problems.

  • First question, if the front is totally separate from the back, why the hell do they need any back dll or nuget package? You shouldn’t be delivering Web Apis to them?

  • @Leandroangelo our front team works only with HTML and CSS. Anything beyond that, enters as "backend". They need to run the application (we developed it in a CMS) to see the changes they made.

  • Add the instruction to use the specific version you have available then build by VS it builda? Have a look here https://docs.microsoft.com/en-us/visualstudio/msbuild/overriding-toolsversion-settings?view=vs-2015

  • @Leandroangelo the only version available to use in Toolsversion is 4.0. I saw in other links to test with version 14 or 15, but is not available.

1 answer

0

I was able to release version 12.0 by installing Msbuild Tools 2013: https://www.microsoft.com/en-us/download/details.aspx?id=40760

However, when I build with version 12.0, I get error messages stating that I could not find the .csproj.metaproj files and they really do not exist, but they are not generated.
Solution is normally loaded by Visual Studio and does not generate these files.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.