@@ -67,9 +67,19 @@ export interface NugetPackageInfo {
6767// Set of NuGet packages that we need to download and install.
6868export const allNugetPackages : { [ key : string ] : NugetPackageInfo } = {
6969 roslyn : {
70- getPackageName : ( platformInfo ) => `Microsoft.CodeAnalysis.LanguageServer.${ platformInfo ?. rid ?? 'neutral' } ` ,
70+ getPackageName : ( platformInfo ) => {
71+ if ( platformInfo === undefined ) {
72+ throw new Error ( 'Platform info is required for roslyn package name.' ) ;
73+ }
74+ return `roslyn-language-server.${ platformInfo . rid } ` ;
75+ } ,
7176 packageJsonName : 'roslyn' ,
72- getPackageContentPath : ( platformInfo ) => path . join ( 'content' , 'LanguageServer' , platformInfo ?. rid ?? 'neutral' ) ,
77+ getPackageContentPath : ( platformInfo ) => {
78+ if ( platformInfo === undefined ) {
79+ throw new Error ( 'Platform info is required for roslyn package content path.' ) ;
80+ }
81+ return path . join ( 'tools' , 'net10.0' , platformInfo . rid ) ;
82+ } ,
7383 vsixOutputPath : languageServerDirectory ,
7484 } ,
7585 roslynDevKit : {
@@ -115,9 +125,6 @@ for (const p of platformSpecificPackages) {
115125gulp . task ( 'vsix:release:package:windows' , gulp . series ( ...vsixTasks . filter ( ( t ) => t . includes ( 'windows' ) ) ) ) ;
116126gulp . task ( 'vsix:release:package:linux' , gulp . series ( ...vsixTasks . filter ( ( t ) => t . includes ( 'linux' ) ) ) ) ;
117127gulp . task ( 'vsix:release:package:darwin' , gulp . series ( ...vsixTasks . filter ( ( t ) => t . includes ( 'darwin' ) ) ) ) ;
118- gulp . task ( 'vsix:release:package:neutral' , async ( ) => {
119- await doPackageOffline ( undefined ) ;
120- } ) ;
121128
122129gulp . task (
123130 'vsix:release:package' ,
@@ -230,11 +237,6 @@ async function installNuGetPackage(
230237}
231238
232239async function installRazor ( packageJSON : any , platformInfo : PlatformInformation ) {
233- if ( platformInfo === undefined ) {
234- const platformNeutral = new PlatformInformation ( 'neutral' , 'neutral' ) ;
235- return await installPackageJsonDependency ( 'Razor' , packageJSON , platformNeutral ) ;
236- }
237-
238240 return await installPackageJsonDependency ( 'Razor' , packageJSON , platformInfo ) ;
239241}
240242
@@ -351,7 +353,7 @@ async function doPackageOffline(vsixPlatform: VSIXPlatformInfo | undefined) {
351353 const message = ( err instanceof Error ? err . stack : err ) ?? '<unknown error>' ;
352354 // NOTE: Extra `\n---` at the end is because gulp will print this message following by the
353355 // stack trace of this line. So that seperates the two stack traces.
354- throw Error ( `Failed to create package ${ vsixPlatform ?. vsceTarget ?? 'neutral ' } . ${ message } \n---` ) ;
356+ throw Error ( `Failed to create package ${ vsixPlatform ?. vsceTarget ?? 'undefined ' } . ${ message } \n---` ) ;
355357 } finally {
356358 // Reset package version to the placeholder value.
357359 await nbgv . resetPackageVersionPlaceholder ( ) ;
@@ -396,9 +398,6 @@ function getPackageName(packageJSON: any, vscodePlatformId?: string) {
396398async function updateNugetPackageVersion ( packageInfo : NugetPackageInfo ) {
397399 const packageJSON = getPackageJSON ( ) ;
398400
399- // Fetch the neutral package that we don't otherwise have in our platform list
400- await acquireNugetPackage ( packageInfo , undefined , packageJSON , true ) ;
401-
402401 // And now fetch each platform specific
403402 for ( const p of platformSpecificPackages ) {
404403 await acquireNugetPackage ( packageInfo , p , packageJSON , true ) ;
0 commit comments