DotNET: Difference between revisions

imported>WhiteBlackGoose
removed unnecessary invokations for NIX_LD for NAOT shell
imported>WhiteBlackGoose
m Capitalized
Line 1: Line 1:
dotnet packages can be built with <code>buildDotnetPackage</code>
.NET packages can be built with <code>buildDotnetPackage</code>


example build file:
Example build file:


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 56: Line 56:
</blockquote>
</blockquote>


workaround: in <code>buildPhase</code>, replace <code>xbuild</code> with <code>msbuild</code>  
Workaround: in <code>buildPhase</code>, replace <code>xbuild</code> with <code>msbuild</code>  


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 79: Line 79:
</syntaxHighlight>
</syntaxHighlight>


msbuild reference: https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2022
MSBuild reference: https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2022


== .NET location: Not found ==
== .NET location: Not found ==
Line 91: Line 91:
</syntaxHighlight>
</syntaxHighlight>


see : https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#net-sdk-and-cli-environment-variables
See : https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#net-sdk-and-cli-environment-variables


== missing NuGet packages ==
== Missing NuGet packages ==


example error:
Example error:


<blockquote>
<blockquote>
Line 105: Line 105:
</blockquote>
</blockquote>


these are upstream bugs
These are upstream bugs


as workaround, patch all <code>*.csproj</code> files, to remove all XML tags that contain the "missing file" paths, for example
As workaround, patch all <code>*.csproj</code> files, to remove all XML tags that contain the "missing file" paths, for example


<blockquote>
<blockquote>
Line 115: Line 115:
</blockquote>
</blockquote>


see also https://stackoverflow.com/questions/32254439/nuget-packages-are-missing
See also https://stackoverflow.com/questions/32254439/nuget-packages-are-missing


== NativeAOT ==
== NativeAOT ==