-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DotNet.publish fails attempting to load Microsoft.Build.Framework, Version=15.1.0.0 #2722
Comments
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project! |
Had the same issue on the GitHub action for the build. It seems due to the release of .NET 7. The dependency resolution in the script uses the newer versions of build packages that are released with .NET 7. We fixed it in FAKE by pinning the packages in the build script:
|
- TOM 19.52, MSAL 4.48, PBI API 4.11, CsvHelper 30 - Pinned to .Net 6 to work around current Fake incompatibilities with .Net 7 (fsprojects/FAKE#2719, fsprojects/FAKE#2722)
Just ran into it and had a quick workaround thanks to your comments here :) Should fake.dotnet.msbuild list the nuget dependency to prevent this or did i miss something? at least it it not listed here https://www.nuget.org/packages/Fake.DotNet.MSBuild/5.23.1#dependencies-body-tab |
There's a related part of this - components that want to use the version of MSBuild shipped with the .NET SDK should not actually copy the MSBuild dlls to the application directory. This can be done via the use of |
when I use Resolving dependency graph...
- FSharp.Core is pinned to 6.0.0
Could not detect any platforms from 'net7.0' in System.Collections.Immutable 7.0.0, please tell the package authors
Could not detect any platforms from 'net7.0' in Microsoft.Build.Framework 17.5.0, please tell the package authors
Could not detect any platforms from 'net7.0' in Microsoft.Build.Utilities.Core 17.5.0, please tell the package authors
Could not detect any platforms from 'net7.0' in Microsoft.NET.StringTools 17.5.0, please tell the package authors
Could not detect any platforms from 'net7.0' in System.Security.Permissions 7.0.0, please tell the package authors
Could not detect any platforms from 'net7.0' in System.Configuration.ConfigurationManager 7.0.0, please tell the package authors
Could not detect any platforms from 'net7.0' in System.Text.Encoding.CodePages 7.0.0, please tell the package authors
Could not detect any platforms from 'net7.0' in System.Security.Cryptography.Pkcs 7.0.1, please tell the package authors
Could not detect any platforms from 'net7.0' in System.Security.Cryptography.ProtectedData 7.0.1, please tell the package authors
Could not detect any platforms from 'net7.0' in System.Formats.Asn1 7.0.0, please tell the package authors
Could not detect any platforms from 'net7.0' in System.Windows.Extensions 7.0.0, please tell the package authors
my local env just installed Feel free if you have any idea about this error ? |
This still contains issues running in dotnet 6 but at least it has a workaround by disabling msbuild binlogs. see fsprojects/FAKE#2722. (I could have also locked msbuild versions but if I'll forget to update it it will be worse then disabling binlogs).
Meanwhile this works for this issue, it opens another problem: |
Could FAKE do somehow copylocal=true for this dependency to .fake folder? |
fwiw I was having a poke about at the build in #2825 whilst seeing how some things work, and it looks to me like the |
Apparently this is still an issue, and I just ran into it as well. A true fix would be ideal, or at least stop the local copying of MSBuild within the Fake architecture, so that MSBuildLocator can be used. In the meantime, though, a huge thank you to @circusboy for the DisableInternalBinLog workaround, which is miracle voodoo magic from my limited perspective. :-) |
Description
FAKE throws a
BuildFailedException
when runningDotNet.publish
. An inner exception indicates that FAKE is trying to loadMicrosoft.Build.Framework, Version=15.1.0.0
, which doesn't seem to exist on my machine.I encountered this problem on a colleague's machine. I couldn't reproduce it on my own machine (which has been using this build script for several years now) until I removed the lockfile and the
.fake
folder before running the build script.Repro steps
fake -v run build.fsx -t BuildTestBE
Expected behavior
I expect the task to succeed, and the project to be published to the target folder.
Actual behavior
The build fails at
DotNet:publish
:Known workarounds
Following the steps suggested in the error above didn't help, but disabling the internal binlog solved the problem:
Related information
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19044 N/A Build 19044
FAKE 5 - F# Make (5.23.1) (this line is written to standard error, see #2066)
FakePath: C:\Users\user.dotnet\tools.store\fake-cli\5.23.1\fake-cli\5.23.1\tools\net6.0\any\Fake.Runtime.dll
Paket.Core: 6.2.1
Microsoft Visual Studio Enterprise 2022
Version 17.3.5
Installed Version: Enterprise
The text was updated successfully, but these errors were encountered: