How to use Xna Content Compiler on visual studio 2013 - c#

I saw this solution here so I downloaded and tried to run but I've never used XNA and the website from the link doesn't have any instruction/documentation...
Anyone who uses it have any suggestions?
(I don't have xna... I'm trying to use monogame)

Another rather classic solution is to install XNA framework included in Windows Phone SDK 7, create a separate XNA solution just for the purpose of building XNB files.
To get XNA working on your computer (for VS2010 - VS2013) first download Windows Phone SDK 7 and 8 (both of them) from here:
https://dev.windowsphone.com/en-us/downloadsdk
And then you can install XNA implementation for VS2010 - VS2013 from here:
https://msxna.codeplex.com/releases
Once all is installed, just create a new XNA Game solution. XNA will automatically create two projects for you, one of which is "Content" project, where you can place all your assets (pictures, sounds, fonts). After compilation you will get your XNB files created.

Related

Can't create C# Holographic project in Visual Studio 2019

I'm trying to start developing for the Hololens 2.
Instead of using Unity to create a 3D app, my intention is to create a "desktop app" with C#.
After installing the Windows Mixed Reality App Templates from the Microsoft Marketplace, I tried to create a C# project but VS gets stuck in the progress bar while creating the project and after several minutes displays the following message:
This issue is somewhat approached in this MS page: Creating a holographic DirectX project, in which it says:
If your holographic C# project didn't start from the Windows Holographic app template, you'll need to copy the ms.fxcompile.targets file from a Windows Mixed Reality C# template project and import it in your.csproj file to compile HLSL files that you add to your project.
It is clearly a known issue by Microsoft, but that's all there is to it.
Even with VS completely stuck, it does create the files for the project, and all the files mentioned above are present but i does not open properly.
What should I do to make the C# project work? Have anyone else faced this?
PS.: The C++ project template works fine.
Thanks.
When you say you want to create a "desktop app with C#", are you referring to a 2D app or a volumetric app?
2D apps are a breeze, you just create a regular UWP C# project [Blank (App Universal Windows)] and then build and deploy it for ARM64 to your HoloLens 2 and it will just work. No special templates required. Regular UWP apps that run on the desktop also run on the HoloLens. You can do a few things to optimize them for HoloLens and/or Windows Mixed Reality but you don't require any special templates.
See these links for more info:
Designing for Mixed Reality and
Building 2D Apps
If on the other hand you are trying to create a volumetric 3D experience in C# that involves DirectX there is a template in the Windows Mixed Reality templates that leverages SharpDX, look for the "Holographic DirectX11 App (Universal Windows)" the template without the "(C++/WinRT)" trailing text. It is a C# option that leverages the opensource SharpDX wrappers. There is mention of that option near the end of this "Creating a UWP project" section of the
Creating a holographic DirectX project page.

Running Mono C# projects on Mac ... and Winforms

For the first time I am trying Visual Studio for Mac and I located a tutorial for writing a exe that shows a window with a simple menu.
My two questions are:
How does a user of a Mac get the Mono platform? I can't find instructions for deploying Mono. When I look in my exe folder there is no other files. Just the exe.
Maybe this should be a different question but I could not find any "WinForms" version in Visual Studio for mac. I had to use Gtk2 (I think).
If there is a better place to ask these questions please direct me. Thanks.
I know understand that the best course of action was:
Create a Xamarin.Forms multi-platform project.
Create a Cocoa Mac OS project.
Add a reference to project 1 into project 2.
Using Nuget Package Manager download Xamarin.Forms into each project.
Now it is easy to create an application with XAML (similar to WPF).
Visual Studio for Mac creates the multi-platform project (step 1 above) automatically with the Android and iOS platform builds, but not the macOS.
I also see that I don't really need to download Mono as it is all dealt with automatically.
.NET Core does support Mac and Linux. And even though .NET Core now supports Windows Forms. Windows Forms is only supported on Windows. It's unlikely this will ever change due to Windows Forms dependency on the Windows APIs.

vs2012 and xna4 (monogame)

I got totally sick from this "how to install xna for visual studio 2012" thing. I was searching a lot, checked out lot of tutorials, that work half as I want, and I really know that google is my friend.
I noticed that peeps use monogame nowadays, instead of xna. "SURE": so I installed monogame. Totally cool, I saw it in VS2012 too. But content...
It uses xna content as I understood, so xna developers need less time to adopt their game. Cool. Let's see tutorials... they say you should install VS2010 and then hipp-hopp back and forth to have content in your VS2012 project. Now well I do not want that.
I installed windows phone sdk 8 (or what?) so I can add xna4 content and pipeline projects in VS2012 - so... without VS2010.
Cool, but I can not make it work at all. I got content project, with a .X file in it and a .BMP so that has a texture. I added a WindowsPhoneGameLibrary too, and added content reference as well. I compile and the xnb files appear - pretty cool, I say. Then I try to link all this to the main project and nada.. it says it can not be linked (main project is monogame for windows 8 with xaml). OMG why? When I do model = content.load(etc) it can not load, since the file is not there.
So.. my simple question is: how can I make it "just to work"? Without wizardry or manually copying files from here to there, or without installing VS2010, and such or just without getting bald.
Like the others, I think your question is a little ranty and I don't really understand it but I think reading these might help.
Why is XNA not supported in vs2012?
How to install XNA game studio on Visual Studio 2012?
In regards to your content issues:
"When I do model = content.load(etc) it can not load, since the file is not there."
Ensure all art/sound/effect assets File Properties are set properly:
Build Action should be set to Content
Copy To Output Directory should be Copy if newer or Copy Always
You CAN use XNA with VS2012! Don't give up yet! :) Here's how I did it: How to install XNA game studio on Visual Studio 2012?
You can use XNA with VS2012 (I do it all the time). However, if you're using MonoGame (as I understand from the post), you have to use XNA to convert your content into .xnb files and then put them into the MonoGame content folder. You can't use the Content Pipeline in MonoGame. This might help: http://blogs.msdn.com/b/tarawalker/archive/2012/12/04/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-1-overview-installation-monogame-3-0-project-creation.aspx. Even though it's Windows 8, I don't think that XNA development is different on Windows 7 and 8 (the window will just look different).
Also, if this answer helped, please mark it as the correct answer :). I'm new to the site and could use the reputation ;).

Can't add new monogame content project to solution in VS2012

I'm trying to add a new MonoGame content project (via templates installed in the MonoGame 3.0 installer) to an existing solution in Visual Studio 2012 (Professional), but it always comes up with the following dialog box:
It does create a few empty folders where the project should be, though they don't have anything in them. After this popup it also comes up with this:
I do not have XNA installed as VS2012 does not support it.
Also, I am using Windows 7.
Thank you!
If i were you I would read the three blog posts that Tara Walker has made about Windows 8 game development starting with this one: Overview, Installation and MonoGame 3.0.
The third blog post talks about creating a Content Pipeline outside of Mono Game (using XNA) and importing it into your MonoGame project. It sounds like you will need XNA so you'll need to read through her information and figure out how to get it working in VS2012 Express.
I've been dabbling with a MonoGame project in my spare time and I have been able to load some textures and sprite sheets without a dedicated content project; everything is just added to the project solution and created during initialization of the main class. But I don't know if this is viable in the long term.
HTH.
Mono Content Project depends on the XNA as MONOGAME is still working on truly independent CONTENT MANAGER. So as off now we have to intall XNA. Download it from XNA zip and unzip the content because XNA is not officially supported by MS.
Read the attached readme and install as mentioned. Don't forget to intal the file in zip folder named
"XNA Game Studio 4.0 (2012).vsix" which installs the "XNA" template for VS.
Now try to create a sub-project for your content. Your problem should be fixed !!

Change Windows Application project to XNA project?

Is there anyway to easily do this? Changing the Target framework or other properties doesn't work.
You can look for more clues in the XNA Windows game project template, found in this path:
VS_INSTALLDIR\Common7\IDE\VPDExpressExtensions\Microsoft\XNA Game Studio 4.0\ProjectTemplates\XNA Game Studio 4.0
Look for the Windows Game template called XnaWindowsGame-v4.0.zip
A simpler way may be creating a new Windows project, and a new XNA project, and comparing the .csproj files for both projects using a text editor (.csproj is nothing but a custom XML file).
I suspect the XNA project has a few extra tags in it specifying XNA related information, but in its essence it compiles to a Windows executable, so making these changes to the Windows .csproj file should "convert" it into an XNA project.

Categories

Resources