-
Notifications
You must be signed in to change notification settings - Fork 785
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
VS 2017 15.5.0 - Multitargeting just plain doesn't work #4084
Comments
IntelliSense is also not working with TargetFrameworks. Essentially, TargetFrameworks does not work in F#. |
In general, multitargeting with F# is completely hosed. We haven't estimated the extent of the work, but I suspect it will be complicated given the space of things that can go wrong and the large amount of work that had to go into it for C#/VB tooling (and even today, there's no experience for multitargeting in the UI, forcing you to use some of the weirdo MSBuild syntax to express dependencies for different targets under whatever conditions are relevant to you). I don't recommend multitargeting today unless you must target something that .NET Standard doesn't cover today. |
Thanks for the confirmation. I noticed. Unity only supports net46 and does not yet support netstandard. We have common code that we want to share in a library for Unity and for a server side web app. The web app, we want to deploy on dotnet core. Most likely, Unity will ship netstandard support in the first release of 2018 and then we'll be in a good position again. When you multitarget, the Visual Studio UI gives you a selectbox to switch between the target frameworks: C#F# |
+1 on this. Would really like to see this issue addressed. |
C# in 15.5 simply runs and debugs the first one listed in TargetFrameworks. I learned this the hard way yesterday when trying to debug SourceLink. I only have the netcore 2 sdk installed, not netcore 1 sdk on this laptop. I got some obscure runtime error until I changed |
Handy repo to develop/test with https://github.com/jackfoxy/multitargetpaket |
any update when this will be available? |
We're closing in on the (quite huge) amount of work to complete file ordering with folder support and all current UI gestures for .NET Core SDK projects shipping in 15.6. Once that's locked down, we'll be looking at this and trying to get it fixed for 15.7. |
Suggested workaround: Have a single target defined for debug and use multi-targeting for release/deploy. <TargetFramework Condition="'$(Configuration)'=='Debug'">net461</TargetFramework>
<TargetFrameworks Condition="'$(Configuration)'=='Release'">netstandard2.0;net461</TargetFrameworks> |
To reproduce, simply create a console app, edit the fsproj and switch from
TargetFramework
toTargetFrameworks
. Here is a video demo:https://youtu.be/jxrtAIvMPzE
The text was updated successfully, but these errors were encountered: