You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Fixesdotnet#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`.
Fixesdotnet#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`.
The
CoreGenerateSatelliteAssemblies
task first calls theWriteCodeFragment
task to write a bunch of attributes to a .cs file, and then calls theCsc
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.
The text was updated successfully, but these errors were encountered: