12 verbosity ? "detailed",
13 options ? "/p:Configuration=Debug;Platform=Win32",
16 modifyPublicMain ? false,
20 assert modifyPublicMain -> mainClassFile != null;
25 buildInputs = [ dotnetfx ];
32 ${lib.optionalString modifyPublicMain ''
33 sed -i -e "s|static void Main|public static void Main|" ${mainClassFile}
42 if [ -f $1/nix-support/dotnet-assemblies ]; then
43 for i in $(cat $1/nix-support/dotnet-assemblies); do
44 windowsPath=$(cygpath --windows $i)
45 assemblySearchPaths="$assemblySearchPaths;$windowsPath"
52 for i in ${toString assemblyInputs}; do
53 windowsPath=$(cygpath --windows $i)
54 echo "Using assembly path: $windowsPath"
56 if [ "$assemblySearchPaths" = "" ]; then
57 assemblySearchPaths="$windowsPath"
59 assemblySearchPaths="$assemblySearchPaths;$windowsPath"
65 echo "Assembly search paths are: $assemblySearchPaths"
67 if [ "$assemblySearchPaths" != "" ]; then
68 echo "Using assembly search paths args: $assemblySearchPathsArg"
69 export AssemblySearchPaths=$assemblySearchPaths
73 MSBuild.exe ${toString slnFile} /nologo /t:${targets} /p:IntermediateOutputPath=$(cygpath --windows $out)\\ /p:OutputPath=$(cygpath --windows $out)\\ /verbosity:${verbosity} ${options}
75 # Because .NET assemblies store strings as UTF-16 internally, we cannot detect
76 # hashes. Therefore a text files containing the proper paths is created
77 # We can also use this file the propagate transitive dependencies.
79 mkdir -p $out/nix-support
81 for i in ${toString assemblyInputs}; do
82 echo $i >> $out/nix-support/dotnet-assemblies