dotnet icon indicating copy to clipboard operation
dotnet copied to clipboard

Impossible to compile msbuild

Open Meister1593 opened this issue 3 years ago • 10 comments

  1. For now, you can't compile msbuild because newtonsoft-json src issue: #496
  2. When building msbuild (with fix applied for issue above), it tries to compile dev-dotnet/buildtools-1.0.27-r1 but fails to do. log, info

Meister1593 avatar May 19 '21 20:05 Meister1593

For the 2.) it seems that the problem now, that Newtonsoft.Json is installed into the wrong directory under amd64: under /usr/lib64/mono/gac/... instead of /usr/lib/mono/gac/... Using the gacutil of mono, to install the dll, dev-dotnet/buildtools builds for me.

Addition: For the missing dll, just find it under /usr/lib64/mono/gac/, use gacutil -i <dll_file_path>

cyborgyn avatar May 28 '21 08:05 cyborgyn

For the 2.) it seems that the problem now, that Newtonsoft.Json is installed into the wrong directory under amd64: under /usr/lib64/mono/gac/... instead of /usr/lib/mono/gac/... Using the gacutil of mono, to install the dll, dev-dotnet/buildtools builds for me.

can you elaborate on how to use that util to install that dll? i really need msbuild now)

Meister1593 avatar May 28 '21 18:05 Meister1593

Even though i managed to build msbuild, it seems that it's missing a lot of stuff... like, System.CodeDom, System.Linq, System.Windows (winforms) arch has exactly the same package, from the same repo and it has everything needed though msbuild version isn't 15.3 on arch, but 16.9

Meister1593 avatar May 28 '21 23:05 Meister1593

Even though i managed to build msbuild, it seems that it's missing a lot of stuff... like, System.CodeDom, System.Linq, System.Windows (winforms) arch has exactly the same package, from the same repo and it has everything needed though msbuild version isn't 15.3 on arch, but 16.9

How do you mean it's missing those? msbuild just builds. Those you mentioned are class libraries, nothing to do with the build system itself, except it need to find it to be able to compile a source referencing it. You need to install those also into GAC to be able to compile against those.

cyborgyn avatar May 29 '21 07:05 cyborgyn

Even though i managed to build msbuild, it seems that it's missing a lot of stuff... like, System.CodeDom, System.Linq, System.Windows (winforms) arch has exactly the same package, from the same repo and it has everything needed though msbuild version isn't 15.3 on arch, but 16.9

How do you mean it's missing those? msbuild just builds. Those you mentioned are class libraries, nothing to do with the build system itself, except it need to find it to be able to compile a source referencing it. You need to install those also into GAC to be able to compile against those.

As far as i can tell, i at least have windows namespace

ls /usr/lib/mono/gac | grep -i System.win
System.Windows
System.Windows.Forms
System.Windows.Forms.DataVisualization

do i need to use gac flag on all packages that are needed to install for msbuild to be able to use them?

Meister1593 avatar May 29 '21 07:05 Meister1593

I rebuilt everything with gac use flag, and projects still can't reference at least System.Windows... i'm missing something?

Meister1593 avatar May 29 '21 07:05 Meister1593

I'm using Rider, and using msbuild from directory /usr/lib/mono/mono/msbuild/Current/bin/MSBuild.dll, and every reference what project have is Not resolved by msbuild, even just System. image

Meister1593 avatar May 29 '21 08:05 Meister1593

What is your csproj file look like? It depends on that... could be it references through full path those, or versions not installed on your machine.

On May 29, 2021 8:24:10 AM UTC, PLYSHKA @.***> wrote:

I'm using Rider, and using msbuild from directory /usr/lib/mono/mono/msbuild/Current/bin/MSBuild.dll, and every reference what project have is Not resolved by msbuild, even just System. image

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/gentoo/dotnet/issues/498#issuecomment-850794373

-- Virágh Barnabás @.*** gpg id: f690 c4ba 87c9 41c3

cyborgyn avatar May 29 '21 11:05 cyborgyn

@Meister1593 : pull requests are merged. Now it should build without intervention. If it does, you can close this issue... for now... :)

cyborgyn avatar Jun 04 '21 14:06 cyborgyn

@Meister1593 : pull requests are merged. Now it should build without intervention. If it does, you can close this issue... for now... :)

I'm on Archlinux now, so... someone else has to check it now)

Meister1593 avatar Jun 04 '21 21:06 Meister1593