msbuild: dotnet does not generate fsproj.metaproj file, but build process seems to require it
From @colinbowern on June 25, 2017 20:45
Steps to reproduce
- Install .NET Core on WSL Bash per the .NET Core Step-by-Step instructions
- Run through steps to get started with F# on the CLI through to completing “Writing a Class Library” on the Get started with F# with the .NET CLI documentation
- Run “dotnet build”
Expected behavior
Class library compiles
Actual behavior
Failed with error MSB4025: The project file could not be loaded. Could not find file '/mnt/c/Users/colinb/Projects/TestProject/src/Library/Library.fsproj.metaproj
No tooling along the way creates a metaproj file. This file does not exist.
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.4)
Product Information: Version: 1.0.4 Commit SHA-1 hash: af1e6684fd
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS Platform: Linux RID: ubuntu.16.04-x64 Base Path: /usr/share/dotnet/sdk/1.0.4
Copied from original issue: dotnet/cli#7000
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (8 by maintainers)
Commits related to this issue
- Attempted fix for metaproj error See: https://github.com/Microsoft/msbuild/issues/2275 — committed to Porges/fsharp-hedgehog by Porges 6 years ago
- Attempted fix for metaproj error See: https://github.com/Microsoft/msbuild/issues/2275 — committed to Porges/fsharp-hedgehog by Porges 6 years ago
- workaround https://github.com/Microsoft/msbuild/issues/2275 until .NET Core 2.1 migration — committed to Aaronontheweb/akka.net by Aaronontheweb 5 years ago
- Move Build System to .NET Core 2.1, projects to .NET Standard 2.0 and .NET 4.5.2 (#3668) * migrated to 'dotnet test' * added missing variable for detecing TeamCity * added more targets for end-... — committed to akkadotnet/akka.net by Aaronontheweb 5 years ago
- Move Build System to .NET Core 2.1, projects to .NET Standard 2.0 and .NET 4.5.2 (#3668) * migrated to 'dotnet test' * added missing variable for detecing TeamCity * added more targets for end-... — committed to madmonkey/akka.net by Aaronontheweb 5 years ago
- Move Build System to .NET Core 2.1, projects to .NET Standard 2.0 and .NET 4.5.2 (#3668) * migrated to 'dotnet test' * added missing variable for detecing TeamCity * added more targets for end-... — committed to Aaronontheweb/akka.net by Aaronontheweb 5 years ago
I was also having this problem when I noticed that when the project was added to the solution file it got added as
hello\hello.fsprojinstead ofhello/hello.fsproj. After manually changing this I was able to build from the sln.As above, switched
\to/in my.slnsolved this.I just ran into this and can confirm that switching .sln project references from
\to/fixed it. How bizarre.Here is my Travis build before: https://travis-ci.org/hedgehogqa/fsharp-hedgehog/builds/338361850 Here it is after: https://travis-ci.org/hedgehogqa/fsharp-hedgehog/builds/338379628
Switch from
\to/in the.slnsolved for me, but i try another way and removed ProjectDependencies from.slnfile for projects. You can find like this in your.slnfile:ProjectSection(ProjectDependencies) = postProjectafter this
.slnfile successfull build with both variant of paths on unix and windows (i think, what\is more correct variant).Hmm…something strange just happened. I tried to recreate the
.slnfile a second time usingSDK2and deleting theobj/andbin/folders in the project folder and then doingdotnet restoreanddotnet buildand now it works. I don’t know why recreating the.slnfile did not help the first time.