Workflow XAML compiler is broken with netstandard assemblies
See original GitHub issueRepro:
- Create a workflow console application targeting net461.
- Add a reference to a netstandard1.5 or later library.
Expected: Compiles w/o warnings and runs successfully.
Actual: Warnings
Severity Code Description Project File Line Suppression State
Warning Could not compile workflow expressions because file 'file:///C:\Program Files (x86)\Microsoft Visual Studio\IntPreview\Enterprise\MSBuild\Microsoft\Microsoft.NET.Build.Extensions\net461\ref\netfx.force.conflicts.dll' has an incorrect format. Workflows in this project may still run, if they do not require expression compilation. If the file is a platform-specific library or executable, consider building the project using MSBuild.exe from a command prompt of the targeted platform. WorkflowConsoleApplication1 C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml.targets 347
Warning Could not run workflow validation because file 'netfx.force.conflicts, PublicKeyToken=cc7b13ffcd2ddd51' has an incorrect format. This will not prevent workflows from running; but any workflow that has a validation error will fail at runtime. If the file is a platform-specific library or executable, consider building the project using MSBuild.exe from a command prompt of the targeted platform. WorkflowConsoleApplication1 C:\windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Xaml.targets 347
Applying the netfx.force.conflicts workaround merely causes the warning to occur on the next reference dll (system.data.common).
When in this state workflows will not execute, see https://github.com/dotnet/corefx/issues/23439.
We may need to give up on passing reference assemblies to desktop projects. If that’s the case we’d switch to just passing in the libs to the compiler and we’d need to build a version of netfx.force.conflicts.dll
that doesn’t have the reference assembly attribute.
Issue Analytics
- State:
- Created 6 years ago
- Comments:36 (20 by maintainers)
Top Results From Across the Web
Workflow XAML compiler is broken with netstandard assemblies
Repro: 1. Create a workflow console application targeting net461. 2. Add a reference to a netstandard1.5 or later library. Expected:
Read more >Problem with assembly resolve in xaml (workflow) after ...
I have an old project with workflow (Appfabric) files in xaml and that project was targeting framework 4.0. We needed to update framework ......
Read more >asssembly missing reference when only xaml uses type
Seems like a bug in the xaml compiler. I am experiencing this also in two of my projects. https://social.msdn.microsoft.com/Forums/vstudio/en-US ...
Read more >What's new in .NET Framework
See what's new in various versions of .NET Framework. Read a summary of key new features and improvements in each version.
Read more >Episode 3 - CoreWF With Dustin Metzgar
In this episode I interview Dustin about CoreWF, the Windows Workflow Foundation, and a little about the challenges of converting a .NET Framework...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Here’s what I came up with:
This is a bit of hammer, but its close to the behavior you get anyways with packages.config (barring any bugs in my target).
I’m not completely sure this is fixed.
If I remove the workaround from the csproj files it now compiles without any problems but it just throws exceptions at run time about netfx.force.conflicts. If I remove ReplaceRefWithLib I then get run time errors saying it can’t load assemblies. Looking at those assemblies it appears they are ones that reference netstandard 2.0.
It kind of looks like the problem has moved from compile time to run time.
I’m running VS 2017 15.5.1