How can I see the assembly code that is generated by a gcc (any flavor) compiler for a C/C++ program?
Add -S switch to your command line. Edit: Do not forget that it will place the assembly to the files you specified under -o switch.
Add -S switch to your command line. Edit: Do not forget that it will place the assembly to the files you specified under -o switch.
how do I tag Eric Lippert? If you have something you want brought to my attention you can use the “contact” link on my blog. I’m still utterly confused why the C# compiler bothers to check for collisions between namespaces and types in contexts where it makes no sense for a namespace to exist. Indeed, … Read more
There is an interesting Visual Studio extension that addresses this; the Object Exporter. It allows serialization of an in-memory object into C# Object initialization code, JSON and XML. I haven’t tried it yet but looks intriguing; will update after trying it out.
Source Generators must be .NET Standard 2.0 to run in Visual Studio 2019+ or .NET Standard 1.x to run in Visual Studio 2017+.
See The Host Specific Parameter section HERE. This snippet shows how to get the full path of src relative to the template. <#@ template hostspecific=”true” #> // The location of the src folder relative to the t4 template: // <#= Host.ResolvePath(“src”) #>
I think the key points about CodeDOM and Reflection.Emit are following: CodeDom generates C# source code and is usually used when generating code to be included as part of a solution and compiled in the IDE (for example, LINQ to SQL classes, WSDL, XSD all work this way). In this scenario you can also use … Read more
Modify the jinja2.Environment global namespace itself if you see fit. import jinja2 env = jinja2.Environment() env.globals.update(zip=zip) # use env to load template(s) This may be helpful in separating view (template) logic from application logic, but it enables the reverse as well. #separationofconcerns
This seems to be a reliable, simple way to get the “entry” or main assembly for a web app. If you put controllers in a separate project, you may find that the base class of ApplicationInstance is not in the same assembly as your MVC project that contains the Views – but, this setup seems … Read more
This feature seems to be available in ReSharper (another JetBrains IDE). It still does not seem possible in IDEA yet.
Not sure if that’s a sane way to do this, it’s the first time I’m playing around with Swagger. I bumped into the following link and pasted the schema from the project I integrate with. From the top ‘Generate Client’ menu I chose one of the TypeScript presets and it generated a minimal project where … Read more