Skip to content

Invalid framework identifier '' #262

@KirillOsenkov

Description

@KirillOsenkov

Here:

propVals.Collect (doc.FileEvaluationContext, "TargetFramework", new ExpressionText (0, fx.GetShortFolderName (), true));

we should avoid calling into NuGet when the string is null or empty, because NuGet throws

NuGet.Frameworks.FrameworkException: Invalid framework identifier ''.
   at string NuGet.Frameworks.NuGetFramework.GetShortFolderName(IFrameworkNameProvider mappings) in C:/MonoDevelop.MSBuildEditor/external/NuGet.Client/src/NuGet.Core/NuGet.Frameworks/NuGetFramework.cs:line 224
   at string NuGet.Frameworks.NuGetFramework.GetShortFolderName() in C:/MonoDevelop.MSBuildEditor/external/NuGet.Client/src/NuGet.Core/NuGet.Frameworks/NuGetFramework.cs:line 182
   at MSBuildRootDocument MonoDevelop.MSBuild.Language.MSBuildRootDocument.Parse(ITextSource textSource, string filePath, MSBuildRootDocument previous, MSBuildSchemaProvider schemaProvider, IMSBuildEnvironment environment, ITaskMetadataBuilder taskBuilder, ILogger logger, CancellationToken token) in C:/MonoDevelop.MSBuildEditor/MonoDevelop.MSBuild/Language/MSBuildRootDocument.cs:line 208
   at Task<MSBuildParseResult> MonoDevelop.MSBuild.Editor.Completion.MSBuildBackgroundParser.StartOperationAsync(XmlParseResult input, MSBuildParseResult previousOutput, XmlParseResult previousInput, CancellationToken token)+() => { } in C:/MonoDevelop.MSBuildEditor/MonoDevelop.MSBuild.Editor/MSBuildBackgroundParser.cs:line 74

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions