Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report for Bug 59143 on
GitHub or Developer Community if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Attempting to use the packaged MSBuild on Windows fails with the following error message:
"C:\Users\me\project\CsharpWorker.sln" (default target) (1) ->
"C:\Users\me\project\CsharpWorker.csproj" (default target) (2) ->
"C:\Users\me\project\GeneratedCode.csproj" (default target) (3:2) ->
(CoreCompile target) ->
C:\Program Files\Mono\lib\mono\msbuild\15.0\bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error MSB3082: Task failed because "csc.exe" was not found, or the .NET Framework v4.0 is not installed. Please insta ll the .NET Framework v4.0. [C:\Users\me\project\GeneratedCode.csproj]
I dug a bit deeper, and according to https://msdn.microsoft.com/en-us/library/ms164309.aspx there should be a "csc.exe" in the MSBuildToolsPath (for mono 5.2 x64 that's C:\Program Files\Mono\lib\mono\msbuild\15.0\bin). There isn't one, which makes my build fail. I can see that there is a csc.exe in C:\Program Files\Mono\lib\mono\4.5 though.
(This is Windows 10, 64-bit)
the same error on Gentoo Linux
@Arsen, I am not sure you built msbuild correctly. Try `$ make && ./install-mono-prefix.sh <prefix>`. The error being discussed here is for mono's fork of msbuild, built and packaged by us.
@david, Where did you get the package from? Could you please try a more recent version? And if it still doesn't work then could you attach the diag build log? Build with `$ msbuild foo.sln /fl /flp:v=diag` and attach the generated `msbuild.log`.
@Ankit that was Mono 5.2 64-bit from the website, not sure what version it was exactly.
The log below is for mono 64-bit 188.8.131.52 from https://download.mono-project.com/archive/5.2.0/windows-installer/mono-184.108.40.206-x64-0.msi, freshly installed on a Windows 10 64-bit.
The error still persists, as requested here is the msbuild.log for the diag verbosity: