This project is read-only.

Tutorials code does not run. Tutorial16 GetVertexInput not implemented.

Nov 3, 2008 at 3:00 PM
System.TypeLoadException was unhandled
  Message="Method 'GetVertexInput' in type 'Tutorials.Tutorial_16.Shader.Tutorial16' from assembly 'Tutorials, Version=, Culture=neutral, PublicKeyToken=null' does not have an implementation."
       at System.Reflection.Assembly._GetExportedTypes()
       at System.Reflection.Assembly.GetExportedTypes()
       at Tutorials.TutorialChooser.FindTutorials(SortedList`2 types) in C:\Documents and Settings\Evgeni Petrov\My Documents\Visual Studio 2008\Projects\NanoBot\xen 1.1\xen\src\Tutorials\TutorialChooser.cs:line 81
       at Tutorials.TutorialChooser.ChooseTutorial() in C:\Documents and Settings\Evgeni Petrov\My Documents\Visual Studio 2008\Projects\NanoBot\xen 1.1\xen\src\Tutorials\TutorialChooser.cs:line 62
       at Tutorials.Program.Main(String[] args) in C:\Documents and Settings\Evgeni Petrov\My Documents\Visual Studio 2008\Projects\NanoBot\xen 1.1\xen\src\Tutorials\Program.cs:line 35

Hello, I wonder if I can fix this problem somehow? If not how shall I run the tutorial code?
Nov 3, 2008 at 9:04 PM

That is very strange.

Can you send me a copy of Shader.fx.cs in the Tutorial16 directory. Something has gone wrong compiling it.

Can you try right clicking Shader.fx, and choosing 'run custom tool'. This will rebuild the shader.


Nov 3, 2008 at 10:31 PM
Edited Nov 3, 2008 at 11:33 PM
Well, the shader is the same as the last release. I see no point of uploading it.

I do run the full xna 3.0 though! I wonder if this has anything to do with the problem.

Anyway I will go through the code. It has excellent commenting! (grats) And will try to build some framework on it.

I have been going around the net, trying to find something to use as game engine. I am leader of a team of 4 students.
We are going to be competing in imagine cup this year.

update: I manage to get the tutorials running from separate solution but when I reached the third one. The tool that you are talking about. I am not sure how to make it work for my own solution. As such it does not create a class connected with the effect.

Nov 3, 2008 at 11:34 PM


I'm sorry I wasn't more specific.

The shader custom tool generates a code file that gets attached to the shader files. So Shader.fx.cs file is the code file for the Shader.fx shader. The error you are getting means something has gone wrong with the custom tool, and it'd help if I could have a look at the output it generated. This file is also generated as part of the prebuild - so something may have gone wrong there. If you right click the shader, and select 'run custom tool', then it will regenerate the .fx.cs code file - and hopefully fix the problem.

Thank you for the positive comments! It's always great to hear back from people - and it helps me improve things even more.

Best of luck

Nov 3, 2008 at 11:42 PM
Thank you for the answer!

It did work! After some tries. Maybe something went wrong with the tool! No idea.

My question still stands. How can I run this tool when I create my own solution?

Some comments:
I love the idea how everything is organized! I am new to 3D programming and is really difficult for me to manage all the stuff I need to do!
But XEN seems to make everything neat and clean. I think we might be using your offspring for our project. Cheers!
Nov 4, 2008 at 1:25 AM
Edited Nov 4, 2008 at 1:29 AM

Tutorial 03 gives some detail on how shaders are used in xen.

In short, you add the shader to your game project. Not the content project. Then, select the file, in it's properties window (F4 will show this window) set the 'Custom Tool' field to 'XenFX'. From this point on, whenever you modify the file within visual studio, the plugin will generate/update a matching C# source file for that shader. You then directly use the classes defined in this source file.

There is also a command line tool included with the plugin (.\xen\bin\Xen.Graphics.ShaderSystem.CustomTool\cmdxenfx.exe). This can be used to compile the shaders manually, and is smart enough to only update shaders that have changed (or if the tool changes). The prebuild uses this.

I hope that helps.