Skip to content

Microsoft.NETFramework.ReferenceAssemblies does not find VB runtime #3228

@nguerrera

Description

@nguerrera

On a machine without the .NET Framework 4.5 targeting pack installed:

Create a project like this and do dotnet build

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>net45</TargetFramework>
    <VBRuntime>Default</VBRuntime>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0-preview.2" />
  </ItemGroup>
</Project>

Expected: Build succeeds

Actual: Build fails with

vbc : error BC2017: could not find library 'Microsoft.VisualBasic.dll' 

The problem is that NETFramework.ReferenceAssemblies does not cause $(FrameworkPathOverride) which is passed to vbc to have the targeting pack folder.

Also, It is setting EnableFrameworkPathOverride to false, but that seems to be after FrameworkPathOverride is already set and not having the fully intended effect so this does work when the targeting pack is installed.

cc @dsplaisted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions