Skip to content

The "CreateAppHost" task failed unexpectedly when building a project that is streamed from Google Drive for Desktop #37652

Open
@CanePlayz

Description

@CanePlayz

Describe the bug

Building any project that is streamed from Google Drive with their desktop app fails. Building on any .NET 7 SDK on the same device with the same setup works flawlessly. Building on the .NET 8 SDK with files not streamed from Google Drive also works fine.

To Reproduce

Stream (not mirror) files of a dotnet project with Google Drive to your PC, then try to do dotnet build or something similar which involves CreateAppHost. Even if you stop sync, it will not work. First, it'd be great if someone could reproduce that setup and see if they also encounter this problem.

Exceptions (if any)

error MSB4018: The "CreateAppHost" tas
k failed unexpectedly. [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programmierung\Woche 3\Aufgabe-03-3\Zahlen.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018: System.IO.IOException: 
Der Vorgang ist bei einer Datei mit einem geöffneten Bereich, der einem Benutzer zugeordnet ist, nicht anwendbar. [G:\Meine Ablage\Daten\In
formatik\Uni\Grundlagen der Programmierung\Woche 3\Aufgabe-03-3\Zahlen.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at System.IO.MemoryM
appedFiles.MemoryMappedFile.CreateCore(SafeFileHandle fileHandle, String mapName, HandleInheritability inheritability, MemoryMappedFileAcce
ss access, MemoryMappedFileOptions options, Int64 capacity, Int64 fileSize) [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programmie
rung\Woche 3\Aufgabe-03-3\Zahlen.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at Microsoft.NET.Hos
tModel.ResourceUpdater.Update() [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programmierung\Woche 3\Aufgabe-03-3\Zahlen.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at Microsoft.NET.Hos
tModel.AppHost.HostWriter.<>c__DisplayClass2_0.<CreateAppHost>b__1() [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programmierung\Wo
che 3\Aufgabe-03-3\Zahlen.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at Microsoft.NET.Hos
tModel.RetryUtil.RetryOnIOError(Action func) [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programmierung\Woche 3\Aufgabe-03-3\Zahle
n.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at Microsoft.NET.Hos
tModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean 
windowsGraphicalUserInterface, String assemblyToCopyResourcesFrom, Boolean enableMacOSCodeSign) [G:\Meine Ablage\Daten\Informatik\Uni\Grund
lagen der Programmierung\Woche 3\Aufgabe-03-3\Zahlen.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at Microsoft.NET.Bui
ld.Tasks.CreateAppHost.ExecuteCore() [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programmierung\Woche 3\Aufgabe-03-3\Zahlen.fsproj
]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at Microsoft.NET.Bui
ld.Tasks.TaskBase.Execute() [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programmierung\Woche 3\Aufgabe-03-3\Zahlen.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at Microsoft.Build.B
ackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programm
ierung\Woche 3\Aufgabe-03-3\Zahlen.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(709,5): error MSB4018:    at Microsoft.Build.B
ackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, 
ItemBucket bucket, TaskExecutionMode howToExecuteTask) [G:\Meine Ablage\Daten\Informatik\Uni\Grundlagen der Programmierung\Woche 3\Aufgabe-
03-3\Zahlen.fsproj]

Further technical details

dotnet info:

.NET SDK:
 Version:           8.0.100
 Commit:            57efcf1350
 Workload version:  8.0.100-manifests.6c33ef20

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.26016
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.100\

.NET workloads installed:
 Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.

Host:
  Version:      8.0.0
  Architecture: x64
  Commit:       5535e31a71

.NET SDKs installed:
  8.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found
  • VS Code/dotnet from CLI

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions