Conversation
The existing package has a number of problems: - Usage of powershell for adding content files: these files are no longer executed by nuget (IIRC, as of NuGet v3+) - Since they are no longer run, not only does the sample .cs does not get injected, but neither does the target run at all since it's also the PS1 that did the injection of an MSBuild target. The latter is unnecessary since NuGet already supports providing targets via nugets. This is added by providing the new InjectModuleInitializer.targets as part of the nuget package. WRT to the sample content file, since it adds little value and it will be tricky to maintain in a compatible way across content vs contentFiles and packages.config vs project.json/PackageReference in VS2015+, I think it's simply better to just improve the readme.txt. After all, it's just a simple class with one method. No big deal copying it from the readme after installing.
Contributor
|
Thanks for the pull request. Will merge it and publish when I can, right now I don't have a Windows machine available, not sure if I will be able to compile this with .NET Core. |
Owner
Author
|
Hi there, it's been a while ;) |
Remove all the cruft from the old-way, including: - Make the csproj nicer by using SDK-style - Use PackageReference for Mono.Cecil instead of checking in libs - Remove the manually crafted .nuspec and and folder structure and let NuGet (SDK) Pack do its work instead - Include a .props that allows third parties to invoke the tool by using $(InjectModuleInitializerTool) - Update the .targets to make it incremental build friendly, and support strong named assemblies too - Temporarily remove tests from project (this needs to go into another project, now that there is a free test runner that can be installed in Community (TestDriven.NET). - Remove the embedded assembly hack for loading Cecil, since this is a standalone tool that can simply resolve its own assemblies from its local directory under \tools - Account for minor changes in Cecil that require disposing the assembly and reading it in memory up-front. - Bump version to 2.0.0 since there's quite significant changes, including not supporting the old .ps1 anymore.
Owner
Author
|
Will be available as soon as nuget.org indexes it at https://www.nuget.org/packages/InjectModuleInitializer.Unofficial as v2.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing package has a number of problems:
are no longer executed by nuget (IIRC, as of NuGet v3+)
does not get injected, but neither does the target run at
all since it's also the PS1 that did the injection of an
MSBuild target.
The latter is unnecessary since NuGet already supports providing
targets via nugets. This is added by providing the new InjectModuleInitializer.targets
as part of the nuget package.
WRT to the sample content file, since it adds little value and
it will be tricky to maintain in a compatible way across content vs
contentFiles and packages.config vs project.json/PackageReference in
VS2015+, I think it's simply better to just improve the readme.txt.
After all, it's just a simple class with one method. No big deal copying
it from the readme after installing.