Skip to content

9.0.6 - Self Contained on a \\server\share\directory no longer executes #116521

@tenbaset

Description

@tenbaset

Description

SDK 9.0.6 has an issue where a Self Contained deployment to a network share no longer works, the process ends immediately with result code (0x80008083); irrespective of using a mapped drive letter or a \\unc path. Copying the same files to a local drive and executing there works correctly.

Worked under previous 9.0.5

Reproduction Steps

  1. Build simple "hello world!" exe file
  2. Publish it to a folder on a network share.
  3. Attempt to run it. Observe nothing happens!

Example pubxml:

<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project>
  <PropertyGroup>
    <Configuration>Release</Configuration>
    <Platform>Any CPU</Platform>
    <PublishDir>\\server.domain.local\share\Software\dummy</PublishDir>
    <PublishProtocol>FileSystem</PublishProtocol>
    <_TargetId>Folder</_TargetId>
    <TargetFramework>net9.0</TargetFramework>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <SelfContained>true</SelfContained>
    <PublishSingleFile>false</PublishSingleFile>
    <PublishReadyToRun>false</PublishReadyToRun>
    <PublishTrimmed>false</PublishTrimmed>
  </PropertyGroup>
</Project>

Expected behavior

When running \\server.domain.local\share\Software\dummy\consoleapp1.exe, expect program executes (e.g., output Hello World!)

Actual behavior

Program ends with no output.

Regression?

Worked in previous SDK 9.0.5.

Known Workarounds

  • Previous SDK
  • Copying files locally first

Configuration

  • .Net SDK 9.0.6
  • Self-contained deployment, not single-file
  • Windows 11 x64
  • Believe it is specific to Windows

Other information

Comparing the code tagged 9.0.6 and 9.0.5, this may be related to the (new) calls to is_path_rooted. The C++ "pal::is_path_rooted" (in the Windows implementation) only checks that the second character is a colon, which doesn't work when the path is a \\unc\share path!

I suggest updating is_path_rooted to permit paths that start with \\ as well (it seems mapped drive letters are translated into \\unc representations earlier in the process-startup, verified by using native debugger), but I'm unsure of any wider ramifications of that change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions