Posts

Showing posts with the label tips & tricks

Why you should migrate your old csproj to SDK format

Image
Introduction  With the introduction of Visual Studio 2017, the format used for csproj was updated including several advantages. This new format will be used when you create a new .Net Core project or .Net Standard library. In spite of the fact that VS2017 continues supporting old csproj format, you can migrate your old projects to SDK format. As a result, you will have the following benefits: Cleaner csproj files. With new format, a lot of things can be omitted, so your csproj files will be cleaner. Files are included using a wildcard , instead of including every single file.  Solution project references are simplier . NuGet reference packages as PackageReferences , so you won't need packages.config and you will be able to use wildcard in your references (for example, 1.0.*). NuGet package definition as a part of the project file. You won't need more nuspec files. Definition of AssemblyInfo attributes in csproj , you won't need more AssemblyInfo.cs files. In ad...

[Tip] Run Visual Studio as Administrator

Image
Probably you already knew this trick to run apps in Windows 10 as Administrator. If not, I hope this tip can help you. Sometimes, you need to execute Visual Studio as Administrator always, for example if you are deploying and debugging your application in your Local IIS. To execute VS as Admin there are several ways. 1) Using Sub-menus: If you go to the item in Windows menu and click on right, you will see menu "More", where you can run VS as administrator. 2) Using shortcuts: Previous method is slow, so If you don't want to do this each time you open VS, you can create a shortcut in your Desktop and execute it as Administrator. To do this, press right click on the shortcut, click on Advanced and select Run as administrator. 3) Always as Administrator: Method 2 is much better than 1, but you always have to open VS by using your modified shortcut. So for example, you can not open directly a file .sln with Admin rights. But don't worry, there is a method ...