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

VB compiler incorrectly parses paths in /embed switch containing , #30586

Closed
tmat opened this issue Oct 18, 2018 · 4 comments
Closed

VB compiler incorrectly parses paths in /embed switch containing , #30586

tmat opened this issue Oct 18, 2018 · 4 comments
Labels
Area-Compilers Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Milestone

Comments

@tmat
Copy link
Member

tmat commented Oct 18, 2018

Both
vbc /debug:portable program.vb /embed:a,b.vb and
vbc /debug:portable program.vb /embed:"a,b.vb"

result in errors:

vbc : error BC2001: file 'C:\Temp\a' could not be found
vbc : error BC2001: file 'C:\Temp\b.vb' could not be found

This issue is not limited to command line. The problem is also with vbc task:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <RootNamespace>vb</RootNamespace>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <EmbeddedFiles Include="a,b.vb" />
  </ItemGroup>
</Project>

image

This is a problem since .NET SDK uses comma in generated file name:
.NETStandard,Version=v2.0.AssemblyAttributes.vb

@tmat tmat changed the title VB compiler incorrectly parses /embed switch containing , VB compiler incorrectly parses paths in /embed switch containing , Oct 18, 2018
@jaredpar
Copy link
Member

What is the expected behavior here?

@jaredpar jaredpar added the Need More Info The issue needs more information to proceed. label Oct 29, 2018
@tmat
Copy link
Member Author

tmat commented Oct 29, 2018

Not treat , as a path separator.

@AArnott
Copy link
Contributor

AArnott commented Dec 7, 2018

See also #31611 which talks about the Sources input specifically. So this problem is shared across both inputs.

@AArnott
Copy link
Contributor

AArnott commented Dec 7, 2018

OK, so that one was a dupe of this.

But this issue is becoming more important IMO because of the recommendation to embed untracked source files in the portable PDB. I can get a new VB project to repro the failure just by adding two lines:

 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <RootNamespace>b</RootNamespace>
     <TargetFramework>netcoreapp2.2</TargetFramework>
+     <EmbedUntrackedSources>true</EmbedUntrackedSources>
   </PropertyGroup>

   <ItemGroup>
+     <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta-63127-02" PrivateAssets="All" />
   </ItemGroup>

 </Project>

AArnott added a commit to AArnott/SPSS.NET that referenced this issue Dec 7, 2018
@tmat tmat added Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented and removed Need More Info The issue needs more information to proceed. labels Dec 29, 2018
@tmat tmat added this to the 16.0 milestone Dec 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Resolution-Fixed The bug has been fixed and/or the requested behavior has been implemented
Projects
None yet
Development

No branches or pull requests

3 participants