I am using the Walkthrough: Part 1 - Creating a basic project system in the same way as written on the website http://msdn.microsoft.com/en-us/library/cc512961.aspx and Managed Package Structures for projects in exactly the same way as downloaded from http://mpfproj11.codeplex.com/ . I tested the walkthrough on several development machines in Visual Studio 2013. I also tested this in Visual Studio 2010 and 2012 using their respective SDKs. In each of the tests, the same problems were present.
Problem: I get an exception. An exception of type "System.FormatException" occurred in mscorlib.dll, but was not handled in the user code. Additional information: Guid must contain 32 digits with four dashes (xxxxxxxx-xxxx-xxxx- xxxx-xxxxxxxxxxxx) in the method of the ProjectNode class:
private void SetProjectGuidFromProjectFile()
{
string projectGuid = this.GetProjectProperty(ProjectFileConstants.ProjectGuid);
if (String.IsNullOrEmpty(projectGuid))
{
this.projectIdGuid = Guid.NewGuid();
}
else
{
Guid guid = new Guid(projectGuid);
if (guid != this.projectIdGuid)
{
this.projectIdGuid = guid;
}
}
}
In line Guid guid = new Guid(projectGuid);
projectGuid returns the string "$ guid1 $", which is from from <ProjectGuid>$guid1$</ProjectGuid>in SimpleProject.myproj.
Break points in the Load method of the ProjectNode class indicate that
this.projectIdGuid = Guid.NewGuid();
returns a new pointer, for example {6d4b8668-51ca-40eb-b013-9e7f96b82b68}.
ProjectNode this.SetProjectGuidFromProjectFile(), , . <ProjectGuid>$guid1$</ProjectGuid> SimpleProject.myproj, , , , , ..myproj ? , .