Skip to content

Commit

Permalink
feat: first pass at net6.0 framework addition
Browse files Browse the repository at this point in the history
  • Loading branch information
scottschreckengaust committed Jul 18, 2024
1 parent 4ee891d commit ad09575
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/jsii-pacmak/lib/targets/dotnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { toReleaseVersion } from './version-utils';

import { TargetName } from '.';

export const TARGET_FRAMEWORK = 'netcoreapp3.1';
export const TARGET_FRAMEWORKS = 'netcoreapp3.1;net6.0';

/**
* Build .NET packages all together, by generating an aggregate solution file
Expand Down
6 changes: 4 additions & 2 deletions packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as xmlbuilder from 'xmlbuilder';
import { TargetName } from '..';
import * as logging from '../../logging';
import { VERSION } from '../../version';
import { TARGET_FRAMEWORK } from '../dotnet';
import { TARGET_FRAMEWORKS } from '../dotnet';
import { toNuGetVersionRange, toReleaseVersion } from '../version-utils';
import { DotNetNameUtils } from './nameutils';

Expand Down Expand Up @@ -112,7 +112,7 @@ export class FileGenerator {
propertyGroup.ele('IncludeSource', 'true');
propertyGroup.ele('Nullable', 'enable');
propertyGroup.ele('SymbolPackageFormat', 'snupkg');
propertyGroup.ele('TargetFramework', TARGET_FRAMEWORK);
propertyGroup.ele('TargetFrameworks', TARGET_FRAMEWORKS);
// Transparently rolll forward across major SDK releases if needed
propertyGroup.ele('RollForward', 'Major');

Expand Down Expand Up @@ -154,6 +154,8 @@ export class FileGenerator {
'0109', // The member 'member' does not hide an inherited member. The new keyword is not required.
].join(','),
);
warnings.comment('Quiet "Consider upgrading your TargetFramework to net6.0 or later" messages from "netcoreapp3.1" target framework')
warnings.ele('SuppressTfmSupportBuildWarnings').text('true')
const xml = rootNode.end({ pretty: true, spaceBeforeSlash: true });

// Sending the xml content to the codemaker to ensure the file is written
Expand Down

0 comments on commit ad09575

Please sign in to comment.