I am trying to start a new project for mac using MonoGame. I have installed everything I believe is required but when I run the new project (mono game logo should pop up) I get these two lines in the output:
Loaded assembly: /Users/Kristin/Projects/Test/Test/bin/Debug/Test.app/Contents/MonoBundle/Test.exe
Loaded assembly: /Users/Kristin/Projects/Test/Test/bin/Debug/Test.app/Contents/MonoBundle/MonoMac.dll [External]
and the new application that is started hangs without popping up a window. I tried following the steps on this page: http://jamie.ly/wordpress/programming/software/setting-up-a-monogame-mac-application-with-xamarin-studio/
but nothing seems to be solving my problem. Any ideas?
I know its late but I just joint monogame and found the solution:
To make it work follow the following steps:
Install the latest xamarin studio from http://xamarin.com/studio
Next download the monogame files from https://monogame.codeplex.com/releases/view/102870
choose the xamarin version on mac
Next install the templates by opening xamarin studio. Next click on the top Mac menu "Xamarin Studio" Addin Manger and choose install from file and select your donwloaded file...
so far so good but your png files will not be loaded from here... so solve this issue follow the next steps:
visit the git page from monogame and download it: https://github.com/mono/MonoGame
after Downloading and unpacking the zip file go into the folder and look open the following file by using xamarin studio
MonoGame.Framework.MacOS.sln
Now Xamarin studio should open up and include 2 Projects: Lidgren. ... and Monogame.Framework.MacOS
on the top of Xamarin studio (besides the play button you should see Debug click on it and change it to Release
now do a right click on the Monogame.Framework.MacOS project and build it new
This should be done without any errors but you may get warnings... we do not pay attention on them :D
next do you need to go again to the downloaded Monogame folder from where you opened the MonoGame.Framework.MacOS.sln project.
But this time you need to dive more deep into the folder structure: look for the following folder --> MonoGame.Framework/bin/MacOS/Release
the files in the release folder are now your new libraries...
You can copy this libraries where ever you want but you should know where they are because you need to add them to your new monogame project.
Next open up Xamarin studio and create a new Monogame project by using the already installed templates...
Choose the Monogame Mac Application Template
We are now almost done:
Look for the reference "folder in the project tree inside of Xamarin studio" and do a right click on Monogame to delete the reference...
Now you need to add new references by right click on reference.
Access the .Net-Assemblies and add your files from the MonoGame.Framework/bin/MacOS/Release/- folder (make sure that you add all of them)
The final step now is to expand your Content folder in Xamarin studio and do a left click on the logo.png file.
on the left side of the IDE you can find Properties. In the properties change 3rd from top to content instead of none.
If you run now the template the graphic should be loaded without any problems :D
I TESTED IT ON SEVERAL MACHINES IT WORKS THAT WAY!!!!
ENJOY
regards
Schreda
Related
I have updated to version 17.3.1 of Visual Studio a few weeks ago and just tried to create a windows forms project which is very similar to an existing windows forms project. I wanted to copy the controls from the existing project into the new project but found that when I copy the control (using copy or Ctrl-C) and move to the new project and attempt to paste the paste option is "greyed" out or disabled. Has something changed where I need to enable pasting.
Your help is appreciated.
Brad
I'm trying to build a Godot mono project that I've just cloned from my repo that works on my other machine.
When I try to build in Visual Studio I get the error
error CS0246: The type or namespace name 'Godot' could not be found (are you missing a using directive or an assembly reference?)
I can replicate this by creating a basic empty scene project in Godot and opening the new solution in Visual Studio and trying to build.
There are a few scenarios where this issue can present itself:
Cloning from a repo where the project builds elsewhere but on this new machine it doesn't
Trying a new IDE: Visual Studio, Rider, VS Code
New team members joining
On continuous integration systems
The solution is in a response from KellyThomas on a Github issue here
The godot mono assemblies are placed in your project's
.mono/assemblies directory during the process of building your
project.
scene (play buttons are in top left corner of the godot window) or
clicking the build button on the mono panel (center-bottom in the same stack as output, debugger etc).
running your project / scene (play buttons are in top left corner of
the godot window) or
clicking the build button on the mono panel (center-bottom in the same stack as output, debugger etc).
So the reason the project isn't building is that your IDE or build system doesn't have the required dll that is normally put there by the Godot program itself when you run a build from there.
For a local Dev machine the solution is to build or run the project in Godot once and it will place the dll in the correct folder where it will remain allowing builds to be created by other applications ie Visual Studio or Rider(if you use the Rider plugin for Godot I believe it will create the dll for you).
On a CI the approach is a bit different as we're starting fresh every time and we don't necessarily want to run Godot Build when can use something like MSBuild.
My solution to this is to store a copy of the required DLL outside the working directory and copy it to the build folder before the MSBuild step is run.
The required DLL for building Godot 3.4.4 Mono projects at the time of writing is GodotSharp.dll. I suspect you will have to copy a new version of this DLL every time you upgrade Godot.
Do a manual one time build of a Godot project to generate the DLL (basic hello world is fine). After building the project in the Godot Application the DLL is stored in a folder next to the solution file (.sln) for the project. The folder depends on the configuration of your build.
.mono/assemblies/Debug
.mono/assemblies/Release
In OSX the .mono folder is hidden, press cmd + shift + . to see the folder in the finder.
This is how I get the file copied to the correct folder on Azure Devops using a yaml pipeline.
- task: CopyFiles#2
inputs:
SourceFolder: $(Agent.BuildDirectory)/GodotDlls/3.4.3
Contents: '**'
TargetFolder: $(binariesPath)/.mono/assemblies/Release
I am trying to use not the nuget package but the project itself from the media plugin for xamarin forms.
I am adding all the references and upon build (or even clean) i get :
Error: The specified language targets for uap10.0.16299 is missing. Ensure correct tooling is installed for 'uap'. Missing: '/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/xbuild/Microsoft/WindowsXaml/v16.0/Microsoft.Windows.UI.Xaml.CSharp.targets' (Media.Plugin)
I beleive it is looking for the windows SDK which isnt isntalled on my mac and the project itself only supports android and ios.
Using the nuget package, I can check that I only want ios and Android and it works fine, but upon loading the project in as the project it gives me this error.
In the dependencies folder of the project it is still referencing this UAP 10.0.16299 but upon right click all I can do is "refresh".
How can I build my project and leave out this windows crap?
First include the whole project, then edit the CS proj file (right click on solution -> edit project file).
In the first few lines it says: <TargetFramworks...
Remove the unwanted dependencies. They will be gone in the main folder if you save.
Thats it.
I am using Visual Studio 2019 with .NET extension .
Everything was working fine, i.e all my C# codes and projects were executing fine on F5 when suddenly the options went dead . I am farely new to Visual Studio and cant seem to get my head around this problem . If anyone can suggest anything , it would be of great help.
Basically,
Go to project properties -> Build Tab. Then click Advanced button on the right bottom corner of the pane. Change "Debug Info:" to "full" and click OK.
If it is like that, then change it to "full" like below:
Visual Studio not running / debugging code anymore
Please try these suggestions:
Suggestions
unload your current project by right-click on your project-->Unload your project and then close VS Instance, enter your project path, delete .vs hidden folder, bin, obj folder and then restart your project again.
Then Upload the project, right-click on the project-->set as startup project to test.
reset VS settings by Tools-->Import and Export Settings-->Reset all settings
disable any other third party extensions under Extensions-->Manage Extensions
restart your VS and then rebuild your project
try to create a new empty default project and then test again whether the issue persists, if so, you should try to do a repair in VS Installer, if not, I think the issue is related to your project itself.
same issue in VisualStudio Code, with Dotnet5 API angular MVC application
for me it was the generated main.js file in wwwroot folder. deleted the folder and ran ng build --prod again and got a new one with current code.
I'm following the Hololens Developer 100 course from Microsoft. All goes well until I get to building. I follow the instructions exactly here and click build. It asks me to select a folder and I create a folder called "App" (per the instructions) and select that folder. When I finally hit build Unity seems like it's working fine but then two things go wrong:
1) The .sln file that's generated is not in the App folder, but in the parent project folder. The App folder is empty
2) When I open the .sln file, it's empty. The tutorial asks me to edit Package.appxmanifes, but I can't because it doesn't seem to have built.
Is there a configuration somewhere that's not correct? Perhaps Unity and VS aren't talking to eachother correctly? More Importantly, how do I fix it?
I had the same problem, for me it was that I didnt have the Windows 10 SDK installed as part of Visual Studio 2015 with Update 3, in the instructions there is a bit that says:
"If you choose a custom install, ensure that Tools (1.4) and Windows 10 SDK (10.0.10586) is enabled under Universal Windows App Development Tools node. All editions of Visual Studio 2015 Update 3 are supported, including Community."
If your hololens build completes successfully a file explorer window will pop open at the project level. If it fails you should find errors in the console tab of Unity.
The SLN file that is at the project level is a solution file that you can open in visual studio to edit unity code and attach to the unity editor to do real time debugging while running your solution in the editor. In fact if you click on a "CS" file in the project tab of Unity this is the solution that opens in visual studio.
The SLN file you are looking for is in the App folder. Once you open the SLN in visual studio set the configuration to Release and x86, and you should be able to target your build at either a "Remote Device" which is the hololens, or the hololens emulator if you have that installed.