[Windows] monodevelop can't find roslyn after compilation.
Hi all,
At the current moment, I see that I can't install, only build MonoDevelop for Windows. I saw building guide and build MonoDevelop for Windows. After installation I tried to run Gtk# project, but I can't, because I have the error:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.CSharp.CurrentVersion.targets(5,5): Error MSB4019: The imported project "C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets" was not found. Confirm that the path in the

Please help, how to solve this issue?
@lopatnov It's actually a bug in the current preview of VS2019. Roslyn targets are installed in MSBuild/15/Bin instead of current. Manually copying the 15 dir to Current will fix it.
Dear @Therzok ,
I see your comments in lots of Windows build related issues, so perhaps you are the right person to answer my question:
What is the most up-to-date stable branch/commit of the monodevolop to buiild and work on Windows?
I tried to compile a few release branches with different commits but either they had an issue with finding Roslyn as described above, or they had a saving issue as described at #6488.
Thanks in advance for your help.
All branches are affected by both #6488 and this roslyn issue. I'm currently working on a fix for 648, it just seems to be more complicated to fix in the general case, so I'll probably trim down the detected cases.
You need to uninstall VS2019 to be able to build (or wait for a new VS 2019 preview - I've seen that roslyn has issued a fix for it).
I installed new Visual Studio 2019 preview 4, mono, GTK# for .NET but I still can't build the Gtk# project:
Building GtkSample2 (Debug|x86)
Build started 04.03.2019 18:09:44.
Project "F:<my path>\GtkSample2\GtkSample2\GtkSample2.csproj" (Build target(s)):
Target GenerateTargetFrameworkMonikerAttribute: Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files. Target CoreCompile: C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:DEBUG /errorendlocation /preferreduilang:en-029 /highentropyva+ /reference:"C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-sharp-2.0\atk-sharp.dll" /reference:"C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-sharp-2.0\gdk-sharp.dll" /reference:"C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-sharp-2.0\glade-sharp.dll" /reference:"C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-sharp-2.0\glib-sharp.dll" /reference:"C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-sharp-2.0\gtk-sharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7\mscorlib.dll" /reference:"C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-sharp-2.0\pango-sharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7\System.dll" /debug+ /debug:full /optimize- /out:obj\x86\Debug\GtkSample2.exe /ruleset:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset" /subsystemversion:6.00 /resource:gtk-gui\gui.stetic,gui.stetic /target:winexe /utf8output gtk-gui\generated.cs MainWindow.cs gtk-gui\MainWindow.cs Program.cs Properties\AssemblyInfo.cs "C:\Users\User\AppData\Local\Temp.NETFramework,Version=v4.7.AssemblyAttributes.cs" Using shared compilation with compiler from directory: C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Roslyn gtk-gui\MainWindow.cs(17,24,17,28): error CS0400: The type or namespace name 'Mono' could not be found in the global namespace (are you missing an assembly reference?) gtk-gui\MainWindow.cs(37,32,37,36): error CS0400: The type or namespace name 'Mono' could not be found in the global namespace (are you missing an assembly reference?) Done building target "CoreCompile" in project "GtkSample2.csproj" -- FAILED.
Done building project "GtkSample2.csproj" -- FAILED.
Build FAILED.
gtk-gui\MainWindow.cs(17,24,17,28): error CS0400: The type or namespace name 'Mono' could not be found in the global namespace (are you missing an assembly reference?) gtk-gui\MainWindow.cs(37,32,37,36): error CS0400: The type or namespace name 'Mono' could not be found in the global namespace (are you missing an assembly reference?) 0 Warning(s) 2 Error(s)
Time Elapsed 00:00:00.08
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Build: 2 errors, 0 warnings
gtk-gui\MainWindow.cs(17,24,17,28): error CS0400: The type or namespace name 'Mono' could not be found in the global namespace (are you missing an assembly reference?)
gtk-gui\MainWindow.cs(37,32,37,36): error CS0400: The type or namespace name 'Mono' could not be found in the global namespace (are you missing an assembly reference?)
0 Warning(s)
From the looks of it, Mono.Posix is missing on your machine.
https://www.monodevelop.com/developers/building-monodevelop/#windows
The Mono libraries package is what you need.
I have installed Mono libraries package.
But you have no reference to Mono.Posix in your build arguments. Try adding one to it and it should work.
Thanks