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

Compliance/Compatibility: F# projects from Dev10 cannot be open correctly by Dev17 #12174

Closed
vzarytovskii opened this issue Sep 21, 2021 · 9 comments

Comments

@vzarytovskii
Copy link
Member

vzarytovskii commented Sep 21, 2021

This is a part of compliance/compatibility work.

More info:
This issue occurs on all F# project from Dev10.

Steps to reproduce:

  1. Create an F# Application by Dev10
  2. Close the solution and open it by Dev17
  3. Observe whether project can be loaded correctly

Actual result:
An error "One or more projects in the solution were not loaded correctly" pops up.
image

The F# Application status is unloaded now, and if we still load it manually, another error dialog pops up.
image

Error massage:

The imported project "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\FSharp\1.0\Microsoft.FSharp.Targets" was not found.
Also, tried to find "FSharp\1.0\Microsoft.FSharp.Targets" in the fallback search path(s) for $(MSBuildExtensionsPath32) - "C:\Program Files (x86)\MSBuild" . 
These search paths are defined in "C:\Users\v-redwu\AppData\Local\Microsoft\VisualStudio\17.0_77bac7d4\devenv.exe.config".
Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths.  C:\Users\user\Desktop\1\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.fsproj

Expected result:
No error pops up and Project is loaded correctly.

@vzarytovskii
Copy link
Member Author

Is dev10 EOL already?

@vzarytovskii
Copy link
Member Author

@KevinRansom fyi

@vzarytovskii
Copy link
Member Author

@KevinRansom
Copy link
Member

@vzarytovskii I expect it is, but customer projects built with it are not EOL.

@KevinRansom
Copy link
Member

KevinRansom commented Sep 21, 2021

Okay dokey ...
With VS2012 installed on the machine a VS2012 F# project fails to build in VS2022 with this error:

Rebuild started...
1>------ Rebuild All started: Project: ConsoleApplication1, Configuration: Debug Any CPU ------
1>Build started.
1>Target "CoreCompile" in file "C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" from project "C:\Users\codec\OneDrive\Documents\Visual Studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.fsproj" (target "Compile" depends on it):
1>	C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe -o:obj\Debug\ConsoleApplication1.exe -g --debug:full --noframework --define:DEBUG --define:TRACE --doc:bin\Debug\ConsoleApplication1.XML --optimize- --tailcalls- --platform:anycpu32bitpreferred -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Numerics.dll" --target:exe --warn:3 --warnaserror:76 --vserrors --utf8output --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ "obj\Debug\.NETFramework,Version=v4.5.AssemblyAttributes.fs" Program.fs 
1>C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets(155,9): error MSB4018: The "Fsc" task failed unexpectedly.
1>System.MissingMethodException: Method 'Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpProjectNode.Compile' not found.
1>   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
1>   at Microsoft.FSharp.Build.Fsc.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands)
1>   at Microsoft.Build.Utilities.ToolTask.Execute()
1>   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
1>Target "_CheckForCompileOutputs" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\codec\OneDrive\Documents\Visual Studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.fsproj" (target "_CleanGetCurrentAndPriorFileWrites" depends on it):
1>Target "_CleanGetCurrentAndPriorFileWrites" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\codec\OneDrive\Documents\Visual Studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.fsproj" (target "_CleanRecordFileWrites" depends on it):
1>Target "_CleanRecordFileWrites" in file "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets" from project "C:\Users\codec\OneDrive\Documents\Visual Studio 2012\Projects\ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.fsproj" (target "CoreBuild" depends on it):
1>Done building project "ConsoleApplication1.fsproj" -- FAILED.
1>
1>Build FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Expected: success.

@KevinRansom
Copy link
Member

With VS2012 not installed, a VS2012 F# project fails to load.

image

Expected: project to load and build.

@KevinRansom
Copy link
Member

The code that enabled this was removed here:
0c50721#diff-40d4f4a8b7182ed6a65d72a1c8a14d6d3d1f42671ec6583dade20d0f740d8f7b

Because the APIs it depended on had been where removed from msbuild quite a while earlier if I recall correctly ...

@KevinRansom
Copy link
Member

We are resolving this as won't fix. Visual Studio 2019 committed to open projects from VS2013 --- VS 2019. VS2010 and VS 2012 were not committed to open:

https://docs.microsoft.com/en-us/visualstudio/porting/port-migrate-and-upgrade-visual-studio-projects?view=vs-2022

F# Visual Studio 2019 can open projects created in Visual Studio 2013, Visual Studio 2015, and Visual Studio 2017. A key difference from older Visual Studio templates for new projects is that the FSharp.Core version is now always a NuGet package. F# is installed by default with any .NET Workload.

Kevin

@vzarytovskii
Copy link
Member Author

@KevinRansom could you please make the same comment in the AzDo issue?

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

No branches or pull requests

2 participants