VS2010

Topics: Developer Forum, Project Management Forum, User Forum
Sep 15, 2009 at 5:00 PM

Is there a version that works with vs2010 beta 1?

 

thanks,

Clayton

Coordinator
Sep 15, 2009 at 7:20 PM

I haven't tested SHFB with .NET 4.0 or VS2010 projects yet but it should be able to work with .NET 4.0 assemblies.  Leave the FrameworkVersion property set to 3.5 since it won't recognize 4.0 internally just yet.  Somebody reported to me that Sandcastle's MRefBuilder has issues with .NET 4.0 assemblies but it can be made to work by creating a configuration file for it that tells it the supported runtime versions.

I've got a virtual machine built but haven't got around it installing VS2010 on it yet.  I plan on doing so shortly.

Eric

 

Coordinator
Sep 15, 2009 at 7:23 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Oct 27, 2009 at 4:58 PM

I have some problems with VS 2010 Beta2 + SDK VS 2010 Beta 2.

I have tried to switch to target  runtime 4.0.21006 and 4.0.20506, and got:

Generating reflection information...

[C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe]

GenerateRefInfo:

MrefBuilder (v2.4.10520.1)

Copyright c Microsoft 2006

Unknown target platform version '4.0'.

If I use 3.5 and add  runtime support in MRefuilder.exe.config file I got:

Generating reflection information...

[C:\Windows\Microsoft.NET\Framework64\v3.5\MSBuild.exe]

GenerateRefInfo:

MrefBuilder (v2.4.10520.1)

Copyright c Microsoft 2006

Info: Loaded 9 assemblies for reflection and 9 dependency assemblies.

MREFBUILDER : error : Unresolved assembly reference: PresentationFramework (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) required by ...

Last step completed in 00:00:01.9641

Adding reference to PresentationFramework do nothing.

Any ideas?

Coordinator
Oct 27, 2009 at 7:47 PM

The current version of SHFB doesn't support .NET 4.0 assemblies correctly yet when using solutions or project files as documentation sources.  It sees the 4.0 framework version in the VS project and overrides the version in the SHFB project since it's a later version.  To work around the issue, set the SHFB project's FrameworkVersion property to 3.5 and add the individual assembly and XML comments files to the project as documentation sources.

Eric

 

Oct 28, 2009 at 12:05 PM

Hi,

Thanks for answer. Platform version was recognized:

Parsing project files
    Found assembly '....dll'
SHFB: Warning BE0007: A project with a higher framework version was found.  Changing project FrameworkVersion property from '3.5' to '4.0.21006' for the build

Yet still, I go:

GenerateRefInfo:
  MrefBuilder (v2.4.10520.1)
  Copyright c Microsoft 2006
  Unknown target platform version '4.0'.

So what I did:
- Added csproj with target  version 4.0 as a source.
- Added XML comments  as a source.
- Tried to add System.dll as reference from C:\Program Files(32)\....\v4\System.dll and other  as well.

- I also tried adding dll with csproj - same result.

If I dont add csproj, and add only dll I got unresolved error. (I'm using Win7 64bit.) even If I add these files (System.dll ...) as a reference.

 

If I change in csproj target version to 3.5 it works just excelent, yet I need 4.0.

Coordinator
Oct 28, 2009 at 3:16 PM

No, don't add the .csproj as a documentation source since that causes the "Unknwon target platform" error.  Add the assembly and the XML comments file alone, not the project.  You shouldn't need to add the system assemblies but if it's complaining about a missing reference, add the one it's complaining about (i.e. PresentationFramework.dll not System.dll) and add them to the References project node, not the Documentation Sources project node.

You might check to be sure that your MRefBuilder.exe.config exists, is in the same folder as MRefBuilder.exe, and contains the correct settings.  That's usually the cause for the unresolved assembly error for .NET 4.0.  See this thread for the content of the config file and its placement:  http://sandcastle.codeplex.com/Thread/View.aspx?ThreadId=70373.  Also, Beta 2 may have changed the version number for .NET 4.0 so the config file may need updating.

Eric

 

Oct 30, 2009 at 12:07 PM
Edited Oct 30, 2009 at 12:08 PM

Hi,

Ok. I found out what was wrong. It was because in ProgramFiles\... there was already a config file: MRefBuilder.config, that suggested me that it is being used. After renaming it to MRefBuilder.exe.config  and adding support to .net 4.0 runtime, everything works fine.

Thank you very much for help.

Neo