The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,772 other followers

Archive for the ‘.NET’ Category

Anyone having a solution for “Microsoft Visual Studio” throwing “The operation could not be completed” when including a file in a PowerShell project?

Posted by jpluimers on 2017/06/22

The operation could not be completed.

The operation could not be completed.

Include In Project

Include In Project

I’ve got a bunch of PowerShell projects in a solution. In some of them, I can include new files, in others I get the below error.

The diff of a good/bad project is below as well.

Two questions:

  1. Does anybody know how to work around this?
  2. Does anybody know how to find the actual error for this?

---------------------------
Microsoft Visual Studio
---------------------------
The operation could not be completed
---------------------------
OK
---------------------------

Good file: WindowsLogsCbsInquiry.pssproj

Bad file: WindowsTempInquiry.pssproj

–jeroen

Read the rest of this entry »

Posted in CommandLine, Development, PowerShell, Software Development, Visual Studio 2015, Visual Studio and tools | Leave a Comment »

Keep consistent formatting – via: The Oracle at Delphi: Code is the language, formatting is the dialect.

Posted by jpluimers on 2017/06/13

When this developer finally went to commit his/her changes, they had also reformatted most of the codebase into his/her preferred coding style/format. This was even for files for which no other changes had been made!Imagine the next developer coming along and pulling down the latest changes from the source control system and trying to merge them into their own local changes.

Because of all these code-format-only changes, it became nearly impossible to merge any changes without going through every conflicted file and painstakingly reconcile the changes.

I’ve seen this happen on a few projects where there have been sequential single developers some of which reformatted the whole code base within a few days of taking over.

It made it impossible to perform a “blame” or proper history tracking of feature changes.

That increased the cost of maintenance a lot.

I’ve been on several teams that enforced a pre-checkin standardised formatting of the code. Only rarely that causes problems, usually it’s a blessing to as it makes for a consistent formatting of the code-base where it is much easier to cut the crap and focus on what the real problem is.

–jeroen

Source: The Oracle at Delphi: Code is the language, formatting is the dialect.

Posted in .NET, C#, Delphi, Development, Software Development | 2 Comments »

KirillOsenkov/MSBuildStructuredLog: A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values

Posted by jpluimers on 2017/05/31

Cool: KirillOsenkov/MSBuildStructuredLog: A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values

Basically it parses the XML output into something manageable.

Via Matthijs ter Woord.

–jeroen

Posted in .NET, Continuous Integration, Development, msbuild, Software Development | Leave a Comment »

MiloszKrajewski/LibZ: the alternative to ILMerge (Resolve instead of merge assemblies)

Posted by jpluimers on 2017/05/30

ILMerge has all sorts of drawbacks with things like XAML, WPF, NHibernate, dynamically loaded assemblies and reflection.

Jeffrey Richter: Excerpt #2 from CLR via C#, Third Edition | Microsoft Press blog has an interesting approach based on adding a callback to the AppDomain’s ResolveAssembly event with some steps so you can embed assemblies as resources which you then – unlike ILmerge- dynamically resolve.

Those steps require a bit of manual labour which is taken away by MiloszKrajewski/LibZ: LibZ, the alternative to ILMerge.

The repository on github even compresses your assembly resources.

–jeroen

Posted in .NET, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 3.0, C# 4.0, C# 5.0, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

Anders Hejlsberg on Modern Compiler Construction | Seth Juarez | Channel 9

Posted by jpluimers on 2017/05/18

One of those “must watch” videos if you are remotely or more interested in how compilers influence our day to day coding activities.

The Red Dragon Book, first edition: Compilers. Principles, Techniques and Tools.

The Red Dragon Book, first edition: Compilers. Principles, Techniques and Tools.

It starts out with referring to the Dragon Book (well, actually the first edition of the Red Dragon Book, as there are three) describing the compilers as having front-ends consisting of a Lexer, Parser and Type Checker and back-ends consisting of Code Generator and Emitter. A full compilation is going through all five stages and there is an increasing cost using these traditional stages when going from syntax highlighting via collapsible regions to red squiggles and code completion will need to go further along those stages taking an increasing time – like seconds or even longer – whereas the user experience requires responses in ~ 100 milliseconds where his code might not even compile in the first place.

Then Anders goes on describing Roslyn, TypeScript and Compiler API JSON interfaces to them so you can run them as a service and keep compiler state, rebuilding just enough of the state on source code changes. He goes on talking about how Visual Studio, Visual Studio Code, Command-Line Compiler, Sublime Text and other tools (can) use these APIs to interact with the compiler so it keeps state of slowly evolving code of which the tools than can emit what they need.

Anders explains this much better and much more visually than I do: so it’s a highly recommended video.

Read the rest of this entry »

Posted in .NET, C#, Delphi, Development, Software Development | 2 Comments »

 
%d bloggers like this: