I am trying to use MonoDevelop 3.0.3.2 to create a MonoMac application. I created a new MonoMac solution and tried running the template created after creating the solution, but this is my build output:
Building Solution: MAC1 (Debug|x86)
Building: MAC1 (Debug|x86)
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/2.10.9/bin/dmcs /noconfig
"/out:/Users/zgillis/Projects/MAC1/bin/Debug/MAC1.exe"
"/r:/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/System.dll"
"/r:/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/System.Xml.dll"
"/r:/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/System.Core.dll"
"/r:/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/System.Xml.Linq.dll"
"/r:/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/System.Drawing.dll"
"/r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.MonoMac/MonoMac.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 /platform:x86
"/define:DEBUG" /t:exe "/Users/zgillis/Projects/MAC1/MainWindow.cs"
"/Users/zgillis/Projects/MAC1/MainWindowController.cs"
"/Users/zgillis/Projects/MAC1/MainWindow.designer.cs"
"/Users/zgillis/Projects/MAC1/Main.cs" "/Users/zgillis/Projects/MAC1/AppDelegate.cs"
"/Users/zgillis/Projects/MAC1/AppDelegate.designer.cs"
Copying content files
Copying '/Users/zgillis/Projects/MAC1/bin/Debug/MAC1.exe' to
'/Users/zgillis/Projects/MAC1/bin/Debug/MAC1.app/Contents/MonoBundle/MAC1.exe'
Copying '/Users/zgillis/Projects/MAC1/bin/Debug/MAC1.exe.mdb' to
'/Users/zgillis/Projects/MAC1/bin/Debug/MAC1.app/Contents/MonoBundle/MAC1.exe.mdb'
Build complete -- 0 errors, 0 warnings
Updating application manifest
---------------------- Done ----------------------
Build successful.
Build failed. The given key was not present in the dictionary.
I am running Mac OS X Snow Leopard (10.6.8), and my Xcode version is 3.2.2.
It will not allow me to compile even the default MonoMac template, so I know I must have something configured incorrectly. I appreciate the help.
It looks like your version of Xcode is old - it's likely that MonoDevelop's support for reading values from the older Apple SDKs' plists has regressed. I would suggest you either upgrade Xcode, or file a bug with the MonoDevelop log file (found in ~/Library/Logs/MonoDevelop-3.0) attached.
Related
How is this possible?
I installed .net sdk 6.0.405: dotnet-sdk-6.0.405-win-x64.exe
I can in windows terminal and power shell run: dotnet --version: 6.0.405 ✅
I CAN ALSO IN VSCODE IN ITS BUILTIN TERMINAL, run: dotnet --version: 6.0.405 ✅✅
But in the OUTPUT tab, choosing OmniSharp Log from the dropdown, it says:
[ERROR] A .NET 6 SDK for x86_64 was not found. Please install the latest x86_64 SDK from ...
I switched vscode explorer settings to use external terminal.
And this terminal setting to command prompt:
Terminal › Integrated › Default Profile: Windows
The default profile used on Windows. This setting will currently be ignored if either terminal.integrated.shell.windows or terminal.integrated.shellArgs.windows are set.
I have dotnet in the PATH (and it works in terminals and in vscode's terminal)
I restarted vscode, AND REINSTALLED the dotnettools "C# for Visual Studio Code (powered by OmniSharp)" extension. I went to the online store and from the right column under Resources I downloaded the ms-dotnettools.csharp-1.25.2#win32-x64.vsix to make sure I get the right one. And restarted vscode.
I tried this setting:
Omnisharp: Dotnet Path
Specified the path to a dotnet installation to use when "useModernNet" is set to true, instead of the default system one. This only influences the dotnet installation to use for hosting Omnisharp itself. Example: "/home/username/mycustomdotnetdirectory".
C:/Program Files/dotnet/sdk/6.0.405
And this setting:
Omnisharp: Sdk Path
Specifies the path to a .NET SDK installation to use for project loading instead of the highest version installed. Applies when "useModernNet" is set to true. Example: /home/username/dotnet/sdks/6.0.300.
C:/Program Files/dotnet/sdk/6.0.405
And restarted vscode. And now it says:
[ERROR] Error: Command failed: dotnet.exe --version
'dotnet.exe' is not recognized as an internal or external command,
operable program or batch file.
What? W H A T? lol
What could be wrong? Why isn't it saying where it expected to find it and what to do to locate it? Is there a setting to specify the dotnet.exe path to this C# extension? Does it need always-on internet or something? Does it have DRM? Does it need Edge installed? Wtf?🙂
🙃😭 I just need intellisense; and I've wasted 2h, on only microsoft-owned products.
#Microsoft 0/5 stars
Still don't know why it happens, but here's how to solve it:
The problem was from this: I like to keep all my visual studio code extensions as .vsix files locally in folders so I can remember and get them easily & offline. Sensible enough choice, and I had the correct ms-dotnettools.csharp-1.25.2#win32-x64.vsix for my platform.
But in VSCode, when I install this particular extension via VSIX, even though it succeeds, it can't find .net. If you instead install the extension "normally", ie via vscode's own download, it seems vscode does some extra configuration steps while installing, and probably sets the .net paths correctly or something. Because now it works.
So TL;DR: don't install ms-dotnettools.csharp via vsix, it seems bugged. 😶
Would love to see an answer explaining what's wrong / how to actually do via vsix; but I don't have any more time to debug this rn.
I created a simple Windows UWP solution with windows visual studio 2019.
I did not make any changes to it but closed visual studio.
Then I wrote a simple cmake file for it.
However, it fails in "cmake --build" like this:
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(268,9):
error MC6000: Project file must include the .NET Framework assembly
'WindowsBase, PresentationCore, PresentationFramework' in the reference list.
[App1\out\App1.csproj]
When I add the requested .NET files with VS_DOTNET_REFERENCES property, there is a different error:
App1\MainPage.xaml(9,5): error MC3074: The tag 'ThemeResource' does not exist
in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'.
Line 9 Position 5. [App1\out\App1.csproj]
I also tried adding all and combinations of these calls to CMakeLists.txt but they did not have any effect:
set_property (SOURCE "App.xaml" PROPERTY VS_XAML_TYPE "ApplicationDefinition")
target_compile_options (App1 PRIVATE "/langversion:default")
set_property (TARGET App1 PROPERTY DOTNET_TARGET_FRAMEWORK_VERSION "v4.7.2")
set_property (TARGET App1 PROPERTY WIN32_EXECUTABLE TRUE)
I cannot overcome these problems.
I generate and compile the solution like this:
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0 -S . -B out
cmake --build out
Cmake version is 3.14.19050301-MSVC_2.
The source files are here, including the original by visual studio created solution files and my written CMakeLIsts.txt file.
Expected result would be a cmake compiling solution which looks as much as possible like the native solution.
Probably there is just a simple error but I cannot find it.
My current process is approximatly:
I start with a Disk image of Window 7 x64 with only:
Unity 4.3.3f1, Located 'C:\Program Files(x86)\Unity'.
The adt-bundle-windows-x86-20131030. 'C:\Users\Will\adt...'.
The Java 32bit runtime 1.7.0_51-b13, 'C:\Program Files(x86)\Java'.
'C:\Program Files(x86)\Java\jr7\bin;' is manually added to my 'Path' Environment Varible.
As it is I can cleanly deploy Android projects, however I want to use the official Facebook SDK plugin. At this point on my first attempt to install the plugin I dropped it into a project as per the official 'Getting Started' tutorial and this is where I get a bit lost. Even though there is no mention of it in the 'Getting Started' tutorial I find that OpenSSL is a dependancy of the SDK.
So I install the OpenSSL binary 'Win32OpenSSL-1_0_1f' to 'C:\Program Files(x86)\OpenSSL-Win32' and when the plugin still can't find it I add 'C:\Program Files(x86)\OpenSSL-Win32\bin;' to my 'Path' Environment Variable.
At this point The plugin's 'Debug Key Hash' starts working and I naievly assume that everything is correct, However; When I attempt to deploy a build I recieve the following error:
Error building Player: Win32Exception: ApplicationName='C:\Program Files (x86)\Java\jre7\bin\javac.exe', CommandLine='-bootclasspath "C:/Users/Will/adt-bundle-windows-x86-20131030/adt-bundle-windows-x86-20131030/sdk/platforms/android-19\android.jar" -d "C:\Users\Will\Documents\Unity Projects\test\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding ascii "com\DefaultCompany\test\R.java" "com\facebook\android\R.java"', CurrentDirectory='C:\Users\Will\Documents\Unity Projects\test\Temp\StagingArea\gen'
and the build process is halted.
Could anyone help explain where I am going wrong and to get this plugin to behave?
I had the exact same issue - I've solved it by deleting the JAVA_HOME environment variable that pointed to a directory containing JRE (instead of JDK). You also seem to only have JRE installed and the javac.exe file is not part of that package. Alternatively, point JAVA_HOME to the directory on your machine that does have JDK (and javac.exe) installed.
I'm running VS 2010 and I have a project which was originally set to build to .NET 4.0. This rev of .NET is too high for many of the windows platforms this app is expected to run and so I switched it from .NET 4.0 to .NET 2.0. Now, the project doesn't build.
At first I was getting null reference exceptions with the project resources. I found this link on MSDN forums which proved helpful in fixing that issue. Essentially, the answer (among the many) that worked was to change all instances of:
Version=4.0.0.0
to
Version=2.0.0.0
... in the *.resx files. I did this to all *.resx files I could find in the project directory. Walla, no more null reference exceptions during the build. However, now the project simply fails to build and the build window offers nothing in way of help to resolve. This is literally what's there:
2>CoreCompile:
2> C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /platform:x86 /errorreport:prompt /warn:4 /define:TRACE /reference:C:\Users\afalanga\Dev\Tools\Program\FrontEnd\Resources\WrapNativeLibrary.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Deployment.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Management.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug:pdbonly /filealign:512 /optimize+ /out:obj\x86\Release\FrontEnd.exe /resource:obj\x86\Release\FrontEnd.Panel.resources /resource:obj\x86\Release\FrontEnd.PrivilegesForm.resources /resource:obj\x86\Release\FrontEnd.Main.resources /resource:obj\x86\Release\FrontEnd.Properties.Resources.resources /resource:obj\x86\Release\FrontEnd.SoftwareLicense.resources /resource:Resources\WrapNativeLibrary.dll,WindowsUpdateTool.Resources.WrapNativeLibrary.dll /resource:Resources\INativeLibrary.dll,FrontEnd.Resources.INativeLibrary.dll /target:exe /win32icon:Resources\FrontEnd.ico /win32manifest:Resources\app.manifest Environment.cs Check.cs Exceptions.cs Updater.cs LibAccess.cs PrivilegesForm.cs Form1.Designer.cs OSInfo.cs Constants.cs PersonalizationManager.cs Silent.cs drivePanel.cs drivePanel.Designer.cs Main.cs Main.Designer.cs Program.cs Properties\AssemblyInfo.cs SoftwareLicense.cs SoftwareLicense.designer.cs VerticalProgressBar.cs Properties\Resources.Designer.cs Properties\Settings.Designer.cs
2>
2>Build FAILED.
Is it due to the fact that the C# compiler being referenced is the 4.0 version? At this point, I'm completely at a loss for what to check. I'm considering a fresh checkout of the branch for this code from TFS and trying there but haven't gone that route yet. I would appreciate any insight as everything I can see from the project properties says it should be targeting .NET 2.0 and it "should" build.
Thanks,
Andy
When you're downgrading your build target, you might be better off to start with a new project, change the build target then import your code into it. This way all your core dependencies start out right, and you'll only have to worry about the code being able to work.
I have a .net application built on .net framework 3.5, I am trying to build this application on Jenkins CI server. I've added MSBuild plugin and and have added path to the .exe file of 2.0, 3.5 and 4.0 versions of MSBuild. But my building processes are failing by showing the below error message.
Path To MSBuild.exe: msbuild.exe
Executing command: cmd.exe /C msbuild.exe Neo.sln && exit %%ERRORLEVEL%%
[Test project] $ cmd.exe /C msbuild.exe Neo.sln && exit %%ERRORLEVEL%%
'msbuild.exe' is not recognized as an internal or external command,
operable program or batch file.
Build step 'Build a Visual Studio project or solution using MSBuild.' marked uild as failure
Finished: FAILURE
Could anyone plz help me out..??
To make the MSBuild plugin work, you need to configure the plugin in the Jenkins management screen.
NOTE: in the newer Jenkins versions you find the MSBuild configuration in the Global Tool Configuration:
Note the "Name" field, where I've called this particular configuration v4.0.30319. You could call it anything you like, but ideally the name will somehow refer to the version.
You'll need to refer to this name later in the Jenkins PROJECT that's failing.
Note: The yellow warning implies that the Path to MSBuild field should be populated with a directory name rather than a file name. In practice you do need to enter the filename here too (ie. msbuild.exe) or the build step will fail.
In the Jenkins project that's failing, go to the MSBuild build step.
The first field in the build step is "MSBuild Version". If you created the build step before configuring any MSBuild versions, the value here will be (default).
After configuring one or more MSBuild versions, the drop down will be populated with the available configurations. Select the one you require.
You can see here that I've now selected the named configuration that matches the installation above.
Jenkins | Manage Jenkins | Configure System
scroll down to the MSBuild section and click MSBuild installations
define the full path to msbuild.exe, on my system I have 3.5 and v4.0.30319
Note - specify the path to 32-bit tools even on a 64-bit system, otherwise you might get an error message:
Building Windows Phone application using MSBuild 64 bit is not supported.
So in Jenkins - it could be for example:
Name: Version 3.5
Path: C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe
Name: Version 4.0
Path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSbuild.exe
I think you should set an absolute path for "msbuild.exe" in your Jenkins configuration,
for example:
C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe
You can also add the path where the msbuild.exe is, to the PATH system environment variable of the node (or nodes) that is running that specific job.
You could try executing the
%comspec% /k ""c:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
command, which will temporarily update your environment path variables to reflect the VS2010 build environment. Execute this before you call MSBUILD and see what happens. I use this in my own build scripts with no issues.
Side note; it's very likely counterproductive to have multiple versions of MSBUILD on your PATH. Concentrate on getting one version working and go from there.