Skip to content
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

Building Fantomas in Visual Studio for dev errors #2447

Closed
cgravill opened this issue Aug 23, 2022 · 4 comments · Fixed by #2523
Closed

Building Fantomas in Visual Studio for dev errors #2447

cgravill opened this issue Aug 23, 2022 · 4 comments · Fixed by #2523

Comments

@cgravill
Copy link
Member

I'm getting an error while trying to build this project:

1>------ Rebuild All started: Project: Fantomas.FCS, Configuration: Debug Any CPU ------
Restored X:\dev\forks\fantomas\src\Fantomas.Core.Tests\Fantomas.Core.Tests.fsproj (in 150 ms).
Restored X:\dev\forks\fantomas\src\Fantomas.Benchmarks\Fantomas.Benchmarks.fsproj (in 160 ms).
Restored X:\dev\forks\fantomas\src\Fantomas.FCS\Fantomas.FCS.fsproj (in 53 ms).
Restored X:\dev\forks\fantomas\src\Fantomas\Fantomas.fsproj (in 241 ms).
Restored X:\dev\forks\fantomas\src\Fantomas.Client\Fantomas.Client.fsproj (in 243 ms).
Restored X:\dev\forks\fantomas\src\Fantomas.Tests\Fantomas.Tests.fsproj (in 254 ms).
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: The "Ionide.KeepAChangelog.Tasks.ParseChangeLogs" task failed unexpectedly.
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'FSharp.Core, Version=4.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: File name: 'FSharp.Core, Version=4.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018:    at Ionide.KeepAChangelog.Parser.parseChangeLog(FileInfo file)
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018:    at KeepAChangelog.Tasks.ParseChangelogs.Execute() in /home/runner/work/KeepAChangelog/KeepAChangelog/src/Ionide.KeepAChangelog.Tasks/Library.fs:line 117
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: 
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: WRN: Assembly binding logging is turned OFF.
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: Note: There is some performance penalty associated with assembly bind failure logging.
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018: To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
1>C:\Users\xyz\.nuget\packages\ionide.keepachangelog.tasks\0.1.8\build\Ionide.KeepAChangelog.Tasks.targets(29,9): error MSB4018:

I suspect it to be related to this ionide/KeepAChangelog#8

I'm able to workaround the issue locally by commenting out Ionide.KeepAChangelog in a couple of paket.references files then rebuilding. I'm not sure if there's a better workaround.

I do not get the error when building on the command line with FAKE.

@nojaf
Copy link
Contributor

nojaf commented Aug 23, 2022

Yes, @josh-degraw got that error recently.
A snippet from our Discord conversation:
image

@cgravill
Copy link
Member Author

Yes, exactly that.

@baronfel
Copy link
Contributor

The tracking issue for this in Ionide.KeepAChangelog is ionide/KeepAChangelog#8

@nojaf
Copy link
Contributor

nojaf commented Sep 1, 2022

We should add a note for this someday in the contributions section at https://fsprojects.github.io/fantomas/docs/contributors/Index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants