-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
REGRESSION INFO: Works well on 10.0.102 and 10.0.103(Feb Servicing) SDK
INSTALL STEPS
- Clean Linux OS ,e.g Ubuntu 24.04.3 LTS
- Install the .NET 10.0.200-preview SDK from coherent build
- Add feed
Platform
- Windows
- macOS
- Linux
Repro Steps
- Run open up a normal Terminal Emulator
- Create a folder and create an MVC F# project in it:
mkdir MVCFS
cd MVCFS
dotnet new mvc -lang F#
- Publish to a local folder:
dotnet publish - Observe the results
Note:
- This issue does not repro on Windows and MacOS.
- This issue does not repro when publishing mvc and blazor project.
- This issue also repro on Blazor WebAssembly Standalone App.
- There is a similar issue file on .NET 11.0: [NETSDKE2E] [Mac][Linux] Publishing Blazor WebAssembly Standalone App failed with error MSB3021with .NET 11 SDK binary installer on Mac or Linux sdk#52635
- Here is the binlog file: msbuild.zip
Actual Result
Publishing failed with error MSB3021

Error Log
parallels@ubuntu-linux-22-04-02-desktop:~/MVCFS$ dotnet publish
Restore complete (1.2s)
info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
MVCFS net10.0 failed with 7 error(s) (27.7s) → bin/Release/net10.0/MVCFS.dll
/home/parallels/dotnet/sdk/10.0.200-preview.0.26073.117/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(372,5): error MSB3021: Unable to copy file "/home/parallels/MVCFS/Views/Shared/_Layout.cshtml" to "bin/Release/net10.0/publish/../../../../../../MVCFS/Views/Shared/_Layout.cshtml". Access to the path '/home/MVCFS' is denied.
/home/parallels/dotnet/sdk/10.0.200-preview.0.26073.117/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(372,5): error MSB3021: Unable to copy file "/home/parallels/MVCFS/Views/Shared/_ValidationScriptsPartial.cshtml" to "bin/Release/net10.0/publish/../../../../../../MVCFS/Views/Shared/_ValidationScriptsPartial.cshtml". Access to the path '/home/MVCFS' is denied.
/home/parallels/dotnet/sdk/10.0.200-preview.0.26073.117/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(372,5): error MSB3021: Unable to copy file "/home/parallels/MVCFS/Views/_ViewImports.cshtml" to "bin/Release/net10.0/publish/../../../../../../MVCFS/Views/_ViewImports.cshtml". Access to the path '/home/MVCFS' is denied.
/home/parallels/dotnet/sdk/10.0.200-preview.0.26073.117/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(372,5): error MSB3021: Unable to copy file "/home/parallels/MVCFS/Views/_ViewStart.cshtml" to "bin/Release/net10.0/publish/../../../../../../MVCFS/Views/_ViewStart.cshtml". Access to the path '/home/MVCFS' is denied.
/home/parallels/dotnet/sdk/10.0.200-preview.0.26073.117/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(372,5): error MSB3021: Unable to copy file "/home/parallels/MVCFS/Views/Shared/Error.cshtml" to "bin/Release/net10.0/publish/../../../../../../MVCFS/Views/Shared/Error.cshtml". Access to the path '/home/MVCFS' is denied.
/home/parallels/dotnet/sdk/10.0.200-preview.0.26073.117/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(372,5): error MSB3021: Unable to copy file "/home/parallels/MVCFS/Views/Home/Privacy.cshtml" to "bin/Release/net10.0/publish/../../../../../../MVCFS/Views/Home/Privacy.cshtml". Access to the path '/home/MVCFS' is denied.
/home/parallels/dotnet/sdk/10.0.200-preview.0.26073.117/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Publish.targets(372,5): error MSB3021: Unable to copy file "/home/parallels/MVCFS/Views/Home/Index.cshtml" to "bin/Release/net10.0/publish/../../../../../../MVCFS/Views/Home/Index.cshtml". Access to the path '/home/MVCFS' is denied.
Build failed with 7 error(s) in 29.4s
dotnet --info
``
parallels@ubuntu-linux-22-04-02-desktop:~$ dotnet --info
.NET SDK:
Version: 10.0.200-preview.0.26073.117
Commit: 181f879891
Workload version: 10.0.200-manifests.355811b7
MSBuild version: 18.3.0-release-26073-117+181f87989
Runtime Environment:
OS Name: ubuntu
OS Version: 24.04
OS Platform: Linux
RID: linux-x64
Base Path: /home/parallels/dotnet/sdk/10.0.200-preview.0.26073.117/
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 10.0.2
Architecture: x64
Commit: 4452502459
.NET SDKs installed:
10.0.200-preview.0.26073.117 [/home/parallels/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.2 [/home/parallels/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.2 [/home/parallels/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download