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

Revert the change to update default tools version #455

Closed
wants to merge 1 commit into from
Closed

Revert the change to update default tools version #455

wants to merge 1 commit into from

Conversation

7sharp9
Copy link
Member

@7sharp9 7sharp9 commented Nov 2, 2015

Setting this to 12.0 on mono no longer causes an exception which means
that 12.0 is always used.

The problem with this is that any iOS projects fail completely on the line project.Load(fsprojFile). So
setting this to 4.0 on mono seems the safest thing to do.

Setting this to 12.0 on mono no longer causes an exception which means
that 12.0 is always used.  The problem with this is that any iOS
projects fail completely on the line `project.Load(fsprojFile)`.  So
setting this to 4.0 on mono seems the safest thing to do.
@rneatherway
Copy link
Member

From Travis it looks like this breaks on Mono 4.0.x

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 2, 2015

ha, well currently its broken on mono 4.2

@rneatherway
Copy link
Member

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 4, 2015

RE Project file parsing -- 2nd level references I only get 4 references, I don't get the 5th reference which is the project reference Test1.dll, I get this with or without this PR. Is that what you get @rneatherway ?

@rneatherway
Copy link
Member

On my system I get all 5 references (Mono JIT compiler version 4.0.4). I think it's worth turning the logging on for your system and rerun the tests to see what the problem is.

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 4, 2015

No errors:

Loading default tasks for ToolsVersion: 4.0 from /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.tasks
/Users/dave/code/FCS/tests/service/data/Test2.fsproj: Importing project /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets from extension path /Library/Frameworks/Mono.framework/External/xbuild
/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets: Importing project /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.FSharp.Targets 
/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.FSharp.Targets: Importing project /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets 
Build started.
Project started.
/Users/dave/code/FCS/tests/service/data/Test2.fsproj: Importing project /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets from extension path /Library/Frameworks/Mono.framework/External/xbuild
/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets: Importing project /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.FSharp.Targets 
/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.FSharp.Targets: Importing project /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets 
Building target "_ValidateEssentialProperties" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets").
Target _ValidateEssentialProperties started.
Target _ValidateEssentialProperties finished.
Done building target "_ValidateEssentialProperties" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets").
Building target "ResolveReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets").
Building target "BeforeResolveReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Done building target "BeforeResolveReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "ResolveProjectReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "SplitProjectReferencesByExistent" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveProjectReferences" depends on it.
Building target "AssignProjectConfiguration" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "SplitProjectReferencesByExistent" depends on it.
Target AssignProjectConfiguration started.
Task started.
Using task AssignProjectConfiguration from Microsoft.Build.Tasks.AssignProjectConfiguration, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Target AssignProjectConfiguration finished.
Done building target "AssignProjectConfiguration" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "SplitProjectReferencesByExistent" depends on it.
Target SplitProjectReferencesByExistent started.
Target SplitProjectReferencesByExistent finished.
Done building target "SplitProjectReferencesByExistent" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveProjectReferences" depends on it.
Target ResolveProjectReferences started.
Target ResolveProjectReferences finished.
Done building target "ResolveProjectReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "ResolveAssemblyReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "GetFrameworkPaths" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Target GetFrameworkPaths started.
Task started.
Using task GetFrameworkPath from Microsoft.Build.Tasks.GetFrameworkPath, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task CreateProperty from Microsoft.Build.Tasks.CreateProperty, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Target GetFrameworkPaths finished.
Done building target "GetFrameworkPaths" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Building target "GetReferenceAssemblyPaths" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Target GetReferenceAssemblyPaths started.
Task started.
Using task CreateProperty from Microsoft.Build.Tasks.CreateProperty, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task GetReferenceAssemblyPaths from Microsoft.Build.Tasks.GetReferenceAssemblyPaths, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Looking for framework '.NETFramework,Version=v4.0' in root path '/Library/Frameworks/Mono.framework/External/xbuild-frameworks'
Unable to find framework definition file '/Library/Frameworks/Mono.framework/External/xbuild-frameworks/.NETFramework/v4.0/RedistList/FrameworkList.xml' for Target Framework Moniker '.NETFramework,Version=v4.0'
Looking for framework '.NETFramework,Version=v4.0' in root path '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/../xbuild-frameworks'
Found framework definition list '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/../xbuild-frameworks/.NETFramework/v4.0/RedistList/FrameworkList.xml' for framework '.NETFramework,Version=v4.0'
Task finished.
Target GetReferenceAssemblyPaths finished.
Done building target "GetReferenceAssemblyPaths" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Building target "PrepareForBuild" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Building target "AssignLinkMetadata" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "PrepareForBuild" depends on it.
Target AssignLinkMetadata started.
Target AssignLinkMetadata finished.
Done building target "AssignLinkMetadata" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "PrepareForBuild" depends on it.
Target PrepareForBuild started.
Task started.
Using task Message from Microsoft.Build.Tasks.Message, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Configuration: Debug Platform: x86
Task finished.
Task started.
Using task FindAppConfigFile from Microsoft.Build.Tasks.FindAppConfigFile, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task MakeDir from Microsoft.Build.Tasks.MakeDir, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Target PrepareForBuild finished.
Done building target "PrepareForBuild" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Target ResolveAssemblyReferences started.
Task started.
Using task CreateItem from Microsoft.Build.Tasks.CreateItem, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task CreateItem from Microsoft.Build.Tasks.CreateItem, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task ResolveAssemblyReference from Microsoft.Build.Tasks.ResolveAssemblyReference, Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
TargetFrameworkDirectories:
    /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.0
SearchPaths:
    {CandidateAssemblyFiles}
    {HintPathFromItem}
    {TargetFrameworkDirectory}
    {PkgConfig}
    {GAC}
    {RawFileName}
    Test2/bin/Debug/

Primary Reference FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a resolved to /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/gac/FSharp.Core/4.3.0.0__b03f5f7f11d50a3a/FSharp.Core.dll. CopyLocal = True
    Reference found at search path {GAC}
For searchpath {CandidateAssemblyFiles}
Warning: {CandidateAssemblyFiles} not supported currently
For searchpath {HintPathFromItem}
HintPath attribute not found
For searchpath {TargetFrameworkDirectory}
Considered target framework dir /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.0, assembly name 'FSharp.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' did not match the expected 'FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' (SpecificVersion=True)
For searchpath {PkgConfig}
Considered FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, but could not find in any pkg-config files.
For searchpath {GAC}

Primary Reference mscorlib
    Reference mscorlib resolved to /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.0/mscorlib.dll. CopyLocal = False
    Reference found at search path {TargetFrameworkDirectory}
For searchpath {CandidateAssemblyFiles}
Warning: {CandidateAssemblyFiles} not supported currently
For searchpath {HintPathFromItem}
HintPath attribute not found
For searchpath {TargetFrameworkDirectory}

Primary Reference System
    Reference System resolved to /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.0/System.dll. CopyLocal = False
    Reference found at search path {TargetFrameworkDirectory}
For searchpath {CandidateAssemblyFiles}
Warning: {CandidateAssemblyFiles} not supported currently
For searchpath {HintPathFromItem}
HintPath attribute not found
For searchpath {TargetFrameworkDirectory}

Primary Reference System.Core
    Reference System.Core resolved to /Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.0/System.Core.dll. CopyLocal = False
    Reference found at search path {TargetFrameworkDirectory}
For searchpath {CandidateAssemblyFiles}
Warning: {CandidateAssemblyFiles} not supported currently
For searchpath {HintPathFromItem}
HintPath attribute not found
For searchpath {TargetFrameworkDirectory}
Task finished.
Target ResolveAssemblyReferences finished.
Done building target "ResolveAssemblyReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "AfterResolveReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Done building target "AfterResolveReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "ImplicitlyExpandDesignTimeFacades" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Target ImplicitlyExpandDesignTimeFacades started.
Target ImplicitlyExpandDesignTimeFacades finished.
Done building target "ImplicitlyExpandDesignTimeFacades" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Done building target "ResolveReferences" in project "/Users/dave/code/FCS/tests/service/data/Test2.fsproj" ("/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5/Microsoft.Common.targets").
Project started.
Build finished.

@nosami
Copy link
Member

nosami commented Nov 4, 2015

I get the same failing test with and without the patch.

1) Test Failure : FSharp.Compiler.Service.Tests.ProjectOptionsTests.Project file parsing -- 2nd level references
    Expected: "Found 'Test1.dll'"
Actual: "Failed to find 'Test1.dll'"
 Expected string length 17 but was 26. Strings differ at index 1.
 Expected: "Found 'Test1.dll'"
 But was:  "Failed to find 'Test1.dll'"
16:28 $ mono --version
Mono JIT compiler version 4.2.1 (explicit/8862921 Thu Oct 29 17:09:16 EDT 2015)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           normal
    SIGSEGV:       altstack
    Notification:  kqueue
    Architecture:  x86
    Disabled:      none
    Misc:          softdebug
    LLVM:          yes(3.6.0svn-mono-(detached/a173357)
    GC:            seen

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 4, 2015

@rneatherway Would the project reference dll normally be in project.GetEvaluatedItemsByName("ChildProjectReferences") ??

Because thats combing back empty.

@rneatherway
Copy link
Member

Yes, that's what I expect.

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 4, 2015

Hmm, well Im stumped, no idea

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 4, 2015

@rneatherway Do you have the log that produced the correct result so we can compare it to the one above?

@rneatherway
Copy link
Member

Sure I'll run it tomorrow.

@rneatherway
Copy link
Member

Loading default tasks for ToolsVersion: 12.0 from /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.tasks
/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj: Importing project /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets from extension path /usr/lib/mono/xbuild
/usr/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets: Importing project /usr/lib/mono/4.5/Microsoft.FSharp.Targets 
/usr/lib/mono/4.5/Microsoft.FSharp.Targets: Importing project /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets from extension path /usr/lib/mono/xbuild
Build started.
Project started.
/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj: Importing project /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets from extension path /usr/lib/mono/xbuild
/usr/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets: Importing project /usr/lib/mono/4.5/Microsoft.FSharp.Targets 
/usr/lib/mono/4.5/Microsoft.FSharp.Targets: Importing project /usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets from extension path /usr/lib/mono/xbuild
Building target "_ValidateEssentialProperties" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets").
Target _ValidateEssentialProperties started.
Target _ValidateEssentialProperties finished.
Done building target "_ValidateEssentialProperties" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets").
Building target "ResolveReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets").
Building target "BeforeResolveReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Done building target "BeforeResolveReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "ResolveProjectReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "SplitProjectReferencesByExistent" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveProjectReferences" depends on it.
Building target "AssignProjectConfiguration" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "SplitProjectReferencesByExistent" depends on it.
Target AssignProjectConfiguration started.
Task started.
Using task CreateItem from Microsoft.Build.Tasks.CreateItem, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Target AssignProjectConfiguration finished.
Done building target "AssignProjectConfiguration" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "SplitProjectReferencesByExistent" depends on it.
Target SplitProjectReferencesByExistent started.
Task started.
Using task CreateItem from Microsoft.Build.Tasks.CreateItem, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Target SplitProjectReferencesByExistent finished.
Done building target "SplitProjectReferencesByExistent" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveProjectReferences" depends on it.
Target ResolveProjectReferences started.
Task started.
Using task MSBuild from Microsoft.Build.Tasks.MSBuild, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Global Properties:
Loading default tasks for ToolsVersion: 4.0 from /usr/lib/mono/4.5/Microsoft.Common.tasks
/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test1.fsproj: Importing project /usr/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets from extension path /usr/lib/mono/xbuild
/usr/lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets: Importing project /usr/lib/mono/4.5/Microsoft.FSharp.Targets 
/usr/lib/mono/4.5/Microsoft.FSharp.Targets: Importing project /usr/lib/mono/4.5/Microsoft.Common.targets 
Project started.
Building target "_ValidateEssentialProperties" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test1.fsproj" ("/usr/lib/mono/4.5/Microsoft.Common.targets").
Target _ValidateEssentialProperties started.
Target _ValidateEssentialProperties finished.
Done building target "_ValidateEssentialProperties" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test1.fsproj" ("/usr/lib/mono/4.5/Microsoft.Common.targets").
Building target "GetTargetPath" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test1.fsproj" ("/usr/lib/mono/4.5/Microsoft.Common.targets").
Done building target "GetTargetPath" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test1.fsproj" ("/usr/lib/mono/4.5/Microsoft.Common.targets").
Project started.
Task finished.
Target ResolveProjectReferences finished.
Done building target "ResolveProjectReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "ResolveAssemblyReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "GetFrameworkPaths" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Target GetFrameworkPaths started.
Task started.
Using task GetFrameworkPath from Microsoft.Build.Tasks.GetFrameworkPath, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task CreateProperty from Microsoft.Build.Tasks.CreateProperty, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Target GetFrameworkPaths finished.
Done building target "GetFrameworkPaths" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Building target "GetReferenceAssemblyPaths" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Target GetReferenceAssemblyPaths started.
Task started.
Using task CreateProperty from Microsoft.Build.Tasks.CreateProperty, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task GetReferenceAssemblyPaths from Microsoft.Build.Tasks.GetReferenceAssemblyPaths, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Looking for framework '.NETFramework,Version=v4.0' in root path '/usr/lib/mono/4.5/../xbuild-frameworks'
Found framework definition list '/usr/lib/mono/4.5/../xbuild-frameworks/.NETFramework/v4.0/RedistList/FrameworkList.xml' for framework '.NETFramework,Version=v4.0'
Task finished.
Target GetReferenceAssemblyPaths finished.
Done building target "GetReferenceAssemblyPaths" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Building target "PrepareForBuild" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Building target "AssignLinkMetadata" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "PrepareForBuild" depends on it.
Target AssignLinkMetadata started.
Target AssignLinkMetadata finished.
Done building target "AssignLinkMetadata" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "PrepareForBuild" depends on it.
Target PrepareForBuild started.
Task started.
Using task Message from Microsoft.Build.Tasks.Message, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Configuration: Debug Platform: x86
Task finished.
Task started.
Using task FindAppConfigFile from Microsoft.Build.Tasks.FindAppConfigFile, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task MakeDir from Microsoft.Build.Tasks.MakeDir, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Target PrepareForBuild finished.
Done building target "PrepareForBuild" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveAssemblyReferences" depends on it.
Target ResolveAssemblyReferences started.
Task started.
Using task CreateItem from Microsoft.Build.Tasks.CreateItem, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task CreateItem from Microsoft.Build.Tasks.CreateItem, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Task finished.
Task started.
Using task ResolveAssemblyReference from Microsoft.Build.Tasks.ResolveAssemblyReference, Microsoft.Build.Tasks.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
TargetFrameworkDirectories:
    /usr/lib/mono/4.0
SearchPaths:
    {CandidateAssemblyFiles}
    {HintPathFromItem}
    {TargetFrameworkDirectory}
    {PkgConfig}
    {GAC}
    {RawFileName}
    Test2/bin/Debug/

Primary Reference FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Reference FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a resolved to /usr/lib/mono/gac/FSharp.Core/4.3.0.0__b03f5f7f11d50a3a/FSharp.Core.dll. CopyLocal = True
    Reference found at search path {GAC}
For searchpath {CandidateAssemblyFiles}
Warning: {CandidateAssemblyFiles} not supported currently
For searchpath {HintPathFromItem}
HintPath attribute not found
For searchpath {TargetFrameworkDirectory}
Considered target framework dir /usr/lib/mono/4.0, assembly named 'FSharp.Core' not found.
For searchpath {PkgConfig}
Considered FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, but could not find in any pkg-config files.
For searchpath {GAC}

Primary Reference mscorlib
    Reference mscorlib resolved to /usr/lib/mono/4.0/mscorlib.dll. CopyLocal = False
    Reference found at search path {TargetFrameworkDirectory}
For searchpath {CandidateAssemblyFiles}
Warning: {CandidateAssemblyFiles} not supported currently
For searchpath {HintPathFromItem}
HintPath attribute not found
For searchpath {TargetFrameworkDirectory}

Primary Reference System
    Reference System resolved to /usr/lib/mono/4.0/System.dll. CopyLocal = False
    Reference found at search path {TargetFrameworkDirectory}
For searchpath {CandidateAssemblyFiles}
Warning: {CandidateAssemblyFiles} not supported currently
For searchpath {HintPathFromItem}
HintPath attribute not found
For searchpath {TargetFrameworkDirectory}

Primary Reference System.Core
    Reference System.Core resolved to /usr/lib/mono/4.0/System.Core.dll. CopyLocal = False
    Reference found at search path {TargetFrameworkDirectory}
For searchpath {CandidateAssemblyFiles}
Warning: {CandidateAssemblyFiles} not supported currently
For searchpath {HintPathFromItem}
HintPath attribute not found
For searchpath {TargetFrameworkDirectory}

Primary Reference from AssemblyFiles /home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test1/bin/Debug//Test1.dll, file not found. Ignoring
Task finished.
Target ResolveAssemblyReferences finished.
Done building target "ResolveAssemblyReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "AfterResolveReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Done building target "AfterResolveReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Building target "ImplicitlyExpandDesignTimeFacades" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Target ImplicitlyExpandDesignTimeFacades started.
Target ImplicitlyExpandDesignTimeFacades finished.
Done building target "ImplicitlyExpandDesignTimeFacades" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets"); "ResolveReferences" depends on it.
Done building target "ResolveReferences" in project "/home/robin/dev/other/FSharp.Compiler.Service/tests/service/data/Test2.fsproj" ("/usr/lib/mono/xbuild/12.0/bin/Microsoft.Common.targets").

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 5, 2015

This mono commit looks to have broken FCS: mono/mono@76c6a08#diff-59afd196a55d61d5d1eaaef7bd49d1e5

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 5, 2015

Im closing this as I no longer want this merged, but the issue still exists with mono, Im not sure whether a patch is required to mono or here yet.

@7sharp9 7sharp9 closed this Nov 5, 2015
@7sharp9 7sharp9 deleted the fix-tools-version branch November 5, 2015 13:46
@rneatherway
Copy link
Member

@7sharp9 I'm surprised that is what causes it because I do set BuildingInsideVisualStudio to true and this looks like it should make it more likely to work.

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 5, 2015

If I revert that change, all the test pass.

@rneatherway
Copy link
Member

OK, that's certain then! I took another look and I guess various things are ending up in AssignedProjects rather than Include, but I'm not sure how to access that. I guess @DavidKarlas might be able to explain.

@DavidKarlas
Copy link

I'm pretty sure problem appears here where XBuild/Mono in case of solution not set bails out and doesn't set anything:
https://github.com/mono/mono/blob/master/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/AssignProjectConfiguration.cs#L52

But MSBuild/.Net does some magic:
https://github.com/Microsoft/msbuild/blob/a4e0dd5f4b31a6c9acb1bab25ac401c438c3dfac/src/XMakeTasks/AssignProjectConfiguration.cs#L421

FYI, we will revert this change soon, since it's causing too much problems and revisit it for next release...

@7sharp9 7sharp9 restored the fix-tools-version branch November 5, 2015 17:48
@7sharp9 7sharp9 reopened this Nov 5, 2015
@7sharp9
Copy link
Member Author

7sharp9 commented Nov 5, 2015

Actually I'll reopen this, with the mono changes reverted we are still in the same position.

Project that have no tools version specified are implicitly initialised with 12.0. For projects with no tools version this can result in errors such as iOS applications, where the loading of the initial project simply fails:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.FSharp.targets could not import "$(FSharpTargets)"
  at Microsoft.Build.BuildEngine.Import.ForEachExtensionPathTillFound (System.Xml.XmlElement xmlElement, Microsoft.Build.BuildEngine.Project project, Microsoft.Build.BuildEngine.ImportedProject importingProject, System.Func`3 func) [0x002e1] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs:228 
  at Microsoft.Build.BuildEngine.Project.AddImport (System.Xml.XmlElement xmlElement, Microsoft.Build.BuildEngine.ImportedProject importingProject, Boolean evaluate_properties) [0x0007b] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs:1131 
  at Microsoft.Build.BuildEngine.Project.ProcessElements (System.Xml.XmlElement rootElement, Microsoft.Build.BuildEngine.ImportedProject ip) [0x0017b] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs:935 
  at Microsoft.Build.BuildEngine.Import.Evaluate (Boolean ignoreMissingImports) [0x00088] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs:116 
  at Microsoft.Build.BuildEngine.Project.AddSingleImport (System.Xml.XmlElement xmlElement, System.String projectPath, Microsoft.Build.BuildEngine.ImportedProject importingProject, System.String from_source_msg) [0x0016a] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs:1217 
  at Microsoft.Build.BuildEngine.Project+<AddImport>c__AnonStorey4.<>m__0 (System.String importPath, System.String from_source_msg) [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs:1132 
  at Microsoft.Build.BuildEngine.Import.ForEachExtensionPathTillFound (System.Xml.XmlElement xmlElement, Microsoft.Build.BuildEngine.Project project, Microsoft.Build.BuildEngine.ImportedProject importingProject, System.Func`3 func) [0x00228] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs:208 

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 5, 2015

I believe the tests fail because the msbuild calls need to be made with assembly redirects, otherwise there will always be version mismatches with 4.0/12.0.

In XS we call the API from a separate process with assembly redirects in place to handle this.

@rneatherway
Copy link
Member

@7sharp9 I have an almost-completed PR for out-of-process project cracking. Hopefully that will fix this issue.

@7sharp9
Copy link
Member Author

7sharp9 commented Nov 5, 2015

Yeah its fiddly in process, this previously worked because it threw an exception assigning 12.0 to the default version, thus it always assigned 4.0. With the latest mono it no longer throws and the build engine fails instead when the project is loaded.

@dsyme
Copy link
Contributor

dsyme commented Dec 2, 2015

Closing as this was address by @rneatherway's PR 👍

@dsyme dsyme closed this Dec 2, 2015
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