Skip to content

StartUpToDateCheck(null, 1) throws ArgumentException #471

@jcansdale

Description

@jcansdale

Call to IVSBuildableProjectCfg.StartUpToDateCheck(null, 1) throws an ArgumentException on VS 2015 RC F# projects. The 1 indicates the VSUTDCF_DTEEONLY flag is set.

On C# and other common project types, this call indicates whether Visual Studio thinks the project needs building. I've found it to be the quickest and most reliable way to find which projects need building. Unfortunately this method doesn't seem to be well documented.

Here is the full exception:

[11268] System.ArgumentException: Value does not fall within the expected range.
[11268] at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
[11268] at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
[11268] at Microsoft.VisualStudio.FSharp.ProjectSystem.Utilities.TryGetActiveConfigurationAndPlatform(IServiceProvider serviceProvider, IVsHierarchy hierarchy, ConfigCanonicalName& configCanonicalName)
[11268] at Microsoft.VisualStudio.FSharp.ProjectSystem.ProjectConfig.IsUpToDate(OutputWindowLogger logger, Boolean testing)
[11268] at Microsoft.VisualStudio.FSharp.ProjectSystem.BuildableProjectConfig.StartUpToDateCheck(IVsOutputWindowPane pane, UInt32 options)

I think this method may have always returned false on previous versions (rather than throwing an exception). This isn't a show stopper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions