Amadeusz Sadowski

Results 179 comments of Amadeusz Sadowski

I'm not the project owner so I can't decide whether it'll be accepted or not, but I'll share my thoughts nonetheless, assuming it'll be. I think it should be tool-wide...

The hash is not of the file source, but for the file path. It's there to enable saving files with the same name but from different subfolders into single output...

I'll accept a PR for `CodeGenerationRoslynFilesOutputPath` quickly, it's just a new extension/configurability point. For the other thing, it's much more complicated. Currently we don't care about source location, we just...

Thanks! Those are valuable insights, it's so nice of you to share them! I'll attempt to incorporate them when time allows.

Please notify me here when the PR is merged. ;)

You'll probably want to add the `GenerateCodeFromAttributes` MSBuild target to a `DependsOn` property of the other generators' MSBuild target. https://github.com/AArnott/CodeGeneration.Roslyn/blob/fd1200769415b5428fbd6c5859dbe55cf78f0b7b/src/CodeGeneration.Roslyn.Tool/build/CodeGeneration.Roslyn.Tool.targets#L15-L20

If you can share what exactly is that other generator, I could look and advise. As is, your solution looks like a hacky one. Maybe a better one can be...

https://github.com/AArnott/CodeGeneration.Roslyn/wiki/Features#definitions Please use terms as defined, so I'll be able to understand you quickly. For a quick enhancement, you could replace CallTarget, which is rarely a good idea, with DependsOn=Generate......

The actual task code used would be `ManagedCompiler.cs`'s ExecuteTool override: https://github.com/dotnet/roslyn/blob/082d02d0616442b0370f28eecc981f8bcbec48d2/src/Compilers/Core/MSBuildTask/ManagedCompiler.cs#L459-L470 We should pass `ProvideCommandLineArgs=true` and `SkipCompilerExecution=true`. This will result in all Roslyn CLI arguments output into `CommandLineArgs` item.

Links browsed during investigation: - https://blogs.msdn.microsoft.com/kirillosenkov/2015/04/04/how-to-have-a-project-reference-without-referencing-the-actual-binary/ - https://stackoverflow.com/questions/46905637/how-to-f5-deploy-with-add-in-libraries-in-visual-studio/47132155#47132155 - https://github.com/Microsoft/msbuild/issues/1916 - https://github.com/microsoft/msbuild/blob/master/documentation/ProjectReference-Protocol.md - https://github.com/dotnet/sdk/issues/939 - https://github.com/microsoft/msbuild/pull/2867 - https://github.com/microsoft/msbuild/issues/2661 - https://github.com/microsoft/msbuild/issues/3843 - https://jaylee.org/archive/2019/01/25/create-a-buildreference-dependency-between-sdk-style-projects.html *this seems to follow what we currently implement...