dotnet / dotnet/wpf

C1047 on bilinearspan.lib with current compiler

Open
#3,946 8 comments 2 reactions 0 assignees View on GitHub
Bug
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version: 5.0.100, per `global.json`.
* Windows version: Windows 10 build 21277.100.
* Does the bug reproduce also in WPF for .NET Framework 4.8?: N/A, build-time issue.

## Problem description

When I build [my fork of WPF](https://github.com/wjk/dotnet-wpf`) using the Release configuration, I see the error message listed below. (For some reason it works just fine in the Debug configuration.) I am using the MSVC compiler, version 19.28.29617, as included with Visual Studio 16.9.0 Preview 2.0.

## Actual behavior

```
LINK : fatal error C1047: The object or library file 'C:\Users\William\.nuget\packages\runtime.win-x86.microsoft.dotnet
.wpf.dnceng\5.0.0-rtm.20560.4\runtimes\win-x86\native\bilinearspan.lib' was created by a different version of the compi
ler than other objects like 'D:\Projects\dotnet-wpf\artifacts\obj\wpfgfx\Win32\Release\precomp.obj'; rebuild all object
s and libraries with the same compiler [D:\Projects\dotnet-wpf\src\Microsoft.DotNet.Wpf\src\WpfGfx\core\dll\wpfgfx.vcxp
roj]
LINK : fatal error LNK1257: code generation failed [D:\Projects\dotnet-wpf\src\Microsoft.DotNet.Wpf\src\WpfGfx\core\dll
\wpfgfx.vcxproj]
```

## Expected behavior

It should link.

## Minimal repro

Checkout commit `a6e62c39fab3f860a37c2f361fd225d52a982e4f` from wjk/dotnet-wpf. Run `build.bat -c Release -pack -bl`. Observe the error.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.