Click here to Skip to main content
15,897,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am writing a program using SharpDevelop 4.0 and I have included DirectX 1.0.2902.0, Direct3D 1.0.2902.0 and Direct3DX 1.0.2902.0 as my references. I have also added these references to my using section at the top of my class file.
When defining some private properties to be used only within my class, see below...

C#
namespace New
{
	public partial class MainForm : Form
	{
	private Microsoft.DirectX.Direct3D.Device device;        		                
        private Microsoft.DirectX.Direct3D.VertexBuffer vb;
        //private Microsoft.DirectX.Vector3 CameraPos;        
 
        //private Matrix matView;
        //private Matrix matProjection;
 
        private int LastTickCount = 1;
        private int Frames = 0;
        private float LastFrameRate = 0;
        private Microsoft.DirectX.Direct3D.Font text; 
		public MainForm()
		{
			InitializeComponent();
			this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);			
		}	      	
	}
}


I have prefixed the problematic lines with // which allow the window to appear. If I removed the // from any of these lines, the window will not appear upon compilation.

My output gives me several warnings about declaring variables that I haven't used, but one of them is of real interest, it says "Found conflicts between different versions of the same dependent assembly. (MSB3247)". This warning might not have anything to do with the problem with the window because this warning appears when the window is displayed or not.

Very odd, can anyone help me please. I don't have a clue as to why this should have any affect upon the window appearing or not. Thanks
Posted
Updated 7-Aug-11 5:53am
v2

Have you tried looking at the IL output from those lines - it should be very short and to the point.

However, Microsoft.DirectX.Vector3 is a structure, so I'm not sure if it will call a constructor on that one (it being a value type). If so, then the IL will tell you.

It may well be the version conflict - it is going to be well worth eliminating that if you can. There is a thread here that may help: http://stackoverflow.com/questions/1871073/resolving-msb3247-found-conflicts-between-different-versions-of-the-same-depend[^]
 
Share this answer
 
How would I be able to debug using IL. My dos doesn't recognise the command for ilasm. I've tried running this program on a virtual machine as well that had no previous installs. I installed .net3.5 sp1 and .net4 (requirement for SharpDevelop) and of course sharpdevelop. I loaded the code from my program above and the error panel outputted the same messages, and again only when I comment out the Vector or Matrix declarations does the window appear upon compilation.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900