Skip to content

Conversation

@iSazonov
Copy link
Collaborator

@iSazonov iSazonov commented Jun 2, 2017

Related #3400

Motivation

ResGen tool process all resx files in PowerShell Repo at a time. It is not problem because it works very fast. But updating multiple cs files causes all Repo projects to be recompiled. It really slows down.

We still can not use native resgen from dotnet-cli. See #2882 (comment)
So we should enhance our ResGen tool, use MSBuild capabilities and process resx files one at a time to avoid unnecessary rebuilds.

Fix

We can specify a resx file path parameter on the command line and process resx files one at a time.

Follow-Up work

We will clean up Build.psm1 and modify csproj files to use the new feature of ResGen tool with MSBuild for faster project build.

ResGen tool process all resx files in PowerShell Repo at a time.
Now we can process resx files one at a time.
It is useful for MSBuild.
@iSazonov iSazonov force-pushed the resgen-for-msbuild branch from 3e05e0c to 5f5e49c Compare June 2, 2017 15:08
@vors
Copy link
Collaborator

vors commented Jun 2, 2017

I think it's a good idea.

We will clean up Build.psm1 and modify csproj files to use the new feature of ResGen tool for faster project build.

Couple comments: I don't think we should try to be smart and auto-detect set of files for resgen in build.psm1. We should just figure out the way to switch to msbuild resgen sooner or later.
Let's just expose this functionality thru Start-ResGen optional parameter in the same PR.

@iSazonov
Copy link
Collaborator Author

iSazonov commented Jun 2, 2017

Yes, it is all for MSBuild - I updated the comment.

@vors
Copy link
Collaborator

vors commented Jun 2, 2017

oh, do you mean that you know how to plug it into csproj files so it's called automatically?

@iSazonov
Copy link
Collaborator Author

iSazonov commented Jun 2, 2017

Yes. You can see sample in #3870

@iSazonov
Copy link
Collaborator Author

@TravisEz13 Is the PR ready to merge?

@daxian-dbw daxian-dbw assigned daxian-dbw and unassigned TravisEz13 Jun 23, 2017
{
// We are assuming resgen is run with 'dotnet run pathToResxFile.resx'.
fileFilter = Path.GetFileName(args[0]);
string moduleDirectory = Directory.GetParent(Path.GetDirectoryName(args[0])).FullName;
Copy link
Member

Choose a reason for hiding this comment

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

Why not Path.GetDirectoryName(Path.GetDirectoryName(args[0]))?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! I'll fix on next week.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@daxian-dbw
Copy link
Member

LGTM except for a minor comment.

@daxian-dbw daxian-dbw merged commit 9e41c64 into PowerShell:master Jun 26, 2017
@iSazonov iSazonov deleted the resgen-for-msbuild branch June 26, 2017 18:13
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.

5 participants