Skip to content

[WIP] Net standard 2.0#133

Closed
vasily-kirichenko wants to merge 19 commits into
fsprojects:masterfrom
vasily-kirichenko:net-standard-2.0
Closed

[WIP] Net standard 2.0#133
vasily-kirichenko wants to merge 19 commits into
fsprojects:masterfrom
vasily-kirichenko:net-standard-2.0

Conversation

@vasily-kirichenko

Copy link
Copy Markdown
Contributor

No description provided.

@dsyme

dsyme commented Oct 12, 2017

Copy link
Copy Markdown
Contributor

@vasily-kirichenko I added f3945c6 and it gets a bit further but we hit a problem later.

Will keep working on this (don't bother looking at it again yet)

@vasily-kirichenko

Copy link
Copy Markdown
Contributor Author

@dsyme thank you.

@dsyme

dsyme commented Oct 24, 2017

Copy link
Copy Markdown
Contributor

@vasily-kirichenko I pushed a PR to this PR. vasily-kirichenko#1

Could you possibly also give me write access to your repo so I can push directly into the PR if needed?

@dsyme

dsyme commented Oct 24, 2017

Copy link
Copy Markdown
Contributor

@forki @matthid I didn't have any luck getting paket.references as a way to reference things in the context of .NET SDK 2.0 projects, see https://github.com/vasily-kirichenko/FSharp.Configuration/pull/1/files#diff-779d38522b9a20363b68bfa4828841f6R16

I'm not sure what I'm doing wrong, I read the docs and it seems it should just magically work

@dsyme

dsyme commented Oct 24, 2017

Copy link
Copy Markdown
Contributor

@vasily-kirichenko The PR gets as far as this sequence of steps working:

dotnet build FSharp.Configuration.sln ## succeeds, builds Debug

dotnet build FSharp.Configuration.Tests.sln ## fails, but creates whacky obj\project.assets.json

msbuild FSharp.Configuration.Tests.sln ## succeeds

Notes

  1. I don't understand why plain msbuild doesn't succeed, i.e. why the project.assets.json is needed. If I just use build.cmd from the top I get

C:\Program Files\dotnet\sdk\2.0.0\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(323,5): Assets file 'C:\GitHub\dsyme\FSharp.Configuration\src\FSharp.Configuration\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
C:\Program Files\dotnet\sdk\2.0.0\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(165,5): Assets file 'C:\GitHub\dsyme\FSharp.Configuration\src\FSharp.Configuration\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.

  1. If you want the second step to succeed you have to make dotnet use the F# compiler running on .NET Framework/Mono, by adding fsc.props and importing it

  2. The first step is building Debug version of the type provider, referenced in the second step

@matthid

matthid commented Oct 24, 2017

Copy link
Copy Markdown
Member

@dsyme I cannot test right now but for new SDK projects (and FSharp.Configuration.Tests.fsproj already looks like a new style project) usually all you need to do is to edit the corresponding paket.references to add the package you want (https://github.com/vasily-kirichenko/FSharp.Configuration/pull/1/files#diff-0416bd63c42a303643978cdcd47b1665). Paket will no longer emit any direct dll references (just like NuGet is not anymore either)

In worst case a git clean/dotnet restore is required.

@dsyme

dsyme commented Oct 24, 2017

Copy link
Copy Markdown
Contributor

@matthid Yeah, I know, thanks. That's what wasn't working for me. I didn't look into it and added an explicit reference into the package directory instead

@vasily-kirichenko

Copy link
Copy Markdown
Contributor Author

@dsyme I included fsc.props into the tests project, but it's not helped, I've got the same error:

The type provider 'D:\WLCR\github\FSharp.Configuration\src\FSharp.Configuration\bin\Debug\netstandard2.0\FSharp.Configuration.dll' reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FSharp.Configuration' which cannot be loaded or doesn't exist. Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context. (Exception from HRESULT: 0x80131058)

@dsyme

dsyme commented Nov 9, 2017

Copy link
Copy Markdown
Contributor

@vasily-kirichenko Could you write out the step-by-step to get to the point you mention above? The AppVeyor log is currently showing

[00:01:17]          C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(165,5): error : Assets file 'C:\projects\fsharp-configuration\src\FSharp.Configuration\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. [C:\projects\fsharp-configuration\src\FSharp.Configuration\FSharp.Configuration.fsproj]

which is the error mentioned in #133 (comment) which I don't really understand

sergey-tihon and others added 8 commits April 22, 2018 23:15
# Conflicts:
#	.paket/Paket.Restore.targets
#	.paket/paket.exe
#	paket.dependencies
#	paket.lock
#	src/FSharp.Configuration/AppSettingsProvider.fs
#	src/FSharp.Configuration/ConfigTypeProvider.fs
#	src/FSharp.Configuration/IniFileProvider.fs
#	src/FSharp.Configuration/ResXProvider.fs
#	src/FSharp.Configuration/TypeProviders.Helper.fs
#	src/FSharp.Configuration/YamlConfigProvider.fs
#	src/FSharp.Configuration/paket.references
#	tests/FSharp.Configuration.Tests/app.config
# Conflicts:
#	tests/FSharp.Configuration.Tests/ResXProvider.Tests.fs
@vasily-kirichenko

Copy link
Copy Markdown
Contributor Author

I've merged master and #139

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.

5 participants