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

Referencing the latest compiler from MyGet returns in failure due to error in props file. #25357

Closed
ahsonkhan opened this issue Mar 8, 2018 · 4 comments

Comments

@ahsonkhan
Copy link
Member

ahsonkhan commented Mar 8, 2018

Version Used: 2.8.0 and 2.8.0-beta1-62621-05 (from MyGet)

Steps to Reproduce:

  1. Create a new dotnet core application (dotnet new console).
  2. Confirm that it runs as expected (dotnet run).
  3. Add a pacakge reference to the latest Microsoft.NetCore.Compilers.
<ItemGroup>
    <PackageReference Include="Microsoft.NETCore.Compilers" Version="2.8.0-beta1-62621-05" PrivateAssets="All" />
</ItemGroup>

Expected Behavior:
dotnet run behaves exactly as it did without the PackageReference and outputs:
Hello World!

Actual Behavior:
We get a build failure.

C:\Users\ahkha\.nuget\packages\microsoft.netcore.compilers\2.8.0-beta1-62621-05\build\Microsoft.NETCore.Compilers.props(34,11): error MSB4101: Expected a closing quote after position 153 in condition "'$(BuildingProject)' == 'true' AND                      '$(OS)' != 'Windows_NT' AND                      ('$(CscToolPath)' != '' OR '$(VbcToolPath) != '')". [D:\GitHub\Fork\corefxlab\TestCompiler\TestCompiler.csproj]

The build failed. Please fix the build errors and run again.

In the Microsoft.NETCore.Compilers.props file (C:\Users\<user>\.nuget\packages\microsoft.netcore.compilers\2.8.0-beta1-62621-05\build\Microsoft.NETCore.Compilers.props), you will notice, we are missing a closing quote around VbcToolPath:
This:

  <Target Name="MakeCompilerScriptsExecutable"
          Condition="'$(BuildingProject)' == 'true' AND
                     '$(OS)' != 'Windows_NT' AND
                     ('$(CscToolPath)' != '' OR '$(VbcToolPath) != '')"

Should be:

  <Target Name="MakeCompilerScriptsExecutable"
          Condition="'$(BuildingProject)' == 'true' AND
                     '$(OS)' != 'Windows_NT' AND
                     ('$(CscToolPath)' != '' OR '$(VbcToolPath)' != '')"
@ahsonkhan
Copy link
Member Author

Edit: Looking more closely, I just realized this was already fixed recently in 930152a#diff-71e9a985d536f4a8148dfe9cbf143aaeL36 from #25220

Previous issue: #25219

cc @agocke, @VSadov

Closing the issue.

@ahsonkhan
Copy link
Member Author

When can we expect a newer version of the compiler with this fixed? The latest one was published around 2 weeks ago - Fri, 23 Feb 2018.

@agocke
Copy link
Member

agocke commented Mar 9, 2018

2.8.0-beta2-62708-09 is available and a couple hours old at the most

@ahsonkhan
Copy link
Member Author

2.8.0-beta2-62708-09 is available and a couple hours old at the most

Thanks! I was looking at the wrong feed. I was grabbing packages from https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.NETCore.Compilers/2.8.0-beta1-62621-05 rather than roslyn.

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

2 participants