Assembly generation failed

J

Jim

I am trying to compile a demo from the XNA site and I get this error

Error 1 Assembly generation failed -- Error emitting
'System.Runtime.InteropServices.GuidAttribute' attribute --'Incorrect
UUID format.' MarbletsWindows

The only place I can see this assemble being used is here:

// The following GUID is for the ID of the typelib if this project is
exposed to COM
[assembly: Guid("$guid1$")]

I am a Delphi guy and just starting to learn C#. What does this line
mean? I can't find guid1 defined anywhere else in the project.

Using Visual C# 2008

Any thoughts?

Thanks.
Jim
 
T

thomasnguyencom

I am trying to compile a demo from the XNA site and I get this error

Error   1       Assembly generation failed -- Error emitting
'System.Runtime.InteropServices.GuidAttribute' attribute --'Incorrect
UUID format.'   MarbletsWindows

The only place I can see this assemble being used is here:

// The following GUID is for the ID of the typelib if this project is
exposed to COM
[assembly: Guid("$guid1$")]

I am a Delphi guy and just starting to learn C#.  What does this line
mean?  I can't find guid1 defined anywhere else in the project.

Using Visual C# 2008

Any thoughts?

Thanks.
Jim
--www.mustangpeak.net

Is the $guid1$ replaced with a valid GUID during build? GUIDs have a
specific format. You can generate on one the fly, but not sure what
your app is using it for.

Guid guid = Guid.NewGuid();

http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.guidattribute(VS.80).aspx
http://msdn.microsoft.com/en-us/library/system.guid.newguid.aspx

Thanks,
-tom
 
F

Fernando A. Gómez F.

Jim said:
How do I convert the GUID to a string in C#?

Jim

With ToString, of course:

string str = Guid.NewGuid().ToString();

The overloads provide different format options.

Regards.
 
F

Family Tree Mike

It really looks like you have a preprocessor item in the code. The []
brackets look like a method or class attribute, so going down the line of
generating a guid an converting to a string in C# does not really apply.
 
J

Jim

Family said:
It really looks like you have a preprocessor item in the code. The
[] brackets look like a method or class attribute, so going down the
line of generating a guid an converting to a string in C# does not
really apply.

I'm an idiot. The XNA was a TEMPLATE not a compilable app. Once I
created a new project USING the template the new project contained this:

// The following GUID is for the ID of the typelib if this project is
exposed to COM
[assembly: Guid("478674fe-a18a-4c57-b8ba-a0cb73ff6fdd")]

Thanks,
Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top