@@ -287,8 +287,7 @@ export interface ProjectInformationResponse {
287287 DotNetProject : DotNetProject ;
288288}
289289
290- export enum DiagnosticStatus
291- {
290+ export enum DiagnosticStatus {
292291 Processing = 0 ,
293292 Ready = 1
294293}
@@ -740,6 +739,16 @@ export function findNetFrameworkTargetFramework(project: MSBuildProject): Target
740739 return project . TargetFrameworks . find ( tf => regexp . test ( tf . ShortName ) ) ;
741740}
742741
742+ export function findNet5TargetFramework ( project : MSBuildProject ) : TargetFramework {
743+ const targetFramework = project . TargetFrameworks . find ( tf => tf . ShortName . startsWith ( 'net5' ) ) ;
744+ // Temprorary workaround until changes to support the net5.0 TFM is settled. Some NuGet
745+ // builds report the shortname as net50.
746+ if ( targetFramework !== undefined ) {
747+ targetFramework . ShortName = "net5.0" ;
748+ }
749+ return targetFramework ;
750+ }
751+
743752export function findNetCoreAppTargetFramework ( project : MSBuildProject ) : TargetFramework {
744753 return project . TargetFrameworks . find ( tf => tf . ShortName . startsWith ( 'netcoreapp' ) ) ;
745754}
@@ -749,7 +758,8 @@ export function findNetStandardTargetFramework(project: MSBuildProject): TargetF
749758}
750759
751760export function isDotNetCoreProject ( project : MSBuildProject ) : Boolean {
752- return findNetCoreAppTargetFramework ( project ) !== undefined ||
761+ return findNet5TargetFramework ( project ) !== undefined ||
762+ findNetCoreAppTargetFramework ( project ) !== undefined ||
753763 findNetStandardTargetFramework ( project ) !== undefined ||
754764 findNetFrameworkTargetFramework ( project ) !== undefined ;
755765}
@@ -792,7 +802,11 @@ export function findExecutableMSBuildProjects(projects: MSBuildProject[]) {
792802 let result : MSBuildProject [ ] = [ ] ;
793803
794804 projects . forEach ( project => {
795- if ( project . IsExe && ( findNetCoreAppTargetFramework ( project ) !== undefined || project . IsBlazorWebAssemblyStandalone ) ) {
805+ const projectIsNotNetFramework = findNetCoreAppTargetFramework ( project ) !== undefined
806+ || findNet5TargetFramework ( project ) !== undefined
807+ || project . IsBlazorWebAssemblyStandalone ;
808+
809+ if ( project . IsExe && projectIsNotNetFramework ) {
796810 result . push ( project ) ;
797811 }
798812 } ) ;
0 commit comments