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

generate assemblyinfo.cs for new module #1376

Merged
merged 8 commits into from
Sep 19, 2024
Merged

generate assemblyinfo.cs for new module #1376

merged 8 commits into from
Sep 19, 2024

Conversation

VeryEarly
Copy link
Contributor

No description provided.

public class NewAssemblyInfo : PSCmdlet
{
private readonly string assemblyInfoPath = Path.Combine("${$project.baseFolder}", "Properties", "AssemblyInfo.cs");
private const string assemblyName = "${$project.title}";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use $(module-name) instead of title here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

module-name is Az.xxx, title is without Az, I want it to be without 'Az'

@@ -340,6 +346,11 @@ export class Project extends codeDomProject {
const afterBuildTasksArgsDictionary: Dictionary<string> = await this.state.getValue<Dictionary<string>>('after-build-tasks-args', {});
this.afterBuildTasksArgs = JSON.stringify(afterBuildTasksArgsDictionary);

this.assemblyInfoFolder = await this.state.getValue('assemblyInfo-folder', '');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just hardcode the assemblyInfoFolder to Properties

@@ -166,11 +166,17 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}

$assemblyInfoPath = Join-Path $PSScriptRoot 'Properties' 'AssemblyInfo.cs'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we only have it for Azure.

# ----------------------------------------------------------------------------------
");
sb.Append($"{Environment.NewLine}");
sb.AppendLine("using System;");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could consider hardcode all the stuff except for assemblyName, Guid, and assemblyVersion.

@dolauli dolauli merged commit f925a81 into main Sep 19, 2024
101 checks passed
@dolauli dolauli deleted the yabo/assemblyinfo branch September 19, 2024 06:24
dolauli added a commit that referenced this pull request Sep 24, 2024
dolauli added a commit that referenced this pull request Sep 24, 2024
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.

2 participants