Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

Failed assembly resolution in XAML workflow projects #706

Closed
lmagyar opened this issue Apr 10, 2018 · 2 comments
Closed

Failed assembly resolution in XAML workflow projects #706

lmagyar opened this issue Apr 10, 2018 · 2 comments

Comments

@lmagyar
Copy link

lmagyar commented Apr 10, 2018

Situation:

  • using VS 15.6.5
  • a net461 project uses old project format but the new PackageReference tag
  • the net461 project contains XAML Workflow Activity definitions
  • the net461 project refers directly to a netstandard2.0 NuGet package or refers to a net461 NuGet package that has references to netstandard projects, ie. it's a mixed environment
    • indirect: Microsoft.Orleans.Core v1.5.3 (net461 project)
    • direct: Orleans.Activities v0.4.0, Abp v3.4.0 (netstandard2.0 projects)

Problem:

  • build warnings, that some (quite random) .dll-s has an incorrect format
  • it's only a warning, but the application really fails with System.NotSupportedException: Expression Activity type 'CSharpValue'1' requires compilation in order to run. Please ensure that the workflow has been compiled.

In case of referring to Orleans.Activities NuGet pkg the build warnings:

  • Could not compile workflow expressions because file 'file:///C:\Users\xxx\.nuget\packages\system.reflection.typeextensions\4.4.0\ref\net461\System.Reflection.TypeExtensions.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.
  • Could not run workflow validation because file 'System.Reflection.TypeExtensions, PublicKeyToken=b03f5f7f11d50a3a' 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.

In case of referring to Microsoft.Orleans.Core NuGet pkg the build warnings:

  • Could not compile workflow expressions because file 'file:///C:\Users\xxx\.nuget\packages\system.net.http\4.3.0\ref\net46\System.Net.Http.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.
  • Could not run workflow validation because file 'System.Net.Http, PublicKeyToken=b03f5f7f11d50a3a' 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.

In case of referring to Abp NuGet pkg the build warnings:

  • Could not compile workflow expressions because file 'file:///C:\Users\xxx\.nuget\packages\system.runtime.compilerservices.unsafe\4.4.0\ref\netstandard2.0\System.Runtime.CompilerServices.Unsafe.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.
  • Could not run workflow validation because file 'System.Runtime.CompilerServices.Unsafe, PublicKeyToken=b03f5f7f11d50a3a' 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.

Repros:

referring #704 #481 dotnet/sdk#1930

I don't know whether dotnet/project-system is a better place for this issue?

@lmagyar
Copy link
Author

lmagyar commented Apr 11, 2018

This is a reincarnation of dotnet/sdk#1522. Until that issue is reopened I leave this issue open.

@lmagyar
Copy link
Author

lmagyar commented Apr 11, 2018

Closing after dotnet/sdk#1522 is reopened.

@lmagyar lmagyar closed this as completed Apr 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant