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

Build fails when using sdk version 7.0.100. #30735

Closed
v-mikedu opened this issue Feb 20, 2023 · 6 comments
Closed

Build fails when using sdk version 7.0.100. #30735

v-mikedu opened this issue Feb 20, 2023 · 6 comments

Comments

@v-mikedu
Copy link

v-mikedu commented Feb 20, 2023

Repro steps:

  1. Install 7.0.100 SDK from: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-7.0.100-macos-x64-installer
  2. Run the following command in Terminal:
    mkdir Razor
    cd Razor
    dotnet new sln
    mkdir Razor70
    cd Razor70
    dotnet new razor
    cd ..
    dotnet sln add Razor70/Razor70.csproj
    dotnet build "Razor.sln" -c Release -o /app/build --no-restore

Expected Result:
Solutions can be successfully built.

Actual Result:
Some warnings and errors appear when building solution.
image

dotnet --info:

.NET SDK:
Version: 7.0.100
Commit: e12b7af
Runtime Environment:
OS Name: Mac OS X
OS Version: 13.2
OS Platform: Darwin
RID: osx.13-x64
Base Path: /usr/local/share/dotnet/sdk/7.0.100/
Host:
Version: 7.0.0
Architecture: x64
Commit: d099f075e4
.NET SDKs installed:
7.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found: None
Environment variables: Not set
global.json file: Not foun
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download

@dsplaisted
Copy link
Member

Some questions:

  • Do you have access to /app/build?
  • Does this fail if you build the project with an output path instead of the solution?
  • Does this fail in 7.0.100?
  • Can you attach a binlog of the failure?

Thanks

@dsplaisted
Copy link
Member

The error message says "read-only file system", so I think the issue is that you don't have write access to the output folder, and isn't related to this version of the .NET SDK.

@v-mikedu
Copy link
Author

v-mikedu commented Feb 21, 2023

Here's information about the error and "dotnet --info". errorinfo.docx.
dotnetinfo.docx

@v-mikedu
Copy link
Author

  • I tried to enter the path: "/app/build/Mvc.staticwebassets.runtime.json", but I didn't seem to have permission to enter. Here's information about path:accessinfo.rtfd.zip

  • I tried running the command: "dotnet build -c Release -o /app/build --no-restore" still reproduces the issue.

  • Also fails in sdk 7.0.100, reproducing this issue.

@v-mikedu v-mikedu changed the title Build fails when using sdk version 7.0.201. Build fails when using sdk version 7.0.100. Feb 21, 2023
@v-qushi
Copy link

v-qushi commented Feb 21, 2023

@dsplaisted
I tried to get binlog according to the document binlog you provided, but I'm not able to figure out exactly how to do it.

For this issue, I tried to use other path as the output path, such as ‘/users/XXX’, build can succeed.
Build

The reason I use /app/build as the output path is because I'm just trying to reproduce the original bug #30625.

@dsplaisted
Copy link
Member

To create a binlog, you just add the -bl parameter to the MSBuild command line, and it will create a file called msbuild.binlog.

I imagine the machine environment for the original repro was different somehow, and /app/build was write-accessible.

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

No branches or pull requests

3 participants