Open MisinformedDNA opened 3 years ago
Hi,
The MappingGenerator.OnBuildGenerator
assembly is not added to project dependencies. You need to copy the attribute definition directly to your source code. Please follow this guideline to set up OnBuildGenerator correctly https://cezarypiatek.github.io/post/generate-mappings-on-build/#generate-mapping-code-on-build
Please let me know if you still have any troubles.
Have a nice day, Cezary
@cezarypiatek Thanks for the response. I get this error when adding SmartCodeGenerator.Engine
:
MSB3073 The command "C:\Users\50587.nuget\packages\smartcodegenerator.engine\1.4.23\build\/../tools/SmartCodeGenerator.Engine.exe -p C:\Users\50587\source\repos\MappingGeneratorPoC\MappingGeneratorPoC\MappingGeneratorPoC.csproj -o C:\Users\50587\source\repos\MappingGeneratorPoC\MappingGeneratorPoC\obj\Debug\netcoreapp3.1\ -g C:\Users\50587.nuget\packages\mappinggenerator.onbuildgenerator\1.22.1.18\build\/../tools/MappingGenerator.OnBuildGenerator.dll" exited with code -532462766. MappingGeneratorPoC C:\Users\50587.nuget\packages\smartcodegenerator.engine\1.4.23\build\SmartCodeGenerator.Engine.targets 11
Can you attach a sample solution that reproduces this problem?
Mapping Generator Version [Current]
Mapping Generator distribution NugetPackage
IDE type and version Visual Studio 2019 16.8
Describe the incorrect behavior The
MappingGenerator.OnBuildGenerator
on NuGet is broken. Running the code from this test case, results in 3 errors, such asDescribe the expected behavior No compilation issues.
Screenshots