[MonoDevelop] Bug: Explicitly specifying a value for ProjectTypeGuids in MSBuild .csproj files is causing the project to fail to load
Michael Hutchinson
m.j.hutchinson at gmail.com
Fri May 22 15:17:41 EDT 2009
On Sun, May 10, 2009 at 5:53 PM, Koushik K. Dutta
<koush at koushikdutta.com> wrote:
> Hi all, first time posting here. Let me know if there’s a better/preferable
> way to report bugs. Anyways, there are twp bigs:
Bugzilla.novell.com is the bes plat to report bugs so we can keep track of them.
> If a C# project (.csproj) does NOT contain a ProjectTypeGuids element, it
> will properly load. However, if the guid is defined in the project file with
> the proper explicit value, it fails:
> <ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
> Briefly looking into the code related to this, it seems that the
> parsing/handling of project subtypes is being done properly... Just a bug in
> there somewhere.
Hm. ProjectTypeGuids works well enough for Moonlight, Siliverlight and
ASP.NET MVC projects, which all have the language GUID plus additional
flavor GUIDs. Maybe it only doesn't work if there's just one GUID?
> In addition, I noticed that the CSharpBinding.addin.xml file only contains
> the guid for .NET Projects, and not .NET Compact framework projects (which
> is merely a subset):
>
> <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
> <DotNetProject
> language="C#"
> extension="csproj"
> guid="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
> import="$(MSBuildBinPath)\Microsoft.CSharp.targets"
> resourceHandler="CSharpBinding.CSharpResourceIdBuilder"
> />
> </Extension>
>
> To fix this, I think once the first bug is fixed, this change should support
> loading .NET CF projects:
>
> <Extension path = "/MonoDevelop/ProjectModel/MSBuildItemTypes">
> <DotNetProject
> language="C#"
> extension="csproj"
> guid="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
> import="$(MSBuildBinPath)\Microsoft.CSharp.targets"
> resourceHandler="CSharpBinding.CSharpResourceIdBuilder"
> />
>
> <!-- Add this to support .NET CF C# projects! -->
> <DotNetProject
> language="C#"
> extension="csproj"
> guid="{4D628B5B-2FBC-4AA6-8C16-197242AEB884}"
> import="$(MSBuildBinPath)\Microsoft.CSharp.targets"
> resourceHandler="CSharpBinding.CSharpResourceIdBuilder"
> />
> </Extension>
>
> I’ve attached a patch for the latter problem.
>
>
> I ran into this bug because I have projects that I share between Mac,
> Windows, and Windows Mobile, and I can’t load the projects on OS X without
> patching the .csproj file first.
Hmm. This isn't "real" CF support though, it's just a hack to support
loading the projects, and MD would build them with the full framework
(and the code completion will be from the full framework too). For
real support we'd need to add a corresponding ClrVersion and
TargetFramework, and have framework assemblies and a compiler that
could use them. This would probably be viable if someone wanted to do
it using the Mono link/tuner, especially when the gmcs multi-framework
support is done.
I wouldn't want to add the GUID to main until underlying support
exists, because it would give the false impression that support the
projects. I suggest having a
MonoDevelop.CompactFrameworkSupport.addin.xml that, for now, simply
adds the GUID to the /MonoDevelop/ProjectModel/MSBuildItemTypes
extension point. Anyone who wants to enable the feature can drop the
addin file into ~/.config/MonoDevelop/addins.
--
Michael Hutchinson
http://mjhutchinson.com
More information about the Monodevelop-list
mailing list