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

support cross targeting msbuild projects (multiple target framework) #168

Merged

Conversation

enricosada
Copy link
Contributor

these with <TargetFrameworks> (plural)

from root, if crossgen, choose the first target (atm FSAC doesnt support pass a preference)
After that, redo the inspect with that target framework, and ask msbuild about what frameworks
the project references should use

fix #162

@enricosada
Copy link
Contributor Author

as a note @Krzysztof-Cieslak @kjnilsson @rneatherway this doesnt had any new configuration, just fix for crossgen, using the first target framework of the list.

Fix also a common scenario:

  • console (single fw, like netcoreapp) who reference a library (multi fw, like netstandard+net40). now works correctly

pratically traversing the project references, i ask to msbuild what target framework the project reference should use.

But now is easier to add because:

  • if the starting suppoet multiple projects, i know what are (user can choose)
  • is possible to pass it directly (now the function accept the target framework, if user know that already)

@enricosada
Copy link
Contributor Author

Ah this repo https://github.com/enricosada/DotnetNewFsprojTestingSamples contains some examples ready to use with some scenario (if can help vim/emacs testing)

@rneatherway
Copy link
Contributor

Is there much more to come along these lines? I think it'll be more efficient if I take a batch of updates over to emacs.

@enricosada
Copy link
Contributor Author

enricosada commented Jun 14, 2017

@rneatherway Dont think so, maybe just a perfomance improvement for bigger solution ( https://github.com/fsharp/FsAutoComplete/blob/master/src/FsAutoComplete.Core/ProjectCoreCracker.fs#L93 and #161 ) but depends if i have time to do it (not in short term anyway, maybe next month).

Other changes require changes to public api, so need discussion before do it. Stuff like:

  • passing the starting project
  • support sln
  • choose initial configuration (debug/release) and target framework
  • update configuration (debug/release) and target framework later, and invalidate
  • special errors for stuff like restore required, choose the target framework from avaliable..

support new sdk on mono will wait a bit, because sdk 2.0 is changing...

@rneatherway
Copy link
Contributor

Ah sorry I caused a conflict here, would you mind updating?

@enricosada
Copy link
Contributor Author

@rneatherway sure np, i'll always rebase as needed.
i also need to fix a bug found on sdk2.0 (test suite for sdk2.0 paid already 😄

these with `<TargetFrameworks>` (plural)

from root, if crossgen, choose the first target (atm FSAC doesnt support pass a preference)
After that, redo the inspect with that target framework, and ask msbuild about what frameworks
the project references should use
output file fsc argument can be `-o` or `--out`
@enricosada
Copy link
Contributor Author

nice behaviour.
So on unix (dunno what configuration can enable it but happen in travis ubuntu), if i do Path.GetTempFileName() but delete the file (i just want a path), that can be reused by a later Path.GetTempFileName().
it's lovely to have test suites...

@Krzysztof-Cieslak Krzysztof-Cieslak merged commit 9b91ed8 into ionide:master Jun 19, 2017
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.

Try infer current target framework, if multiple target frameworks (crossgen)
3 participants