Kernel dotnet - missing csproj.metaproj

The following error occurs when creating an MVC project on Ubuntu:

/home/user1/.local/share/Trash/files/pangolin.2/Pangolin.Web/src/Pangolin.Web/Pangolin.Web.csproj.metaproj : error MSB4025: The project file could not be loaded. Could not find file '/home/user1/.local/share/Trash/files/pangolin.2/Pangolin.Web/src/Pangolin.Web/Pangolin.Web.csproj.metaproj'.
0 Warning(s)
1 Error(s)

There are no compilation errors when creating the same project in Windows.

The domain version on both machines is 1.0.0-rc4-004771. A project is created using a team dotnet buildin both environments.

+4
source share
3 answers

The problem was the directory structure. Make sure that any external projects are added to the src directory. Alternatively, you can add an external project as a NuGet dependency.

+4
source

I ran into a very similar problem: it was successfully built on my DevMachine (Windows10), but with an error in CI (Ubuntu 14.04).

:

.gitignore
package/
     deployment_package.zip

src/
    .vs/
    MyService/
        MyService.csproj

    MyService.Tests/
        MyService.Tests.csproj

    MyService.sln

, dotnet build .sln, , .csproj.

Rake:

task :dotnet_build do
  Dir["#{SRC_DIR}/**/*.csproj"].each do |csproj_path|
    raise "Error building: #{csproj_path}" unless system("dotnet build #{csproj_path} --framework netcoreapp1.1")
  end
end

EDIT: dotnet build . /m:1 .

+3

. , src. , NuGet.

. src: . /src/project 1 ./src/project2

global.json: . /global.json

{ "projects": [ "src"],
  "sdk": {
    "version": "1.0.4"
  }
}
0

Source: https://habr.com/ru/post/1671595/


All Articles