Skip to content

After update to VS 16.4 projects stop compiling #2277

@njannink

Description

@njannink

After I updated to 16.4 my wpf projects stopped compiling with the following error:

Microsoft.WinFX.targets(225,9): error MC1000: Unknown build error, 'Could not find assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'. Either explicitly load this assembly using a method such as LoadFromAssemblyPath() or use a MetadataAssemblyResolver that returns a valid assembly.'

Everything was working fine in 16.3

My project file:

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
    <UseWPF>true</UseWPF>
    <RootNamespace>xxx.UI</RootNamespace>
    <AssemblyName>xxx.UI</AssemblyName>
  </PropertyGroup>

    <ItemGroup>
    <PackageReference Include="BracketPipe" Version="0.7.7232.28997" />
    <PackageReference Include="DynamicData" Version="6.13.21" />
    <PackageReference Include="Markdig.Wpf" Version="0.3.1" />
    <PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.3" />
    <PackageReference Include="RtfPipe" Version="1.0.7246.39337" />
  </ItemGroup>

  <ItemGroup>
    <None Remove="Resources\**\*.*" />
    <Resource Include="Resources\**\*.*" />
  </ItemGroup>

  <ItemGroup>
    <Compile Update="Properties\Resources.Designer.cs">
      <DesignTime>True</DesignTime>
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Update="Properties\Resources.resx">
      <Generator>PublicResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
  </ItemGroup>
</Project>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions