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

CoreGenerateSatelliteAssemblies broken for all languages except C# #1748

Closed
tmeschter opened this issue Nov 16, 2017 · 0 comments · Fixed by #1749
Closed

CoreGenerateSatelliteAssemblies broken for all languages except C# #1748

tmeschter opened this issue Nov 16, 2017 · 0 comments · Fixed by #1749
Assignees
Labels

Comments

@tmeschter
Copy link
Contributor

The CoreGenerateSatelliteAssemblies task first calls the WriteCodeFragment task to write a bunch of attributes to a .cs file, and then calls the Csc task to compile it (along with the .resource files, of course).

However, the call to WriteCodeFragment specifies the language of the code to generate using the $(Language) property, rather than always passing "C#". This means that in a VB project we'll end up generating VB code into a .cs file, which we then try to compile with csc.exe.

That isn't going to end well.

@tmeschter tmeschter added the Bug label Nov 16, 2017
@tmeschter tmeschter self-assigned this Nov 16, 2017
tmeschter added a commit to tmeschter/sdk that referenced this issue Nov 16, 2017
Fixes dotnet#1748.

The `CoreGenerateSatelliteAssemblies` task first calls the
`WriteCodeFragment` task to write a bunch of attributes to a .cs file,
and then calls the `Csc` task to compile it (along with the .resource
files, of course).

However, the call to `WriteCodeFragment` will use the project's language
to generate the source file. This means that in a VB project we'll end
up generating VB code into a .cs file which we then try to compile with
csc.exe. That doesn't end well.

The fix here is to always pass "C#" as the language to
`WriteCodeFragment`.
nguerrera pushed a commit to nguerrera/sdk that referenced this issue Feb 26, 2018
Fixes dotnet#1748.

The `CoreGenerateSatelliteAssemblies` task first calls the
`WriteCodeFragment` task to write a bunch of attributes to a .cs file,
and then calls the `Csc` task to compile it (along with the .resource
files, of course).

However, the call to `WriteCodeFragment` will use the project's language
to generate the source file. This means that in a VB project we'll end
up generating VB code into a .cs file which we then try to compile with
csc.exe. That doesn't end well.

The fix here is to always pass "C#" as the language to
`WriteCodeFragment`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant