One of the features I definitely miss within Visual Studio is the ability to close all tabs except a few you want to keep working on. If you are working within two files at the same time, but you have a lot of other files open (read a lot of other open tabs), you have to close the others one by one. You do have an option to speed up this process, which is available within the context menu of the tabs. It is called “Closing All But This”, but it closes also the other tabs you probably want to still be opened. So this means you still have to open again the ones you want to be open. Isn’t there another way to do this within Visual Studio?
Read More…
Posted in
Visual Studio at June 16th, 2022.
No Comments.
When you read a certain magazine or newspaper, you don’t have the feeling that the articles are written by a number of persons each having their own personalities and characteristics. When reading the first article, you can’t decide when looking at another article by looking at the use of words if it is written by the same person or not. The same strategy we see back at clean written code: it will show consistency throughout the solution. If applied well, you can’t tell that some class is written by one developer and another class by another developer.
What is actually the benefit of having all code written down like it is written by the same person? Note that we spent more time reading back code than we spend time at writing the code. If this is the case, you want fellow programmers to quickly grasp the main important things you want to achieve by the code you’ve written. One thing that helps with this is having the same coding style all over the same code base.
Read More…
Posted in
Clean Code at March 1st, 2022.
No Comments.
NuGet packages eases the reuse of components. A NuGet package can contain different kinds of resources, like libraries, or header files. These resources are packed in a NuGet package. You can use a package in your solution and refer to one of the resources in the package.
During development, it can be convenient to just create your NuGet package locally and test it locally. Therefore you don’t need to set up your own hosting environment, like for example Artifactory, you just can host your packages on a local disk. Although the scenario where you publish your package to an external host is rather described everywhere, the latter one is a scenario that is interesting as a workaround not having to publish your package you are developing directly to an external source.
We will look at how to define the content of your NuGet package, create it, store it locally and eventually consume it.
Read More…
Posted in
C#,
C++ at January 31st, 2022.
No Comments.
Auto generated files you typically don’t want to have under source control. I had this problem when building an Wix installer project, where I gather all files I want to include in my installer via the HeatDirectory task. This generates a file, called for example myfiles.wxs, which I need in my Visual Studio project to compile a valid Microsoft installer. Since the rest of my project depends on this wxs-file I want to include it in my projectfile, but exclude it from source control.
To fix this, I used the following way of working:
Read More…
Posted in
DevOps at July 14th, 2017.
No Comments.
When I encountered this warning during compiling, I went searching what this warning really caused. It happened that somehow I had two separate files, having the same name. Due to this, the compiler warned me about this design flaw. When I searched on the internet on this warning, I saw a lot of posts of people who suggested to change the project settings of Visual Studio. Read More…
Posted in
C++ at March 19th, 2013.
3 Comments.
When compiling one of my C++ projects, the compiler displayed the error “error d8016 ‘/clr’ and ‘/mtd’ command-line options are incompatible”. I had checked all both the options for “CLR” (Common Language RunTime Support) in “Configuration Properties”->”C/C++”->”General”->”Common Language RunTime Support” and the options for “MTD” (Multi-Threaded Debug) within “Configuration Properties”->”C/C++”->”Code Generation”->”Runtime Library”, the places the compiler complained about. However, I didn’t see anything conflicting options here. CLR was disabled for my project.
After some time, I saw that only one of the files had a different setting. So in case of these errors, and you can’t solve them via the global project properties, check also the properties of the individual files. They might have a different setting!
My problem was solved by going in the project properties to “Configuration Properties”->”C/C++”->”General”->”Common Language RunTime Support” and set it to “No Common Language RunTime support”.
Posted in
C++ at November 27th, 2012.
1 Comment.