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

fix using FSharpLint.Core targeting net #308

Merged
merged 4 commits into from
Feb 11, 2019

Conversation

enricosada
Copy link
Contributor

@enricosada enricosada commented Feb 10, 2019

using FSharpLint.Core targeting net fails

Error Message:
 System.TypeInitializationException : The type initializer for 'FSharpLint.Framework.Configuration' threw an exception.
  ----> System.TypeInitializationException : The type initializer for '<StartupCode$FSharpLint-Core>.$Configuration' threw an exception.
  ----> System.IO.FileLoadException : Could not load file or assembly 'FParsecCS, Version=1.0.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

That's caused by bad packaging of FParsec.

As workaround (and as best practice), multitarget FSharpLint.Core for both net and netstandard.

Bump version of Dotnet.ProjInfo because v0.31 use the same api for .NET and .NET Standard, to minimize changes

ref stephan-tolksdorf/fparsec#34
ref ionide/FsAutoComplete#336

```
Error Message:
 System.TypeInitializationException : The type initializer for 'FSharpLint.Framework.Configuration' threw an exception.
  ----> System.TypeInitializationException : The type initializer for '<StartupCode$FSharpLint-Core>.$Configuration' threw an exception.
  ----> System.IO.FileLoadException : Could not load file or assembly 'FParsecCS, Version=1.0.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
```

That's caused by bad packaging of FParsec

ref stephan-tolksdorf/fparsec#34
the v0.31 use the same api (`Result`) for both .NET and .NET Standard target framework.
@enricosada
Copy link
Contributor Author

@duckmatt @jgardella ready to review.

if it's possibile to have a new version published, will help fix lint in FSAC .NET (ref ionide/FsAutoComplete#336)

@jgardella
Copy link
Contributor

Thanks for the PR @enricosada. Looks fine to me, but I will wait for @duckmatt to review since he did the conversion to .NET core.

@duckmatt duckmatt merged commit c19a8af into fsprojects:master Feb 11, 2019
@duckmatt
Copy link
Collaborator

Looks good, thank you! @enricosada @jgardella I've updated the release notes to update to version 0.10.4

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

Successfully merging this pull request may close these issues.

None yet

3 participants