Open sm-g opened 7 years ago
@sm-g Could you translate the error message to English for us? Thanks!
@patriksvensson
error MSB4062: The "TransformWebConfig" task could not be loaded from the assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.
NET.Sdk.Publish\build\netstandard1.0....\tools\net46\Microsoft.NET.Sdk.Publish.Tasks.dll". Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk.Publ
ish\tools\net46\Microsoft.NET.Sdk.Publish.Tasks.dll' or one of its dependencies. This assembly
is built by a runtime newer than the currently loaded runtime and cannot be loa
ded. Confirm that the
@sm-g
Could not load file or assembly 'file:///C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk.Publ ish\tools\net46\Microsoft.NET.Sdk.Publish.Tasks.dll' or one of its dependencies.
This says it all. Cake is currently built for .NET 4.5 and can't therefore load .NET 4.6 assemblies.
Using Cake.CoreCLR
instead (which is built for netstandard1.6
) will most likely solve this issue. However, Cake.CoreCLR
will not currently support all available addins.
This issue will be addressed in a not-so-distant-future.
With .SetMSBuildPlatform(MSBuildPlatform.x86)
there is no such error (will be fixed in Core 2.0 SDK 2.0). I do not think that is about Cake .net version, it invokes msbuild and msbuild cannot load assembly.
@sm-g ah, I see. Sorry didn't read the logs fully before answering.
What You Are Seeing?
What is Expected?
Build stopped with
An error occurred when executing task 'Publish'.
What are you using?
cake 0.19.5, windows10-x64
How Did You Get This To Happen? (Steps to Reproduce)
Output Log