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

Make CoreGenerateSatelliteAssemblies work for VB #1749

Merged

Conversation

tmeschter
Copy link
Contributor

Fixes #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.

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`.
@tmeschter tmeschter merged commit 8992a1b into dotnet:master Nov 16, 2017
JL03-Yue pushed a commit that referenced this pull request Mar 19, 2024
…239-8eed-59f1d912a72e

[release/6.x] Update dependencies from dotnet/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

Successfully merging this pull request may close these issues.

CoreGenerateSatelliteAssemblies broken for all languages except C#
2 participants