You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@gentauro you need to do dotnet restore before dotnet build, just once or if you change packageref. it's the same for c#, it's used to restore all reference from nuget.
dotnet new lib -lang F# && dotnet restore && dotnet build - v n
lib=classlib template, but class 👎 with F# (and shorter).
the -v n add verbose build log, so you can see fsc arguments, because i think you'd like to see these 😄
with new sdk, by default (it's the same for c#), there is a wildcard include, like <EmbeddedResource Include="**/*.resx" />. defined in $sdkInstallDir/sdk/1.0.0-rc4-004771/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.props
If you define <EmbeddedResource in fsproj you will get duplicated items error.
You can opt out the wildcard include adding property EnableDefaultEmbeddedResourceItems to false
@enricosada I know, I tried either way, but I'm getting this error if I have more than one .resx in the project:
C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB3577: Two output file names resolved to the same output path: "obj\Release\netstandard1.6\.resources
@ncave sry, that was something that was changed in rc3, so i had to say it because it's a common error with the implicit default wildcard includes.
Seems something is not implemented yet (empty filename). Just open an issue, i'll fix that :D it' easy now, i'll just publish FSharp.NET.Sdk 1.0.1.
Also reading code probably i not implemented it in target file, my bad, but should be ok copying the old fsharp target, using the task from FSharp.Build like FscTask does. Or better check if we can reuse c# task/target directly, instead of reimplement it.
Currently this project requires the old preview2-1-003177 version of the .NET Core tooling to even build build.cmd All.NetCore. (If you have a later version installed then the command dotnet restore -v Information fails while running build.cmd All.NetCore). This is wrong since most people now have a later version of the tooling installed.
project json -> fsproj.
The AppVeyory CI. This is a major problem but maybe there's a way to tell AppVeyor to acquire the latest version of the tooling?
Install is just download a zip, unzip, add to path. Or download install script and run it.
i updated the appveyor.yml and travis in this PR dotnet/docs#1556 not yet merged, so use that 😄
Nor do I understand how we are expected to check for the right version and acquire it if necessary.
use correct version in PATH, or install and use a global.json
I don't really care about ProjectCracker etc understanding the new project format just yet - i just want this project to build and test cleanly both on developer machines and on AppVeyor CI
it's not a problem, can build current projectcracker with new tooling, same output
I've been porting over a lot of my projects to the new format and I've found using generators to be the easiest way to deal with them for now due to the lack of editor support.
I have it generate new msbuild15/netcore versions of the fsprojs before each build so it stays synchronized. Once the tooling support comes online we can consolidate into the nice svelte format and multiplatform build, but until then I think this is a pretty good stopgap.
As a feedback, dont autogenerate fsproj.
Is easy to maintain here, are just two fsproj.
About editors support, vscode works, by quite some time now.
Vs on Mac will too, soon, if not already with new release.
Another is: dont use paket here with new fsproj, there is just one dep (fsharp.core). Can Ben pinned to exact version
Add Paket later. Leave thing simple for now, minimize unstable parts
vscode is finnicky at best and it's almost useless for this repo in particular, it reports all kinds of erroneous errors and can't supply proper completions because it can't evaluate the project properly
it's great for the Mac users, but most of us are on windows
paket is more stable than vscode's editor support, but that's not important
As a feedback, dont autogenerate fsproj
Why not? relying on people to remember to synchronize all of their changes seems much more error prone. @enricosada what's your issue with automation?
i trust fsc for errors. it's f#, not that bad fix an compiler error.
can't supply proper completions because it can't evaluate the project properly
let's use it, and improve that so. i want to see why doesnt evaluate project properly.
FCS get all compiler args from ionide/FSAC, with normal project works ok. If it's just an issue of size, let's see bottleneck.
it's great for the Mac users, but most of us are on windows
i am too on windows, editors are not a limiting factor. more there because all work can be done in VS, and just fix api compatibility errors on netcore fsproj
@cloudRoutine i trust automation but adding a tool/script is a tradeoff for maintanance, is not always a good thing. And i dont think is worth do it in this case.
In this case, sinchronize changes may be easier done extracting a .prop file (with all defines), shared between old and new fsproj. Cannot extract compile items too because ide doesnt support that in old fsproj afaik. Anyway that leave projects with just source files list pratically, not too bad.
Also i want to add proper multi targeting support, because will make things 1000th easier.
my feedback is not use that. but i not maintain this project, so np for me
@gentauro there is no future for project.json, is deprecated, and works only on VS 2015 and with preview (1.0.0-preview2) of dotnet core.
The 1.0.0 rtm of .net core (and all 4 previous rc) works with msbuild, like VS 2017 does.
So is not like we can choose (but i think the new sdk is good, is using the msbuild language, but implemented better). Also project.json implementation was more immature than msbuild, so lots of bugs to fix
Activity
ncave commentedon Feb 16, 2017
@enricosada Great guide, thanks!
I'm having issues adding multiple embedded resources (more than one), have you seen anything mentioned about that?
enricosada commentedon Feb 16, 2017
@gentauro you need to do
dotnet restorebeforedotnet build, just once or if you change packageref. it's the same for c#, it's used to restore all reference from nuget.-v nadd verbose build log, so you can see fsc arguments, because i think you'd like to see these 😄enricosada commentedon Feb 16, 2017
@ncave you mean
<EmbeddedResource? can you open an issue on https://github.com/dotnet/netcorecli-fsc/issues about that? with a mini repro, if possibile, so i can add to test suite too 😄Btw adding scenario to test suite is really easy. see an example test it just invoke
dotnetcommands, and copy from test/testAssets directorywith new sdk, by default (it's the same for c#), there is a wildcard include, like
<EmbeddedResource Include="**/*.resx" />. defined in$sdkInstallDir/sdk/1.0.0-rc4-004771/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.DefaultItems.propsIf you define
<EmbeddedResourcein fsproj you will get duplicated items error.You can opt out the wildcard include adding property
EnableDefaultEmbeddedResourceItemsto falsencave commentedon Feb 16, 2017
@enricosada I know, I tried either way, but I'm getting this error if I have more than one .resx in the project:
C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft.Common.CurrentVersion.targets(2857,5): error MSB3577: Two output file names resolved to the same output path: "obj\Release\netstandard1.6\.resourcesenricosada commentedon Feb 16, 2017
@ncave sry, that was something that was changed in rc3, so i had to say it because it's a common error with the implicit default wildcard includes.
Seems something is not implemented yet (empty filename). Just open an issue, i'll fix that :D it' easy now, i'll just publish
FSharp.NET.Sdk1.0.1.Also reading code probably i not implemented it in target file, my bad, but should be ok copying the old fsharp target, using the task from
FSharp.BuildlikeFscTaskdoes. Or better check if we can reuse c# task/target directly, instead of reimplement it.enricosada commentedon Feb 23, 2017
@ncave the resx issue is fixed with the new published FSharp.NET.Sdk v1.0.1 package
dsyme commentedon Mar 8, 2017
@enricosada Re my comment on other thread - I'd really appreciate help to see this addressed #705 (comment)
enricosada commentedon Mar 8, 2017
adding more people i know who can help with this issue ( @forki @cloudRoutine @adamchester @neoeinstein ), i can review/hints.
@dsyme but if noone step up, i'll do that friday.
I'll reply your points on the other issue
project json -> fsproj.
Install is just download a zip, unzip, add to path. Or download install script and run it.
with ref of docs official docs https://docs.microsoft.com/en-us/dotnet/articles/core/tools/using-ci-with-cli.
i updated the appveyor.yml and travis in this PR dotnet/docs#1556 not yet merged, so use that 😄
use correct version in
PATH, or install and use a global.jsonit's not a problem, can build current projectcracker with new tooling, same output
cloudRoutine commentedon Mar 8, 2017
I've been porting over a lot of my projects to the new format and I've found using generators to be the easiest way to deal with them for now due to the lack of editor support.
I have it generate new msbuild15/netcore versions of the fsprojs before each build so it stays synchronized. Once the tooling support comes online we can consolidate into the nice svelte format and multiplatform build, but until then I think this is a pretty good stopgap.
enricosada commentedon Mar 8, 2017
As a feedback, dont autogenerate fsproj.
Is easy to maintain here, are just two fsproj.
About editors support, vscode works, by quite some time now.
Vs on Mac will too, soon, if not already with new release.
Another is: dont use paket here with new fsproj, there is just one dep (fsharp.core). Can Ben pinned to exact version
Add Paket later. Leave thing simple for now, minimize unstable parts
cloudRoutine commentedon Mar 8, 2017
Why not? relying on people to remember to synchronize all of their changes seems much more error prone.
@enricosada what's your issue with automation?
enricosada commentedon Mar 9, 2017
i trust fsc for errors. it's f#, not that bad fix an compiler error.
let's use it, and improve that so. i want to see why doesnt evaluate project properly.
FCS get all compiler args from ionide/FSAC, with normal project works ok. If it's just an issue of size, let's see bottleneck.
i am too on windows, editors are not a limiting factor. more there because all work can be done in VS, and just fix api compatibility errors on netcore fsproj
@cloudRoutine i trust automation but adding a tool/script is a tradeoff for maintanance, is not always a good thing. And i dont think is worth do it in this case.
In this case, sinchronize changes may be easier done extracting a .prop file (with all defines), shared between old and new fsproj. Cannot extract compile items too because ide doesnt support that in old fsproj afaik. Anyway that leave projects with just source files list pratically, not too bad.
Also i want to add proper multi targeting support, because will make things 1000th easier.
my feedback is not use that. but i not maintain this project, so np for me
cloudRoutine commentedon Mar 10, 2017
@enricosada I'll let you handle the upgrade then
dsyme commentedon Mar 29, 2017
@baronfel Thank you - I am so glad when I see project.json disappear.
forki commentedon Mar 29, 2017
@gentauro new MSBuild is slightly less verbose than old MSBuild and more importantly it's not dead like project.json ;-)
dsyme commentedon Mar 29, 2017
@gentauro No, I didn't mean that - I just want the churn in base tooling to stop.
enricosada commentedon Mar 29, 2017
@gentauro there is no future for
project.json, is deprecated, and works only on VS 2015 and with preview (1.0.0-preview2) of dotnet core.The 1.0.0 rtm of .net core (and all 4 previous rc) works with msbuild, like VS 2017 does.
So is not like we can choose (but i think the new sdk is good, is using the msbuild language, but implemented better). Also project.json implementation was more immature than msbuild, so lots of bugs to fix
Merge pull request fsharp#700 from dsyme/f8